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 Static HTML Element IDs Generated IDs (Nav Section) #5224

Merged
merged 26 commits into from
Oct 14, 2021

Conversation

breehall
Copy link
Contributor

Summary

Updates any static HTML element IDs inside of EUI documentation with IDs generated by the useGeneratedHtmlId utility hook and htmlIdGenerator()() 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
With Static IDs

After
Static IDs Removed

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 modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

breehall and others added 25 commits September 15, 2021 14:02
…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
… use 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
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5224/

@breehall breehall marked this pull request as draft September 29, 2021 20:37
@cchaos cchaos removed their request for review October 11, 2021 20:43
@cchaos
Copy link
Contributor

cchaos commented Oct 11, 2021

@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

@thompsongl
Copy link
Contributor

thompsongl commented Oct 12, 2021

Is this ready to review, @breehall, or still in progress?

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5224/

@breehall breehall marked this pull request as ready for review October 12, 2021 16:51
@breehall
Copy link
Contributor Author

@thompsongl yep, this one is now ready for review!

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @breehall!

@breehall breehall merged commit c92914a into elastic:master Oct 14, 2021
ym pushed a commit to ym/eui that referenced this pull request Oct 29, 2021
…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
@breehall breehall deleted the breehall-htmlIdGenerator_docs_nav branch February 7, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants