Skip to content

Conversation

@gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Oct 16, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5421
Closes https://github.com/mitodl/hq/issues/5429

Description (What does it do?)

This PR takes advantage of the facet-transitioning class added in mitodl/course-search-utils#146, allowing us to set visibility: hidden on facet-visible items while they are not expanded or transitioning. The default color of the expand / collapse caret on facets was also changed to silverGrayDark in accordance with https://github.com/mitodl/hq/issues/5429.

How can this be tested?

First, we will need to get a new version of course-search-utils

  • Clone course-search-utils on the cg/add-facet-transitioning-class branch: https://github.com/mitodl/course-search-utils
  • Once you are on the correct branch, run yarn install and then yarn typescript to generate the library
  • Back in mit-learn, overwrite the contents of the node_modules/@mitodl/course-search-utils/dist folder with the contents of course-search-utils/dist that we just built
  • Spin up mit-learn on the cg/facet-accessibility branch
  • Make sure you have some data backpopulated in your database and a search index built
  • Browse to the search page at https://localhost:8062/search
  • Collapse one of the search facets on the left hand side, then right click on the facet and click Inspect
  • Look at the facet-visible items within the collapsed facet and ensure they have the visibility: hidden rule applied to them
  • Expand the facet while watching the CSS rules on one of the facet-visible items
  • Verify that the visibility: hidden rule is removed

Checklist:

@gumaerc gumaerc added the Needs Review An open Pull Request that is ready for review label Oct 16, 2024
@shanbady shanbady self-requested a review October 16, 2024 17:39
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

When testing this I'm seeing certain facets have the visibility set to hidden but not all of them. For example the topics and department filters still had .facet-visible elements with visibility:visible when hidden.

@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Oct 16, 2024
@gumaerc gumaerc added Needs Review An open Pull Request that is ready for review and removed Waiting on author labels Oct 16, 2024
@gumaerc gumaerc assigned shanbady and unassigned gumaerc Oct 16, 2024
@gumaerc
Copy link
Contributor Author

gumaerc commented Oct 16, 2024

@shanbady Thanks, this should be ready for another look

Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

👍

@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Oct 16, 2024
@gumaerc gumaerc merged commit 984eacb into main Oct 16, 2024
8 checks passed
@odlbot odlbot mentioned this pull request Oct 16, 2024
2 tasks
This was referenced Oct 21, 2024
@rhysyngsun rhysyngsun deleted the cg/facet-accessibility branch February 7, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants