-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/behaviour #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/behaviour #11
Conversation
- Assign roles -> alert - Assign groups -> alert - Edit User -> alert
@tokland I am adding you as a reviewer. Can you please have a look at this PR when you are back to work? I will also do a review after yours... |
src/List/ContextActions.js
Outdated
@@ -8,29 +8,52 @@ config.i18n.strings.add('details'); | |||
config.i18n.strings.add('assignToOrgUnits'); | |||
|
|||
const contextActions = Action.createActionsFromNames([ | |||
'details', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see (ad807e6) that those conversions to 2 spaces are intentional, but this way we are mixing 2 and 4 spaces in the same project? Are you planning to convert the whole project to 2 spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tokland I didn't intentionally want to change the spaces actually, but I had to hit the organize code shortcut before committing anyway, and It turned out whether I choose 2 or 4 spaces, git was seeing it as total change, so I went with 2 spaces (which I use usually)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tokland what do you use in general? four spaces, right? no tabs, correct? This is a sort of a fork from https://github.com/EyeSeeTea/organisationUnit-User-Assigment. In there, we were using four spaces so probably it is better if we keep the 4 spaces conventions. I definitively would like the three of us to use the same convention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, with JS, I like 2-spaces-no-tabs. But for existing projects let's keep whatever we had, here 4-spaces-no-tabs.
src/i18n/i18n_module_en.properties
Outdated
@@ -341,6 +341,9 @@ data_set=Data Set | |||
intro_data_set=Create, update, view and delete data sets and custom forms. A data set is a collection of data elements for which data is entered. | |||
|
|||
assignToOrgUnits=Assign to organisation units | |||
assignRoles=Assign roles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: at some point, we should fix the i18n files; it has lots of unused keys and each language has different keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MurhafSousli Can you please create a card for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrianq sure
src/List/ContextActions.js
Outdated
@@ -9,14 +9,19 @@ config.i18n.strings.add('assignToOrgUnits'); | |||
|
|||
const contextActions = Action.createActionsFromNames([ | |||
'details', | |||
'assignToOrgUnits' | |||
'assignToOrgUnits', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see the icons in the app? I needed to change all "*" to "**" in webpack.config.js proxy routes for the proxy to work (webpack/webpack-dev-server#458 (comment))
Btw, did you see the icons? I had to replace |
@tokland I added material fonts manually in |
@tokland are you fine with this PR? any pending change or something to discuss? |
I don't see any changes commited in this branch from the original review, am I missing something?
Did you try the proposal in my comment? it seemed easier to fix webpack.config.js. |
@tokland Sorry I didn't notice that you requested a change. yea it is much better like this! |
Cool! And what was the final decision about the spaces? the PR still has the mixture 2 (new) / 4 (old) |
@tokland 4 spaces right! I did 4 in the next PR, but I didn't manage to finish it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MurhafSousli This code looks good to me. A couple of things...
Can you please change the indentation of the new code to 4 spaces? I know that you changed it in the next PR but if you can change it here as well it would definitely help to see the difference. Also, it shouldn't cause you any major conflict in your next PR.
In the card, we talked about two different options for assign org unit:
Assign OU Data Capture -> It is implemented
Assign OU Output -> It is implemented
Keep in mind the two of them should open the same graphical interface (layout): 'assign org units' That graphical interface is currently working so please double check it keeps working. We will make changes to that interface in another PR.
@adrianq sorry for the delay, I added 4 spaces to all files |
Thanks @MurhafSousli What about my second comment? |
@adrianq For the context menu, we already have one of them which opens the dialog. But which property does the current Assign OU refer to? Assign OU Data Capture? or Assign OU Output? I can only think about duplicating this field and rename them to
Assuming that we get the OU data capture from What should we use for OU data output? After checking your last commit again, I found out that my code was almost identical except the field was This is so frustrating, There should be a documentation for this somewhere, the documentation you gave me was for the REST API not the JS client we use |
@adrianq PR is ready for review |
@MurhafSousli Sorry for being picky but there a couple of things I would like you to polish:
Next tasks are much more difficult and can be a nightmare for the two of us if we are not particularly clean with the PRs. Hopefully, these changes shouldn't take you long. It would be great if we can close these PRs between tomorrow and the day after. |
@adrianq I am sorry for the difficulties you are having in reviewing this PR. But do you remember when we talked about the 4 spaces? (A couple of comments above)
So this is the result of adding 4 spaces. I literally sat the spaces to 4 and then I applied code organizing to all files. As you see I am not committing all the changes in one giant commit. I made separate commits for this purpose. IMHO I think you should not review the code from the total file changes. instead, it is easier to review each commit on its own. The lines you highlighted are related to the Add 4 space commit (4abdafa) I believe. If the code that was being pushed in earlier PRs was being pushed in a correct format, we wouldn't have seen these annoying changes. but code with extra spaces and wrong formatting will cause such issue and it needs to be fixed sooner or later. otherwise, we are keeping the unfixed code with us from PR to PR.
Sorry, I don't know how this happened, I probably made mistake while checking out between branches and forgot what branch I was working on. this mistake was produced in the commit Add group to the detail panel(1371215) I honestly don't know how to clean up at this point due to my limited git skills. I don't think I can go back to that state. But I can undo the last commit and push it again into multiple commits if you want. Would you like remove this PR and start a new one. or if you know a better way, can you guide me through the steps? thanks. |
closes #9