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

feat: search UI/UX revamp #3941

Merged
merged 19 commits into from
Jan 9, 2024
Merged

feat: search UI/UX revamp #3941

merged 19 commits into from
Jan 9, 2024

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Dec 1, 2023

Part of the roadmap

Changes proposed in this pull request:
This pull request implements the design work made by @iamdarkle (https://discuss.flarum.org/d/33443-flarum-20-uiux-improvements-for-enhanced-search-experience/) to improve the searching experience.

The obvious visual changes include:

  • Stripping the search input of its dropdown results (and related logic).
  • Introducing a new Search modal component (lazy loaded).

Some key technical changes/additions are:

  • The abstraction of the autocomplete logic used in mentions and emoji, into a new AutocompleteReader, we use this here for the gambit autocompletion.
  • The introduction of a GambitsAutocomplete utility which makes use of the AutocompleteReader.
  • The introduction of a GambitsAutocompleteDropdown used for independent inputs (like the admin users page), unrelated to the SearchModal.
  • The API for the gambit interface has been changed and improved to allow structuring suggestions. New BooleanGambit and KeyValueGambit classes have been added to reduce the boilerplate of implementing gambits.
  • Gambits can now be localized (check the .yml files)

Screenshot
screen-capture (19).webm

image
image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

@SychO9 SychO9 requested a review from a team as a code owner December 1, 2023 15:15
@SychO9 SychO9 added this to the 2.0 milestone Dec 1, 2023
@SychO9 SychO9 self-assigned this Dec 1, 2023
@SychO9 SychO9 requested a review from imorland January 6, 2024 11:28
@imorland imorland merged commit 3a34136 into 2.x Jan 9, 2024
23 of 24 checks passed
@imorland imorland deleted the sm/search-ui-ux branch January 9, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: completed
Development

Successfully merging this pull request may close these issues.

3 participants