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

Make matchedSubstrings accessible #126

Merged
merged 8 commits into from
Jul 26, 2022

Conversation

alextaing
Copy link
Contributor

@alextaing alextaing commented Jul 26, 2022

Raiden needs access to matchedSubstrings from the spellCheck part of the Search API response. Since changing correctedQuery from a string to an object would be a breaking change, we added a new property to the spellCheck interface that holds the matchedSubstrings. This PR updates the version number of Core used to introduce matchedSubstrings.

J=SLAP-2274
TEST=auto, manual

Automatic tests were updated to include matchedSubstrings in the SpellCheck objects. Manual testing was performed using the test-site-node. It was checked that on search "virgimia", a matchedSubstrings list was returned with correct values. It was also checked that on search "virginia" remained functional.

"virgimia" search result:
image

@alextaing alextaing added the WIP label Jul 26, 2022
@alextaing alextaing requested a review from a team as a code owner July 26, 2022 14:01
@coveralls
Copy link

coveralls commented Jul 26, 2022

Pull Request Test Coverage Report for Build 2741054734

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.735%

Totals Coverage Status
Change from base Build 2691657169: 0.0%
Covered Lines: 327
Relevant Lines: 345

💛 - Coveralls

@alextaing alextaing removed the WIP label Jul 26, 2022
@alextaing alextaing changed the base branch from main to develop July 26, 2022 16:32
@alextaing alextaing merged commit d0b31b4 into develop Jul 26, 2022
@alextaing alextaing deleted the dev/spell-check-matchedSubstrings branch July 26, 2022 17:29
@alextaing alextaing mentioned this pull request Jul 27, 2022
alextaing added a commit that referenced this pull request Jul 27, 2022
## Version 1.4.0
### Changes
- `matchedSubstrings` from `spellCheck` is now accessible in state (#126)
    - An array of objects with properties `offset` and `length` that represent the matching substrings between the `originalQuery` and the `correctedQuery`
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