-
Notifications
You must be signed in to change notification settings - Fork 2
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: add scroll for workflows [DHIS2-15415] #276
Conversation
🚀 Deployed on https://pr-276--dhis2-data-approval.netlify.app |
const now = new Date() | ||
const yearTwoYearsAgo = now.getFullYear() - 2 | ||
return () => | ||
jest.requireActual('moment')(`${yearTwoYearsAgo}-01-01T00:00:00.000Z`) |
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.
There is a test that expects output of Approved by Hendrik 2 years ago
. However, since the date here was fixed as 01-01-01T00:00:00.000
when I ran the test now in 2023, I got the output of Approved by Hendrik 3 years ago
.
This update just sets it so the date will be 1 January two years prior to the current year, so that the output text should always be Approved by Hendrik 2 years ago
.
@@ -3,3 +3,7 @@ | |||
color: var(--colors-grey700); | |||
padding: var(--spacers-dp16) var(--spacers-dp8) var(--spacers-dp24); | |||
} | |||
.menu { | |||
max-height: 70vh; |
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.
as noted in the PR description, this is just a random value I chose as the other two drop downs were already different.
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.
LGTM.
Sorry that you had to deal with these test-issues. However, I have to admit I chuckled a bit when I read the two years ago problem.
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.41 version
🎉 This PR is included in version 100.0.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adds overflow-y and sets max height for workflow menu. See https://dhis2.atlassian.net/jira/software/c/projects/DHIS2/issues/DHIS2-15415. The other selectors (for period and organisation unit) have differing fixed max-heights, so I just somewhat randomly went with .7vh here 🫤.
Note:
There were a number of tests that were failing when I went to make this update. The tests aren't failing because of the changes I've made (the stylistic changes don't affect anything, particularly for our testing where admin user only has 1 workflow), but I couldn't get a successful run without addressing these:
Before:
After: