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

Update SearchBox and use it in Project Views code #4310

Merged
merged 13 commits into from Mar 21, 2023

Conversation

magicznyleszek
Copy link
Member

@magicznyleszek magicznyleszek commented Mar 6, 2023

Description

Displays search box for My Projects and Project Views routes.

Code Review Notes

This changes a few things:

  • Move MainHeader component to better directory
  • Split out AccountMenu component (out of MainHeader) and change to TypeScript
  • Typescriptize HeaderTitleEditor component
  • Typescriptize SearchBox component
  • Move searchBoxStore to MobX and update all code that was using it
  • Update customViewStore to use new searchBoxStore to fetch assets filtered by search phrase

General idea is to have this searchBoxStore being the singe source of truth for search box input. Every component or store that needs to know search phrase is using it now. searchBoxStore is handling only single context at a time - that is why each piece of code that is using it, needs to register unique context id first. This is because some stores are working even after switching routes and we want to avoid unnecessary calls.

Related issues

Fixes #4063

@magicznyleszek magicznyleszek marked this pull request as ready for review March 6, 2023 14:58
@magicznyleszek magicznyleszek linked an issue Mar 6, 2023 that may be closed by this pull request
@p2edwards p2edwards changed the base branch from 4209-my-projects-redo to feature/my-projects March 8, 2023 17:18
jsapp/js/components/header/searchBox.tsx Outdated Show resolved Hide resolved
jsapp/js/popoverMenu.tsx Outdated Show resolved Hide resolved
@p2edwards p2edwards merged commit 2c033f1 into feature/my-projects Mar 21, 2023
3 checks passed
@p2edwards p2edwards deleted the 4063-use-searchbox-in-project-views branch March 21, 2023 17:45
@magicznyleszek magicznyleszek linked an issue Mar 27, 2023 that may be closed by this pull request
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.

Update SearchBox component to be usable with new code Refactor SearchBox component to use MobX (drop Reflux)
2 participants