Skip to content

Conversation

@ChristopherChudzicki
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5735

Description (What does it do?)

This PR changes setSearchParams to:

  • add to the history stack correctly
  • be purely client side

See associated @mitodl/course-search-utils PR for more.

How can this be tested?

  1. On this branch, yarn install and restart the frontend
  2. Visit the search interfaces, both /search and channel search /c/unit/ocw (etc). Things to check:
    1. Clicking facets adds to the history stack (press browser back/forward button)
    2. Appropriate API calls are made to server
    3. No text/x-component requests to the NextJS server (except maybe on initial load, but definitely not when clicking facets or submitting search text)

Checklist:

  • First merge THIS_PR_RIGHT_HERE and use a published version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🙏 for a more official mock app router ...

@ChristopherChudzicki ChristopherChudzicki changed the title Cc/client routing Fix search page history stack Oct 10, 2024
@ChristopherChudzicki ChristopherChudzicki marked this pull request as ready for review October 10, 2024 20:50
@ChristopherChudzicki ChristopherChudzicki merged commit 05203e1 into nextjs Oct 15, 2024
12 checks passed
@odlbot odlbot mentioned this pull request Oct 22, 2024
74 tasks
@rhysyngsun rhysyngsun deleted the cc/client-routing branch February 7, 2025 20:38
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.

3 participants