-
Notifications
You must be signed in to change notification settings - Fork 23k
Add close button in htmldialogelement/show/index.md example #42053
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fa5822f
Add close / cancel button
leevigraham 00aec60
Merge branch 'main' into patch-3
leevigraham 77ec0fb
Update index.md
leevigraham cf078a8
Update index.md
leevigraham 885798f
Update to current api conventions with live exmaple
hamishwillee 34bd49a
Merge branch 'main' into patch-3
leevigraham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Can you change this to be "cancel" and then revert the other changes.
The main reason being that the text before this refers to it as a cancel button, and this is a minimal change to meet the original intent.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I explicitly set the button label to "Cancel" rather than "X" to show clearer intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the original intent to have the Cancel button be the reset button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leevigraham Thanks! To make this easier to use and test the result, I made this a live example. As part of that I reverted the "X" button and updated the text so that it is clear that "Cancel" and X are the same thing - it just looks better. The extra heading levels are how API examples are supposed to be written according to the current web templates. I also modified the layout a little to kill the arbitrary line breaks.
No, the reset button clears the selection in the dialog. We could talk about this but not sure it is relevant to the specific example. Do you think it would be better to delete that button?
Otherwise I am happy to merge this - just wanted to give you a chance to comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this was my first PR I didn't want to overstep with the live example…
Now I've seen a live example and reviewed the other Instance Method docs I've found some more inconsistencies:
dialog.requestClosemethod triggers thecanceleventI'm happy to attempt to create a PR that update all the Instance Method docs so the live examples all follow the same layout with javascript implementations reflecting the instance method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be welcome. I'll merge this one though.
Note that you might want to link back to this PR to demonstrate the consistency you are trying to achieve. Reason being that I might not be the reviewer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give it a shot :)