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: Add esquery selector textfield & highlighting of matched code #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pkerschbaum
Copy link

@pkerschbaum pkerschbaum commented Feb 9, 2025

Prerequisites checklist

What is the purpose of this pull request?

MVP for esquery selector playground (#79): textfield to enter selectors, matching code get's highlighted:

image

Future ideas:

  • add matches count, tooltips for matches, or syntax highlighting of the selector itself like https://regexr.com/
  • highlight matching accordions (nodes) in the AST tool

What changes did you make? (Give an overview)

  • add reusable component TextField, styled similar to Button
  • add textfield for esquery selector between Navbar and Editor+Tool panels
  • add switch to JS options to toggle the esquery selector textfield
    • is by default off --> people need to opt-into displaying the esquery selector textfield
  • add Codemirror extension + CSS to highlight ranges via its "Decoration" feature
  • add highlighted ranges if the esquery toggle is enabled in the JS options, and the esquery selector matches ranges

Related Issues

Fixes #79

Is there anything you'd like reviewers to focus on?

Copy link

linux-foundation-easycla bot commented Feb 9, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Feb 9, 2025

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit 9483a16
🔍 Latest deploy log https://app.netlify.com/sites/eslint-code-explorer/deploys/67a8de047c5d26000788c056
😎 Deploy Preview https://deploy-preview-80--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pkerschbaum pkerschbaum force-pushed the feat/highlight-esquery-matched-code branch 4 times, most recently from 20dc06d to 928859e Compare February 9, 2025 16:55
@pkerschbaum pkerschbaum force-pushed the feat/highlight-esquery-matched-code branch from 928859e to 9483a16 Compare February 9, 2025 16:55
@pkerschbaum pkerschbaum marked this pull request as ready for review February 9, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: add functionality to test esquery selectors
1 participant