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 (Display Section) #5270

Merged

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 Display 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

@kibanamachine
Copy link

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

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.

🙌

@breehall breehall merged commit 684b02d into elastic:master Oct 15, 2021
ym pushed a commit to ym/eui that referenced this pull request Oct 29, 2021
elastic#5270)

* Update NPM version

* Revised element IDs within the Card section of src/docs to use the IDs useGeneratedHtmlId utility function

* Revised element IDs within the List Group section of src/docs to use the IDs useGeneratedHtmlId utility function

* Revised element IDs within the Notification Event section of src/docs to use the IDs useGeneratedHtmlId utility function

* Revised element IDs within the Tooltip section of src/docs to use the IDs useGeneratedHtmlId utility function

* Delete package-lock.json

* Update package.json

* Update package.json

* Update yarn.lock

* Revised element IDs within the Tooltip section of src/docs to use the IDs useGeneratedHtmlId utility function
@breehall breehall deleted the breehall-htmlIdGenerator_docs_display 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.

3 participants