-
Notifications
You must be signed in to change notification settings - Fork 221
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) Update patient registration page to the new design #754
Conversation
Thanks Jessie, when you're able, please add the screenshots showing the software UI before vs after :) |
size={size === 'small' ? '48' : '80'} | ||
textSizeRatio={size === 'small' ? 1 : 2} | ||
size={editing ? '120' : size === 'small' ? '48' : '80'} | ||
textSizeRatio={editing ? 3.75 : size === 'small' ? 1 : 2} |
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.
size / textSizeRatio
DOC
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.
what do you say about this @vasharma05?
5c93e58
to
6f3f7d6
Compare
...-patient-registration-app/src/patient-registration/field/address/address-field.component.tsx
Outdated
Show resolved
Hide resolved
id={attributes.name} | ||
setSelectedValue={setSelectedValue} | ||
selected={selected} | ||
maxLength={attributes.maxCount} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
...ges/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx
Outdated
Show resolved
Hide resolved
left: 10.5rem; | ||
} | ||
} | ||
} |
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.
overriding styles for the date input
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.
Why are we having the overrides?
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.
@@ -125,3 +137,7 @@ | |||
line-height: 1.34; | |||
margin: 0.25rem 0 0; | |||
} | |||
|
|||
.numberInput { | |||
width: 13.125rem; |
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.
giving the number inputs a small size
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.
For now, let it be either 50% of the form width or full width
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 update is majorly to reduce the width of the inputs not to be taking up 100% of the width like the design says. The full input width (300px)
looks as below on desktop.
packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx
Show resolved
Hide resolved
...nt-registration-app/src/patient-registration/input/dummy-data/dummy-data-input.component.tsx
Show resolved
Hide resolved
@@ -116,3 +118,7 @@ | |||
margin: 0; | |||
padding-left: 1rem; | |||
} | |||
|
|||
.Input { | |||
max-width: 300px; |
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.
giving all the inputs a large size
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 remember we already have the max-width placed somewhere, can you please find that first?
Thanks!
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 we were setting the max-width for the whole form here in the infoGrid
class, neglecting the sticky column. Here am trying to set the max-width for the inputs
<TextInput | ||
id="yearsEstimated" | ||
type="number" | ||
className={styles.numberInput} | ||
name={yearsEstimated.name} | ||
light | ||
onChange={onEstimatedYearsChange} | ||
labelText={t('estimatedAgeInYearsLabelText', 'Estimated age in years')} | ||
invalid={!!(yearsEstimateMeta.touched && yearsEstimateMeta.error)} | ||
invalidText={yearsEstimateMeta.error && t(yearsEstimateMeta.error)} | ||
value={yearsEstimated.value} | ||
min={0} | ||
required | ||
{...yearsEstimated} | ||
onBlur={updateBirthdate} | ||
/> |
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.
Why did you remove the Layer HOC?
Actually the light prop is deprecated in the new versions and Layer helps in the same.
You can also pass the level
prop as well to tweak the theme of the child element. I usually play between 0 and 1 only.
https://react.carbondesignsystem.com/?path=/story/components-layer--custom-level
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 saw they had a parent layer that is actually responsible for the lighting. Just missed out on that light prop.
packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx
Show resolved
Hide resolved
display: flex; | ||
flex-direction: column; |
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.
If it's a column and no justify-content
or align-items, I believe we can totally remove it.
column-gap: spacing.$spacing-05; | ||
display: flex; | ||
flex-direction: column; | ||
gap: spacing.$spacing-05; |
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.
gap doesn't work in flex, try using the margins for the child elements
left: 10.5rem; | ||
} | ||
} | ||
} |
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.
Why are we having the overrides?
@@ -99,6 +99,8 @@ | |||
:global(.omrs-breakpoint-lt-desktop) { | |||
.IDInput { | |||
max-width: unset; | |||
display: flex; | |||
gap: 0.25rem; |
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.
Is this working?
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.
surely yes
@@ -116,3 +118,7 @@ | |||
margin: 0; | |||
padding-left: 1rem; | |||
} | |||
|
|||
.Input { | |||
max-width: 300px; |
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 remember we already have the max-width placed somewhere, can you please find that first?
Thanks!
...ges/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx
Outdated
Show resolved
Hide resolved
|
||
.linkContainer { | ||
div:last-child { | ||
padding-bottom: 2.3rem; |
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.
Weird
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.
packages/esm-patient-registration-app/src/patient-registration/patient-registration.scss
Outdated
Show resolved
Hide resolved
@vasharma05 , i think i had this settled? |
Requirements
Summary
start
avatar
width and height when editingScreencasts
Before
Screencast.from.2023-07-24.01-15-01.webm
After
Screencast.from.2023-07-24.01-11-37.webm
None.
Related Issue
None.
Other
Relate to Update capture photo widget to the new design