Skip to content

[WIP] Improve the patient portal header, footer and identification screens - #2384

Draft
marta- wants to merge 5 commits into
devfrom
patient-portal-ui-fixes
Draft

[WIP] Improve the patient portal header, footer and identification screens#2384
marta- wants to merge 5 commits into
devfrom
patient-portal-ui-fixes

Conversation

@marta-

@marta- marta- commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Status: [WORK IN PROGRESS]

This branch was prepared for RPS demo and isn't meant for merging at this time, but can still be reviewed.

Needs more testing on projects with different Affiliation and PatientAccess settings than RPS, especially Your Experience.

Also needs a Jira ticket and properly tagged commits.

Summary

UI improvements across the patient portal's shared chrome and the patient identification screen. Layout and styling only — no changes to the authentication flow, survey logic, or stored data.

Footer

  • Reimplemented as a single wrapping row Stack inside the Toolbar, with the middle dot as the Stack divider. On narrow screens the items wrap onto more lines instead of switching to a separate vertical layout.
  • Enabled useFlexGap (via MuiStack default props) and flexWrap: wrap (via style overrides) for all Stacks in portalTheme, so this behavior is defined once rather than per component. Verified this does not affect the other stacks rendered in the patient portal.

Header

  • Survey name now sits next to the app logo, separated by a light vertical bar (shown only when a name is present). It is bold, muted, and wraps to the left half of the header instead of stretching across the row.
  • The affiliation logo is rendered on the right at its original branding size, and is hidden below 500px so the brand and name have room on narrow screens.
  • The user greeting and Sign out moved to a small pill at the top right, styled to look like it hangs from the top. The name truncates with an ellipsis instead of disappearing, and Sign out is never truncated.
  • On the message screen, the greeting now shows only when PII identification is required, matching when Sign out is shown.
  • Replaced the hardcoded 780px and 500px widths with the theme values (width.main and width.compact), and removed the old block-layout overrides that centered everything between the two logos.

Patient identification

  • Left-aligned the "Continue" and "Close" buttons.
  • Moved the "Where can I find my MRN?" hint into its own MRNHelper component. It is dormant (not rendered): its dialog content is specific to UHN and the screenshots are out of date. The file documents how to refresh and reuse it, or expose it as an opt-in UI extension per deployment.
  • Removed dead code in the date of birth field: an onBlur handler that referenced a nonexistent setter and showed a long, technical message, plus a className pointing at a missing style. Invalid dates are still blocked on submit.

marta- added 5 commits July 4, 2026 21:49
The footer layout was broken on the patient identification page. It
switched between a horizontal flex row (with a CSS "·" pseudo-element
separator) and a vertical CSS grid based on a 600px media query, which
did not lay out correctly.

Replace this with a single row MUI Stack inside the Toolbar:
- the middle dot is now the Stack divider, drawn between the items;
- items wrap onto more lines on narrow screens instead of switching to
  a separate vertical layout;
- the "align" prop drives the Stack's justifyContent.

Set useFlexGap and flexWrap as defaults for all Stacks in portalTheme
instead of on this single Stack: useFlexGap via MuiStack defaultProps
(the documented way to enable it globally), and flexWrap via
styleOverrides, because flexWrap is not a real Stack prop and would
otherwise leak onto the DOM node. These defaults do not change the
other Stacks rendered in the patient portal.
Redesign the top of the patient portal header so the survey name, the
two logos, and the user menu each have a clear, robust place, and so the
layout holds up when any of them is missing.

Survey name:
- Moved next to the app (left) logo, separated by a light vertical bar
  that only shows when a name is present.
- Styled as bold, text-secondary, with a normal line height instead of
  the tall "overline" default that looked awkward when wrapping.
- Constrained the logo + name cluster to the left half of the header so
  long names wrap instead of stretching across the whole row.

Affiliation logo:
- Rendered as its own image on the right, separate from the app logo,
  so the survey name can sit between them.
- Kept at its original size to respect branding, and hidden below 500px
  so the brand and name have room on narrow screens.

User greeting and Sign out:
- Moved to a small pill at the very top right, with a subtle background
  and rounded bottom corners so it looks like it hangs from the top.
- The name no longer disappears on small screens; instead it truncates
  with an ellipsis, while Sign out is never truncated.
- The text right-aligns with the affiliation logo.

Also replaced the hardcoded 780px and 500px widths with the theme
values (width.main and width.compact), and removed the old affiliation
block-layout overrides that centered everything between the two logos.
Move the "Where can I find my MRN?" hint (the link under the MRN input
and the dialog it opens) out of PatientIdentification into a new
MRNHelper component.

The hint is no longer rendered. Its dialog content is specific to UHN
and the screenshots are out of date, so it should not be part of the
generic patient identification form. Keeping it as its own file
preserves the code for whoever wants to refresh the screenshots and
bring it back. The file documents how to reuse it (drop <MRNHelper />
back in place of the MRN field's helper text) and how to make it opt-in
per deployment through a UI extension, the way the page footer works.

Also dropped the imports, styles and state in PatientIdentification that
only served the hint.
Two small cleanups in the date of birth picker on the patient
identification form:

- Remove an onBlur handler that ran when the typed date was invalid. It
  called setError(true), which displayed nothing, and setErrorMessage,
  which does not exist and would have thrown. It also showed a long,
  technical message that is not helpful for patients. Invalid dates are
  still blocked: the form will not submit an invalid date, and on submit
  it shows a plain message asking for the date of birth.

- Remove a className that referenced a style that does not exist, so it
  had no effect.
@marta- marta- added the WIP Work in progress, do not merge label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress, do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant