-
Notifications
You must be signed in to change notification settings - Fork 0
[Issue #75] Added sticky behavior to search filter sidebar #76
Conversation
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 83.27% | 846/1016 |
🟡 | Branches | 68.31% | 222/325 |
🟡 | Functions | 75.46% | 163/216 |
🟢 | Lines | 82.81% | 795/960 |
Test suite run success
168 tests passing in 54 suites.
Report generated by 🧪jest coverage report action from 94df8f4
formRef={formRef} | ||
initialQueryParams={categoryQueryParams} | ||
/> | ||
<div className="position-sticky top-0 maxh-viewport overflow-auto"> |
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.
nit: maybe pull these classes into their own custom style className="searchFormStickyBar"
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.
We should have a standard and stick to it (either prefer custom class names or not) and document. I don't have a strong opinion either way.
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.
Iterated based on that feedback.
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.
My opinion is that USWDS already supports custom CSS in the _uswds-theme-custom-styles file and we have already leveraged that for the .pdf-card component. It is cleaner to move large chunks of CSS into a single file to make it easier to read inline.
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 we add custom classes, they shouldn't duplicate the function of utility classes. USWDS already has a class that makes something sticky, no need to define a new style to do the same thing. I think custom classes should only be used for styles that are not possible with utility classes.
I'll let @andycochran take a peek but looks good! |
We might hold off on this ticket. Honestly, it was sort of a placeholder/note-to-self when I wrote it. I imagined it might work a little differently than it's implemented here. It's a bit awkward that it has a max-height and scrolls independently while not stuck. Since there's no The downside to not doing this is that the scroll position of the results and filter are intertwined. And we've not done any usability testing that shows this is a problem. It's an assumption that users will want to retain the results scroll position while scrolling through the filters. |
Summary
Fixes #75
Time to review: 3 mins
Changes proposed
Context for reviewers
Additional information