-
Notifications
You must be signed in to change notification settings - Fork 22
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
refactor: [DHIS2-17750] replace material ui Card for Widget #3718
Conversation
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.
Hey Simona! The updated version looks like a big improvement from the old cards and it will make our event pages seem much more modern.
Left some small comments on the PR itself, and then I have two questions that may or may not be relevant to this issue, but I'll post it here either way. Feel free to disregard if it should be separate tickets.
- Is this PR not relevant for the registration page? It looks like create new in program still uses the old widgets.
- Do you think we could change the styling so that the right column is not offset like it currently is?
I think something like this would be an improvement:
All I did was to remove the marginTop: 10
from the mapping in withDataEntryOutput
and in DataEntry.component.js
, and then changed StickyOnScroll > stickyContainerAbsolute
to something like this:
stickyContainerAbsolute: {
position: 'static',
'& > div > *:not(:first-child)': {
marginTop: '10px',
},
},
Let me know what you think. Thank you 🎉
</div> | ||
); | ||
const feedback = this.getItems(); | ||
return <WidgetFeedback feedback={feedback} emptyText={i18n.t('No feedback')} />; |
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 think we could follow the same emptyText pattern as we do in the EnrollmentPages?
i.e. No feedback for this event yet
/ No feedback for this enrollment yet
, or something similar?
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.
Yes, I implemented the same pattern now with the latest commit.
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.
It seems like the feedback and indicator widgets are displaying all the time now, whereas in the enrollment pages and old widgets, they only rendered if there is a possibility that there will be text there. This means that if there are no program rule actions that can output anything there, they will be hidden all together. Do you think it's possible to keep this functionality?
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.
Good catch! I added back the functionality
Hey @eirik, |
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 a major upgrade @simonadomnisoru! LGTM!
🚀 Deployed on https://deploy-preview-3718--dhis2-capture.netlify.app |
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.
Tested successfully on 2.42 version
🎉 This PR is included in version 100.76.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
DHIS2-17750
Tech summary
Card
was still used to display the program rules effects when adding a new event to a single event program. I replaced the Card for the Widgets