-
Notifications
You must be signed in to change notification settings - Fork 6
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
CARDS-1761: Adapt React Date / Time pickers #1147
base: dev
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
265cddc
to
0bbd643
Compare
Last screenshot has is observed in dev, notsure it is an issue though |
@veronikaslc I think the new picker is friendly enough to use on the patient identification screen. Please replace the |
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.
A couple of imperfections to be tackled:
- [UI issue] The vertical alignment for date intervals (rendered as input dash input) was already not looking great in dev, but now with the date control having become taller due to the format being displayed in the label above the input, the dash looks badly misplaced. See the Date Formats Test questionnaire in the
--test
mode for example. Suggested fix:display: flex
&align-items: baseline
on the container of the input dash input + amargin-left&right: 8px
on the dash. - [UX issue] Speaking of the format being displayed in the label above the input, I don't think we really need to enforce
InputLabelProps={{shrink: true}}
. I would let the label overlap the input when the value is empty. - [Bug] Time questions appear to be initialized with the current time. To replicate: add a question with the
dataType: time
to the Date Formats Test questionnaire, then create a form and note how the time input is rendered for a new, empty form.- Also, time questions with all possible formats (
mm:ss
,hh:mm
,hh:mm:ss
) should be added by default to the Date Formats Test.
- Also, time questions with all possible formats (
Things not introduced by this PR, but nice to have since we're altering this code anyway:
- The date question's error message should be styled like in the NumberQuestion.
- In view mode, the date intervals should be displayed as
from - to
, like it is done for NumberQuestion, instead offrom \n to
9ed5592
to
f0ef933
Compare
Rebased on the latest dev and addressed comments. |
modules/data-entry/src/main/frontend/src/questionnaire/QuestionnaireStyle.jsx
Outdated
Show resolved
Hide resolved
modules/data-entry/src/main/frontend/src/questionnaire/QuestionnaireStyle.jsx
Outdated
Show resolved
Hide resolved
modules/data-entry/src/main/frontend/src/questionnaire/DateQuestion.jsx
Outdated
Show resolved
Hide resolved
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.
- Patient login page: the date of birth input should be as wide as the entire row. The expected format should be displayed to the user; i suggest displaying it as helper text under the input
- There should be a way to CLEAR the value of a date or time input.
This comment was marked as resolved.
This comment was marked as resolved.
modules/data-entry/src/main/frontend/src/questionnaire/QuestionnaireStyle.jsx
Outdated
Show resolved
Hide resolved
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.
Bug: in proms mode, on the patient login page, selecting a DoB with the picker ends up displaying the day before, even though the actual value in the component and which is sent to the server is the correct one.
Visual bug (that Marta kind of complained about): since the input is too narrow, the value doesn't fit properly, so the date displayed is 2022-08-1
, with the last digit missing. Worse when a time value is also there next to the date.
lfs-resources/variants/src/main/frontend/src/variantFilesContainer.jsx
Outdated
Show resolved
Hide resolved
38424de
to
72bf5ad
Compare
…d by, Last modification date in the dashboard and on the Forms page
Proof of concept for the TimePicker component
Adapted DateTimePicker to the Question components Refactored DateQuestionMonth and DateQuestionFull components into one; Adapted DatePicker in the DowntimeWarningConfiguration component; Adapted DateTimePicker in the DateFilter component
fixed DowntimeWarningConfiguretion file
Fixed created date Filter
Addressed codereview comments
Addressed codereview comments
Addressed codereview comments
Bug fix: on the patient login page, selecting a DoB with the picker ends up displaying the day before, even though the actual value in the component and which is sent to the server is the correct one.
Patient identification dob: more detailed placeholder, remove redundant helper text
Removed all unused props from date time pickers components
Fixed Number extra wide inputs Use DatePickers when appropriate
Addressed codereview comments
Error message should appear under the invalid input only in the range
The error state of the input should be on only if the date in that input is invalid.
* Prevent js console errors on live date validation feedback * Prevent invalid date message from stretching the date input to its length
Revert accidental chmod 644->755 introduced by commit 72bf5ad
- Added meridiem determination to the format - More accurate picker view selection based on the format
Restricted time question format to the selection of choices
Adapt date/time utilities for padding and hour formatting variations
Fix the date hour format to 24hr with padding
Code tabs cleanup
Fixed timepicker for hh:ss format Added type for date questions in the quiestionnaire wisard Uniform error styling across range questions
Rebasing on CARDS-1190
Upgrade datepickers to v6
b627a37
to
a285256
Compare
Removed redundant import after rebase
Bump @mui/x-date-pickers to the latest
CARDS-1761
CARDS-1926
Affected components: