Skip to content

Conversation

@lumirlumir
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request?

What changes did you make? (Give an overview)

Hello,

Currently, the ESQuery Selector's placeholder remains the same even when switching to a language other than JavaScript.

To improve this, I added support for updating the ESQuery Selector placeholder based on the selected language.

Now, the placeholders correctly reflect language-specific examples!

  • Before: The placeholder always showed e.g. "ImportDeclaration > Literal" regardless of the language

image

  • After: The placeholder now varies depending on the selected language

image

image

image

image

image

Related Issues

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

@netlify
Copy link

netlify bot commented May 14, 2025

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit cdccb99
🔍 Latest deploy log https://app.netlify.com/sites/eslint-code-explorer/deploys/6824759a26eec300089f7d6f
😎 Deploy Preview https://deploy-preview-104--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.

@amareshsm amareshsm added the accepted There is consensus among the team that this change meets the criteria for inclusion label May 14, 2025
@lumirlumir
Copy link
Member Author

Thanks for pointing this out.

I've added a new commit cdccb99.

@lumirlumir lumirlumir requested a review from amareshsm May 14, 2025 10:52
Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Would like to get one more review on this.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM.

This does, however, mean we have one more thing that needs to be updated whenever we add a new language. In a separate PR, could you please update https://github.com/eslint/code-explorer/blob/main/docs/adding-languages.md to ensure it's up-to-date with all of the required steps?

@nzakas nzakas merged commit b421c74 into main May 14, 2025
8 checks passed
@nzakas nzakas deleted the feat-change-esquery-selector-placeholder-text-based-on-language branch May 14, 2025 15:17
@lumirlumir
Copy link
Member Author

@nzakas Sure! I'll create a separate PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants