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

Fix Filter Options Highlighting #1871

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Conversation

EmilyZhang777
Copy link
Collaborator

@EmilyZhang777 EmilyZhang777 commented Mar 8, 2024

Previously, when we moved from innerHTML to textContent, it broke the filter options highlighting since the <strong> tag is no longer applied properly. This PR fixes the issue while still avoid insecure document method.

J=TECHOPS-11319
TEST=auto, manual

Ran npm run test. Serve answers-search-ui locally and checked out hh theme. Made sure the highlighting are working.
https://drive.google.com/file/d/1lBVOA759BPwsqmENIv6kFe2FasR25EKO/view?usp=sharing

@coveralls
Copy link

coveralls commented Mar 8, 2024

Coverage Status

coverage: 62.092% (+0.07%) from 62.02%
when pulling 6c6f8ca on dev/fix-filter-options
into bd429a2 on hotfix/v1.17.1.

Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

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

can you add some screenshots/recording of what it looks like? also, can you provide a little more detail in the PR description?

src/core/models/highlightedvalue.js Outdated Show resolved Hide resolved
src/core/models/highlightedvalue.js Outdated Show resolved Hide resolved
src/core/models/highlightedvalue.js Outdated Show resolved Hide resolved
@EmilyZhang777
Copy link
Collaborator Author

can you add some screenshots/recording of what it looks like? also, can you provide a little more detail in the PR description?

Added more details and a screenshot.

Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

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

nit: the PR description styling seems a little off because the editor accepts html. you'll need to put the strong tag in a code style (e.g. <strong>) or escape it (e.g. <strong>)

besides that, lgtm!

@EmilyZhang777 EmilyZhang777 merged commit 11e9f35 into hotfix/v1.17.1 Mar 12, 2024
12 of 14 checks passed
@EmilyZhang777 EmilyZhang777 deleted the dev/fix-filter-options branch March 12, 2024 15:33
@EmilyZhang777 EmilyZhang777 mentioned this pull request Mar 12, 2024
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.

None yet

3 participants