-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add DHIS2 Sharing Dialog (TECH-274) #24
Conversation
This was supposed to be a draft... apologies |
I added the search for users/groups while typing in the search field. The |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
This is looking good already. A small point reg. i18n
that came up yesterday and is relevant for this component too:
- Apps will only know the user-locale after the app bundle has been loaded and some initial requests have been done.
- Prior to this the default locale, i.e.
en
will be used. - As a result, all calls to
i18n.t()
that are executed directly in a module, will alway use the default locale - I'll place some comments in the code to illustrate points where this goes wrong
(actually it turned out there was only one occurrence of this)
My apologies @edoardo: in my last comment #24 (comment) I pointed out a problem with the ui/packages/widgets/src/FileInputField/FileInputField.js Lines 85 to 103 in c1fa323
Also, the code is looking very good already and I noticed only one |
7c4e46f
to
8479316
Compare
8479316
to
3a627f9
Compare
5ee09aa
to
9e325c3
Compare
28d0474
to
72833c5
Compare
@cooper-joe the data part is not implemented in this PR. |
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.
Component appears to be quite generic, we could use it in all apps that allow setting sharing options, right?
Left some minor comments. When I figured out that this is still a draft, I stopped looking at details. Variable names could be improved a bit.
The component is supposed to be generic and reusable by different apps. |
I'm not sure what we'd have to change in terms of props (e. g. |
@edoardo do you think we could release this with metadata support only and then add data later? I think it would be really great to get this into use. If it looks like this might be close to ready I can take a look and "review" as well (though I can't actually review since I authored the original PR) @Mohammer5 were you asking about |
@amcgee yes |
The plan was to release this with metadata support only. As for the breaking change, I don't think it would necessary be the case, I think the changes can be all internal, keeping the same props. |
Do we have a design or specs for what it should look like on smaller screens? |
Not that I know. @cooper-joe ? |
c9c7128
to
048f44a
Compare
🚀 Deployed on https://pr-24--dhis2-ui.netlify.app |
@@ -23,3 +23,4 @@ export { | |||
DataTableRow, | |||
DataTableToolbar, | |||
} from '@dhis2-ui/table' | |||
// TODO export { SharingDialog } from '@dhis2-ui/sharing-dialog' |
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.
Once ready, this line should be added to the @dhis2/ui
package, but we can release it in alpha
without exposing it.
// TODO export { SharingDialog } from '@dhis2-ui/sharing-dialog' |
This is the implementation of the DHIS2 Sharing Dialog (previously d2-ui-sharing-dialog)
HUGE credit to @cooper-joe who implemented the first React version of this :-D (now outdated)
Here is the design spec.
Cascading sharing for dashboard
Design spec
Screenshots:
TODO (help wanted):
Live state and diffing of current state vs initial state for Save button enablementsharingSettings
object structurePermission
for a sharing grant to a particular user or group?data
sharing settings (only applies to some objects)