Skip to content

Conversation

@csillag
Copy link
Contributor

@csillag csillag commented Aug 11, 2025

Previously, the when we were highlighting text based on search text or similar, we were passing down the information about what to highlight along the component tree.

This change moves this information into a React Context, so that components that are not involved with the highlighting process (i.e. they are neither the source nor the actual consumers of this information) don't have to deal with passing along this information.

This makes a code simpler.

I suggest reviewing commit by commit.

  • Commit 1 is just preparation (renaming existing components)
  • Commit 2 is key: this is where we introduce the new mechanism, and channel real data into it
  • Commit 3 is just removing useless interim data tunneling

@github-actions
Copy link

github-actions bot commented Aug 11, 2025

Deployed to Cloudflare Pages

Latest commit: 457e77480ba4bff7d1faf69831a8f44a37264979
Status:✅ Deploy successful!
Preview URL: https://14c56187.oasis-explorer.pages.dev
Alias: https://pr-2124.oasis-explorer.pages.dev

@csillag csillag force-pushed the csillag/simplify-highlight-implementation branch 2 times, most recently from d9f4810 to caccd38 Compare August 11, 2025 11:30
@csillag csillag changed the title Simplify highlight implementation Simplify pattern highlight implementation Aug 11, 2025
@csillag csillag marked this pull request as ready for review August 11, 2025 11:35
@csillag csillag force-pushed the csillag/simplify-highlight-implementation branch 3 times, most recently from 1ab2ff8 to 8949ebd Compare August 11, 2025 13:06
@csillag csillag self-assigned this Aug 11, 2025
@csillag csillag force-pushed the csillag/simplify-highlight-implementation branch from 8949ebd to 457e774 Compare August 11, 2025 16:38
Copy link
Member

@lukaw3d lukaw3d left a comment

Choose a reason for hiding this comment

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

Nice

@csillag csillag merged commit 74d75a3 into master Aug 12, 2025
9 checks passed
@csillag csillag deleted the csillag/simplify-highlight-implementation branch August 12, 2025 07:19
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