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

feat(ids): prefix all ids and references with a unique string [KHCP-13216] #391

Merged
merged 21 commits into from
Sep 25, 2024

Conversation

adamdehaven
Copy link
Member

@adamdehaven adamdehaven commented Sep 23, 2024

Summary

Prefix any internal id attributes within the SVG with a unique string, and update the corresponding references accordingly to allow utilizing multiple instances of the same icon on a page while preventing reference conflicts and duplicate id selectors.

Example

On the /{geo}/gateway-manager/{control_plane_id}/configuration page, I can now reference two Azure icons simultaneously with no conflicts from the id attribute(s) or reference(s).

azure icons
image

Above, notice the prefixed ids

∙
∙ This should allow utilizing multiple instances of the same icon on a page while preventing reference conflicts and duplicate id selectors.
@adamdehaven adamdehaven self-assigned this Sep 23, 2024
@adamdehaven adamdehaven marked this pull request as ready for review September 23, 2024 18:46
@adamdehaven adamdehaven requested review from jillztom, portikM and a team as code owners September 23, 2024 18:46
@adamdehaven adamdehaven changed the title feat(ids): prefix all ids and references with a unique string feat(ids): prefix all ids and references with a unique string [KHCP-13216] Sep 23, 2024
@@ -730,6 +730,7 @@ exports[`generate > does not remove icons from the previous build 1`] = `
"InsomniaIcon.vue",
"ItalicIcon.vue",
"KeyboardReturnIcon.vue",
"KongGradientIcon.vue",
Copy link
Member Author

@adamdehaven adamdehaven Sep 24, 2024

Choose a reason for hiding this comment

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

I’m not sure why this entry doesn’t already exist on main 🤔 but explains why the open Renovate PRs are failing.

src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/tests/__snapshots__/AddChartIcon.html Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
Copy link
Contributor

@Justineo Justineo left a comment

Choose a reason for hiding this comment

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

Two last small issues and other changes look good to me.

src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
src/__template__/ComponentTemplate.vue Outdated Show resolved Hide resolved
Copy link
Contributor

@Justineo Justineo left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@adamdehaven adamdehaven merged commit 9ca7461 into main Sep 25, 2024
4 checks passed
@adamdehaven adamdehaven deleted the feat/unique-ids branch September 25, 2024 12:53
kongponents-bot pushed a commit that referenced this pull request Sep 25, 2024
# [1.16.0](v1.15.2...v1.16.0) (2024-09-25)

### Features

* **ids:** prefix all ids and references with a unique string [KHCP-13216] ([#391](#391)) ([9ca7461](9ca7461))
@kongponents-bot
Copy link
Collaborator

🎉 This PR is included in version 1.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants