Skip to content
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

align search form and results page with designs #2609

Merged
merged 54 commits into from
Sep 25, 2024
Merged

Conversation

fzhao99
Copy link
Collaborator

@fzhao99 fzhao99 commented Sep 23, 2024

PULL REQUEST

Summary

Various styling tweaks, frontend tech debt refactors, and improvements to align things with Figma that Bob worked on when everyone else was out of office last week. Should result in the results page and the search form being up to date / ahead of design minus unimplemented features (step indicator, search bar on results view).

Of note:

  • WOULD LOVE OTHER DEVS' OPINIONS ON SCAFFOLDING OUT THIS FOLDER STRUCTURE. The creation of separate designSystem directory for any context-unaware components (the accordion, redirect toast, side nav (newly introduced in this PR) , and site alert components for now). Breaking these out to implement some Atomic Design ideas and to eventually make building something like Storybook or Figma Code Connect easier.
    • If I could have my way, we'd also have a separate folder for the page / view level, so that we'd have
      • designSystem for any components that come out of the Figma design system
      • components for things in the middle and
      • pages that match the routing / actual pages that map into the URL's people visit.
      • If we do go down this route, this arch should start to reflect larger design patterns around pushing state away from 1) UI implementation at the designSystem level and 2) page routing at the pages level. This will be explored further in a writeup that I'll work on related to work called out in Standardize the handling of state variables, the passing of setters, and the use of constants in the TEFCA viewer #2573.
  • Modularizing a lot of our CSS / putting components into separate folders rather than just living in components.
  • Seeding out some spacing tokens (specifically $tefca-viewer-smaller-width) that we'll probably want to systematize / dedupe from USWDS settings, which I made a ticket for here.

Search form

Laid out the dropdowns horizontally rather than vertically and added explainer copy within the query selection body.
Screenshot 2024-09-23 at 3 52 29 PM

Results view

Aligned the side nav styling and the backlink/new patient search button. Right now, these link back to the same search form, but when we build out the patient search vs the saved query selection, these will link out to their respective locations. Also adds the name of the query in the title section.
Screenshot 2024-09-23 at 3 52 58 PM

Related Issue

Fixes #2589

Additional Information

Anything else the review team should know?

</Suspense>
)}
<>
<SiteAlert page={mode} />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff here is struggling a bit but the only thing added here was lifting up <SiteAlert> up a level and adding main-container to the first div

@fzhao99 fzhao99 marked this pull request as ready for review September 23, 2024 19:32
<h4 id={id} className={styles.accordionHeading}>
{title}
</h4>
{title && (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this check based on a conversation I had with @mikang as documented here

Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I really like this format. I'm gonna read through more of the docs on the principles today, but I think it makes a lot of sense and will make managing UI and backend changes a lot more seamless than it has been.

Thanks so much for your work in starting this refactoring.

@m-goggins
Copy link
Collaborator

I'm taking a look at this PR, just taking my time to read through the docs to make sure I understand the changes you are proposing.

@fzhao99 fzhao99 changed the title styling alignment sweep align search form and results page with designs Sep 24, 2024
@fzhao99 fzhao99 added this pull request to the merge queue Sep 25, 2024
Merged via the queue into main with commit a8faaa5 Sep 25, 2024
10 checks passed
@fzhao99 fzhao99 deleted the bob/styling-refactor branch September 25, 2024 16:37
nickbristow pushed a commit that referenced this pull request Sep 25, 2024
* seed some styles

* pull out alert

* refactor search form

* refactor and make results view component dumb

* make component more readable

* new files

* componentize sidenav

* new folder

* [pre-commit.ci] auto fixes from pre-commit hooks

* move some files around

* imports

* [pre-commit.ci] auto fixes from pre-commit hooks

* copy

* [pre-commit.ci] auto fixes from pre-commit hooks

* add a more reasonable sidenav default

* [pre-commit.ci] auto fixes from pre-commit hooks

* remove log

* docs

* rename

* lint more

* [pre-commit.ci] auto fixes from pre-commit hooks

* more file moving

* new files

* third times the charm

* try this?

* add missing prop

* [pre-commit.ci] auto fixes from pre-commit hooks

* one more

* change padding

* [pre-commit.ci] auto fixes from pre-commit hooks

* fix one test

* [pre-commit.ci] auto fixes from pre-commit hooks

* debug in ci

* [pre-commit.ci] auto fixes from pre-commit hooks

* change to 10

* remove debug log

* [pre-commit.ci] auto fixes from pre-commit hooks

* change selector

* [pre-commit.ci] auto fixes from pre-commit hooks

* change role

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
BobanL pushed a commit that referenced this pull request Oct 15, 2024
* seed some styles

* pull out alert

* refactor search form

* refactor and make results view component dumb

* make component more readable

* new files

* componentize sidenav

* new folder

* [pre-commit.ci] auto fixes from pre-commit hooks

* move some files around

* imports

* [pre-commit.ci] auto fixes from pre-commit hooks

* copy

* [pre-commit.ci] auto fixes from pre-commit hooks

* add a more reasonable sidenav default

* [pre-commit.ci] auto fixes from pre-commit hooks

* remove log

* docs

* rename

* lint more

* [pre-commit.ci] auto fixes from pre-commit hooks

* more file moving

* new files

* third times the charm

* try this?

* add missing prop

* [pre-commit.ci] auto fixes from pre-commit hooks

* one more

* change padding

* [pre-commit.ci] auto fixes from pre-commit hooks

* fix one test

* [pre-commit.ci] auto fixes from pre-commit hooks

* debug in ci

* [pre-commit.ci] auto fixes from pre-commit hooks

* change to 10

* remove debug log

* [pre-commit.ci] auto fixes from pre-commit hooks

* change selector

* [pre-commit.ci] auto fixes from pre-commit hooks

* change role

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
BobanL pushed a commit to BobanL/phdi that referenced this pull request Oct 15, 2024
* seed some styles

* pull out alert

* refactor search form

* refactor and make results view component dumb

* make component more readable

* new files

* componentize sidenav

* new folder

* [pre-commit.ci] auto fixes from pre-commit hooks

* move some files around

* imports

* [pre-commit.ci] auto fixes from pre-commit hooks

* copy

* [pre-commit.ci] auto fixes from pre-commit hooks

* add a more reasonable sidenav default

* [pre-commit.ci] auto fixes from pre-commit hooks

* remove log

* docs

* rename

* lint more

* [pre-commit.ci] auto fixes from pre-commit hooks

* more file moving

* new files

* third times the charm

* try this?

* add missing prop

* [pre-commit.ci] auto fixes from pre-commit hooks

* one more

* change padding

* [pre-commit.ci] auto fixes from pre-commit hooks

* fix one test

* [pre-commit.ci] auto fixes from pre-commit hooks

* debug in ci

* [pre-commit.ci] auto fixes from pre-commit hooks

* change to 10

* remove debug log

* [pre-commit.ci] auto fixes from pre-commit hooks

* change selector

* [pre-commit.ci] auto fixes from pre-commit hooks

* change role

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make search result sidenav better
3 participants