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

Search bar for settings #9887

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

Search bar for settings #9887

wants to merge 21 commits into from

Conversation

somebody1234
Copy link
Collaborator

@somebody1234 somebody1234 commented May 8, 2024

Pull Request Description

  • Close https://github.com/enso-org/cloud-v2/issues/1198
    • Add search bar for settings
      • Note that, unlike the asset search bar, it has neither suggestions nor tags (name:, description:) - I don't think those add any value here (and definitely would complicate the implementation by a lot)
    • Convert settings objects to JS so that they can be filtered by search

UX changes required for this PR:

  • Switched MembersSettingsSection to use react-query to avoid loading the members list every time a user types into the search bar

Incidental changes added to make this PR simpler:

  • Refactor search bar to be provided by a React Context so that state no longer needs to be hoisted all the way up into Dashboard and back down to TopBar

Important Notes

  • While I think highlighting the tab of the currently visible section would be a nice UX upgrade, I think it might be a bit complex for at least this initial PR.
    • It's definitely possible, but almost certainly requires Intersection Observers, plus a new constant to map each Settings Section ID back to its parent Settings Tab ID

Screencast

Note: The end of this recording contains a bug where the "user account" section was not being matched. This bug has since been fixed.

settings-search-2.mp4

Code Review tips

  • settingsData.ts contains the settings converted to JS objects
  • Settings.tsx contains the new filtering logic
  • Settings/Settings{Tab,Section,Entry,InputEntry,CustomEntry} contains the components responsible for rendering the new JS objects
    • The old components which manually constructed the tabs from their constituent components have been removed

Testing instructions

  • Mostly testing that the search works as expected
  • Partly testing to make sure nothing was broken by the refactors - either CSS wise or otherwise.
    • Most things should retain 100% of their original logic - search for SettingsEntryType.custom in settingsData

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. x-new-feature Type: new feature request g-dashboard labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants