-
Notifications
You must be signed in to change notification settings - Fork 840
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 Static HTML Element IDs Generated IDs (Nav Section) #5224
[Docs] Replace Static HTML Element IDs Generated IDs (Nav Section) #5224
Conversation
…Ds generated the htmlIdGenerator utility function
…l-htmlIdGenerator_docs Merging in the latest code from Master
…Ds generated the useGeneratedHtmlId utility function
…eehall/eui into breehall-htmlIdGenerator_docs Merging in the lastest code from the Master branch.
…generated the useGeneratedHtmlId utility function
…generated the useGeneratedHtmlId utility function
…generated the useGeneratedHtmlId utility function
…l-htmlIdGenerator_docs Merging in the latest code from the Master branch
…generated the useGeneratedHtmlId utility function
…enerated the useGeneratedHtmlId utility function
…l-htmlIdGenerator_docs Merging in the latest code from the Master branch
…l-htmlIdGenerator_docs Merging in the latest code from teh Master branch
… use the useGeneratedHtmlId utility function
…l-htmlIdGenerator_docs Merging in the latest code from Master
… use the useGeneratedHtmlId utility function
…useGeneratedHtmlId utility function
…useGeneratedHtmlId utility function
… use the useGeneratedHtmlId utility function
…e the useGeneratedHtmlId utility function
…lIdGenerator_docs_nav Merging in the latest code from the useGeneratedHtmlId changes from the src-docs layout section
…o use the useGeneratedHtmlId utility function
Preview documentation changes for this PR: https://eui.elastic.co/pr_5224/ |
@thompsongl I've removed myself as a reviewer of this one. But you can use the guidance I provided in the first one to help review this one. #5220 |
Is this ready to review, @breehall, or still in progress? |
…r changes from the src/docs layout section
Preview documentation changes for this PR: https://eui.elastic.co/pr_5224/ |
@thompsongl yep, this one is now ready for review! |
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.
LGTM! Thanks, @breehall!
…lastic#5224) * Revised element IDs within the Accordion section of src/docs to use IDs generated the htmlIdGenerator utility function * Revised element IDs within the Accordion section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Revised element IDs within the Flyout section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Revised element IDs within the Header section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Revised element IDs within the Header section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Revised element IDs within the Header section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Revised element IDs within the Modal section of src/docs to use IDs generated the useGeneratedHtmlId utility function * Test commit * Revised element IDs within the Resizable Panel section of src/docs to use the useGeneratedHtmlId utility function * Revised element IDs within the Resizable Panel section of src/docs to use the useGeneratedHtmlId utility function * Revised element IDs within the Button section of src/docs to use the useGeneratedHtmlId utility function * Revised element IDs within the Button section of src/docs to use the useGeneratedHtmlId utility function * Revised element IDs within the Collapsible Nav section of src/docs to use the useGeneratedHtmlId utility function * Revised element IDs within the Context Menu section of src/docs to use the useGeneratedHtmlId utility function * Revisions from PR * Revised element IDs within the Keypad and Tabs sections of src/docs to use the useGeneratedHtmlId utility function
Summary
Updates any static HTML element IDs inside of EUI documentation with IDs generated by the
useGeneratedHtmlId
utility hook andhtmlIdGenerator()()
utility function. This change is based on Issue #4774 where it was reported that including multiple copies of the same code snippet can cause duplicate ID errors. While static IDs were removed, the existing generated IDs were standardized across relevant files.Page-by-page review of the docs revealed that there are about 80 instances of HTML element IDs in the docs. Here is a document defining the pages and components affected by this change.
This PR is to handle generated ID changes within the Nav section of the docs
Before
After
Note
This started in PR 5114 and after team input, I'll be creating smaller PRs for each major section of the docs.
Checklist
Check against all themes for compatibility in both light and dark modesChecked in mobileChecked in Chrome, Safari, Edge, and FirefoxAdded or updated jest testsA changelog entry exists and is marked appropriately