Recreated PR2: Added search UI (replaced PR #1716)#1748
Merged
evanugarte merged 48 commits intodevfrom Jul 7, 2025
Merged
Conversation
evanugarte
reviewed
Jul 4, 2025
… when the search input actually changes.
…enting Lookup table
2. Suggestions instantly display hardcoded pages recommendations. 3. Suggestions show user search results after a short delay for authorized users only and if there is any user matched
…fficer is Officer and Manager
Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com>
Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com>
Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com>
Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com>
…d CSS and renamed the class from modal to search-modal. Added a check for an empty suggestions list before handling search.
Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com>
…tent, clear out search box when modal is closed
…stions when keyword is empty
… to arrow functions
evanugarte
approved these changes
Jul 6, 2025
aeiouny
pushed a commit
to aeiouny/Clark
that referenced
this pull request
Jul 7, 2025
…E-Development#1748) * chore: move routes array to its own file * Removed search UI * Re-commit for PR 1 * Added search UI * update: Only 5 search suggestions are shown at once. Scroll to see more. * Debug: remove dessert pages * Fixed bug: user should land homepage after loggin in * Update: Prevent unnecessary API calls — user data is now fetched only when the search input actually changes. * Resolved conflict when merging with latest dev * Resolved incoming conflict when merging with dev * Removed search UI codes and improved permission check logic by implementing Lookup table * Fixed irrelevant permission check * Fixed lookup table to prevent excessive fetching * Improved routes caching in SearchModal using useMemo * 1. Removed scrollable dropdown codes. Just shows top 5 results. 2. Suggestions instantly display hardcoded pages recommendations. 3. Suggestions show user search results after a short delay for authorized users only and if there is any user matched * removed e.key === 'K', only implement api fetch for users list when officer is Officer and Manager * Fix: hide search suggestions when input is empty * Refactor: removed duplicate route filtering and improved keyboard selection logic * Update src/Components/ShortcutKeyModal/SearchModal.js Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> * Update src/Components/ShortcutKeyModal/SearchModal.js Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> * Committed changes as suggestions * Undo the changes in Home.js * Removed a space in line 1 of Home.js * Spitted PR and moved searching debounce logic to the new PR * Updated PERMISSION_LOOKUP_TABLE in Private Route -> no more functions mapping, cleaner code * Removed the commented out section - old SpeakerPage component * Removed unnecessary pageName prop * Resolved conflicts due to auto correction * Fixed typo: signedInRoutes * Added more arrays to RouteConfig.js * Changed RouteConfig.js to Routes.js and fixed linting errors * Merged with Aidan's routes.js code * Update src/index.js Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> * Update src/Components/ShortcutKeyModal/SearchModal.js Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> * Used scoped CSS * Moved suggestions rendering to a separate function. Switched to scoped CSS and renamed the class from modal to search-modal. Added a check for an empty suggestions list before handling search. * Rerversed merging with PR2. Waiting for approval * Recreated PR2 * Changed className: search-modal -> shortcut-search-modal * Update src/Components/ShortcutKeyModal/SearchModal.js Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> * Changed key to r.path and slice top 5 suggestions before rendering * Changes: close search modal when users click outside of the modal content, clear out search box when modal is closed * Added dark mode, refined UI, and showed default signedOutRoutes suggestions when keyword is empty * Changed background color of suggestion list to be more neutral in Light mode * Rebased with main * Renamed getSuggestions to SuggestionsList and converted all functions to arrow functions * Removed 'Get Started row' and filtered out Edit User Info page * Fix: correct dependencies in useMemo for routes --------- Co-authored-by: Evan Ugarte <36345325+evanugarte@users.noreply.github.com> Co-authored-by: Aidan Spies <spiesaidan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To replace PR #1716 was closed by accident.
Please refer to old discussions and resolved issues here: #1716
Drafting UI:
Light mode:

Dark mode:
