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 disable rule button in playground messages #546

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

zhangenming
Copy link
Contributor

@zhangenming zhangenming commented Apr 8, 2024

Prerequisites checklist

What is the purpose of this pull request?

we can Disabled an rule quickly.

What changes did you make? (Give an overview)

image

Related Issues

fixes #548

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

The css style is a little newbie not perfect sorry

Copy link

linux-foundation-easycla bot commented Apr 8, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/66a999162575580008cadce1
😎 Deploy Preview https://deploy-preview-546--fr-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/66a9991670072b0008a09754
😎 Deploy Preview https://deploy-preview-546--es-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/zh-hans-eslint/deploys/66a999163daad60008cb6f2a
😎 Deploy Preview https://deploy-preview-546--zh-hans-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit f3215ba
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/6613f10e8897e20007281d01
😎 Deploy Preview https://deploy-preview-546--pt-br-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit f3215ba
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/6613f10e4e0c880007d318ba
😎 Deploy Preview https://deploy-preview-546--ja-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit f3215ba
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/6613f10e8897e20007281d03
😎 Deploy Preview https://deploy-preview-546--de-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/66a99916c5c5b0000885fd8c
😎 Deploy Preview https://deploy-preview-546--hi-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for new-eslint ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/66a99916c457fc0007bbb3d3
😎 Deploy Preview https://deploy-preview-546--new-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/66a99916c1fc330008e28623
😎 Deploy Preview https://deploy-preview-546--ja-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/66a99916894a4000083166e9
😎 Deploy Preview https://deploy-preview-546--de-eslint.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.

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit 5ace9cc
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/66a99916b3afdc000836f7f7
😎 Deploy Preview https://deploy-preview-546--pt-br-eslint.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
Copy link
Member

@zhangenming pls create an issue explaining what problem you are trying to solve and the solution you would like to implement. ESlint team will triage the issue and mark it as accepted if the team agrees.

@amareshsm amareshsm added triage and removed triage labels Apr 8, 2024
@zhangenming zhangenming changed the title feat: alert item add Disabled button. feat: [playground]alert item add Disabled button. Apr 9, 2024
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.

This looks like it could be useful, but I'd like some other reviews from @eslint/eslint-team before merging.

src/playground/components/Alert.js Outdated Show resolved Hide resolved
@amareshsm
Copy link
Member

@zhangenming Are you still working on this?

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.

Pls resolve conflicts as well.

@zhangenming zhangenming force-pushed the zhangenming/patch-81245 branch 2 times, most recently from f176019 to a84a3a8 Compare July 26, 2024 02:03
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.

Currently the UI looks like the below image

image

Add the display: flex property to the alert__actions class to align the fix and disable buttons on the same line as shown in the below image.

image

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.

I checked the preview and clicked on "disable" for the quotes rule. After clicking the disable button in the right panel, the rule was removed. However, despite clicking disable, the error is still displayed, and the disable option is still shown in the UI.

'm not sure how you are implementing the disable behavior. Could you please brief?

Screen.Recording.2024-07-31.at.12.24.22.AM.mov

@zhangenming
Copy link
Contributor Author

zhangenming commented Jul 31, 2024

微信图片_20240731093910
Just delete this line because of his influence

The idea is to delete related options from the configuration list(rulesWithInvalidConfigs)

@zhangenming
Copy link
Contributor Author

微信图片_20240731095101
I added a judgment to handle this situation
The button is not displayed in this case

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.

Thanks, LGTM. Leaving it open in case anyone else wants to review before merging.

Copy link
Member

@harish-sethuraman harish-sethuraman left a comment

Choose a reason for hiding this comment

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

LGTM. Would like someone from @eslint/eslint-tsc to verify if this was intended behaviour.

observations:

  • when a rule is selected through dropdown the disable button is shown
  • when the button is clicked to disable then the rule is removed from list of rules
  • inline enabling of lint rules doesn't pop disable button

@fasttime fasttime changed the title feat: [playground]alert item add Disabled button. feat: add disable rule button in playground messages Aug 7, 2024
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

LGTM. Leaving open for @nzakas to review.

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.

@harish-sethuraman confirmed. This is the intended behavior.

@nzakas nzakas merged commit 64c1a1e into eslint:main Aug 7, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Suggestion: [playground]alert item add Disabled button.
5 participants