Repository navigation
DotTip: Rename id attribute to tipId - #10317
Merged
youknowriad merged 2 commits intoOct 27, 2018
Merged
Conversation
Member
Author
|
Note to reviewer: different e2e tests are failing each time I push. I can't replicate anything consistent locally. |
youknowriad
reviewed
Oct 26, 2018
Contributor
There was a problem hiding this comment.
Should we support id as well in conjunction with a deprecated call?
…void using common DOM attributes as prop names. Updates prop names where we're using the component, including in README examples and documentation. Updates related unit tests and snapshot. Removes eslint exception.
Contributor
|
Thanks for the PR @ramonjd I pushed a change add the deprecation, I hope you don't mind :) |
Member
Author
No worries @youknowriad ! I had a change ready to commit, but wasn't sure about what to write in the deprecation text or which version was going out next, so I'm glad you got in first :) I had something like: Thanks!! |
Contributor
|
Oh sorry, I should have waited, both work though :). Let's wait for the test and merge. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #10305
Description
This PR renames
idprop on<DotTip />totipIdto avoid using common DOM attributes as prop names.It also removes the eslint exception in the selector, thus reverting it back to its original rule.
How has this been tested?
Manually tested by viewing NUX tips in a new post. Execute
localStorage.setItem('WP_DATA_USER_1', '')in the console to remove user data from locale storage if you've already dismissed tips beforeI also ran both unit and e2e tests.
npm run lintagainst changes. Also ran against original props, e.g.,<DotTip id="core/editor.publish">and received the following error:error Do not use string literals for IDs; use withInstanceId instead no-restricted-syntaxScreenshots
Types of changes
This PR renames the
idprop totipId, and correcting related side effects in the tests/snapshots.We're also updating the documentation to reflect this change, and removing the exception in the eslint selector.
Checklist: