Skip to content

Conversation

sofiaromorales
Copy link
Contributor

@sofiaromorales sofiaromorales commented Jun 30, 2022

Bug/issue #, if applicable: NA

Summary

Algorithm and basic Vue components for the new Quick navigation feature. Changes introduced under the quickNavigation flag.

  • Introduces the QuickNavigationModal component
  • Flatten index now moved into the app state
  • Regex pattern for exact and fuzzy string match over the symbols titles

This pr intends to have the algorithm and base components structure for the Quick navigation feature, any other change related to the UI is for testing purposes and will be refactored in upcoming pull requests :)

First pr as part of my GSoC project mentored by @marinaaisa @franklinsch and @ bea

Dependencies

NA

Testing

Steps:

  1. Set the quickNavigation.enable flag to true inside theme-settings.json
  2. Open the quick navigation modal component by clicking on the magnifier icon next to the filter input
  3. Type something inside the input bar to trigger the fuzzy search
  4. Assert that the symbols listed correspond to your input

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary. NA

…tion

* Introduced a new component "QuickNavigationModal" that serves as UI for the new searching functionality.
* New regex pattern to match symbol titles by fuzzy and string match.
* Data store to control the Quick navigation modal from anywhere on the app without having to pass the data through multiple child compoents.

This change is under the quickNavigation feature flag.
@sofiaromorales sofiaromorales marked this pull request as ready for review June 30, 2022 15:38
Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

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

Hi Sofía!
Great work on your first PR for Quick Navigation 👏

I reviewed your PR and added refactor suggestions to it.
Have a nice weekend!

* Refactor of match highlighter for Safari support using `QuickNavigationHighlighter` component
* Code quality improvements suggested on pr review
@sofiaromorales
Copy link
Contributor Author

Thanks for the review Marina! I addressed all the requested changes :)

@sofiaromorales sofiaromorales requested a review from marinaaisa July 4, 2022 14:38
Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

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

I added new comments, thanks Sofía!

@sofiaromorales sofiaromorales requested a review from marinaaisa July 8, 2022 20:24
Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback, @sofiaromorales .
It looks very very good! Congrats on the great work 👏

@sofiaromorales
Copy link
Contributor Author

@marinaaisa there's anything else needed to merge this pr?

@marinaaisa
Copy link
Member

@swift-ci test

@marinaaisa marinaaisa requested a review from franklinsch July 14, 2022 17:52
@marinaaisa
Copy link
Member

Requesting @franklinsch final look at 😄 but it looks great to me!

@franklinsch
Copy link
Contributor

@sofiaromorales the demo you showed me looked great! If we're happy with the code, this is good to merge (with the feature flag off by default)

@marinaaisa
Copy link
Member

@swift-ci test

@marinaaisa marinaaisa merged commit 4f6c290 into swiftlang:main Jul 15, 2022
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