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

[docs] Replace alert with console.info #18316

Merged
merged 2 commits into from
Nov 11, 2019
Merged

[docs] Replace alert with console.info #18316

merged 2 commits into from
Nov 11, 2019

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 11, 2019

Replaces alert() with console.info() because

  1. alert() is quite disruptive (especially when testing keyboard interactions)
  2. That an interaction happened should be obvious from the component itself not by using a browser API that isn't used nowadays anyway.
  3. We are not consistent with alerting about interactions anyway (some of them don't even log) so it was never that important to be so assertive about the interaction in the first place.

@eps1lon eps1lon added the docs Improvements or additions to the documentation label Nov 11, 2019
@@ -35,7 +35,7 @@ export default function ChipsArray() {

const handleDelete = (chipToDelete: ChipData) => () => {
if (chipToDelete.label === 'React') {
alert('Why would you want to delete React?! :)');
Copy link
Member

Choose a reason for hiding this comment

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

This one might be the only one it the code base that is justified. Without, it's unclear why clicking the delete button does nothing for React while it removes the other tags.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll rewrite this so it isn't handled in the first place. In the end why mark a chip as deletable if it isn't?

Copy link
Member

Choose a reason for hiding this comment

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

Right 👌

@mui-pr-bot
Copy link

mui-pr-bot commented Nov 11, 2019

No bundle size changes comparing 575776f...9257c25

Generated by 🚫 dangerJS against 9257c25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants