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

Added Id Prefix/Suffix plugin #813

Closed
wants to merge 1 commit into from
Closed

Conversation

AlfieJones
Copy link

@AlfieJones AlfieJones commented Jan 5, 2023

Summary

This plugin allows users to pass a prefix / suffix prop for id's. This enables you to have multiple and identical svg's without issue.
A related issue can be found here: #731

The plugin picks up on id's as well as references to id's. For example, when referencing a mask via mask="url(#maskid)

Test plan

I have written unit tests for this plugin. No other testing was done since the changes are only scoped to this new plugin

What's next

I am not aware of how this repo is set up so I'll need help finishing off the integration + writing docs.

@vercel
Copy link

vercel bot commented Jan 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svgr ✅ Ready (Inspect) Visit Preview Jan 5, 2023 at 5:19PM (UTC)

Copy link
Owner

@gregberge gregberge left a comment

Choose a reason for hiding this comment

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

I was thinking about a random property. Also it should prefix only id + links. What is the goal of supporting suffix / prefix.

I am sorry but like that the feature does not solve any problem. I will try to give a concrete spec of what need to be implemented to avoid missed PR.

@AlfieJones
Copy link
Author

There are some use cases where allowing the user to specify the prefix are important, eg if some css styles are done via id's.

Although In the name of simplicity I am happy to rework the plugin to just generate a random prefix for each id

@stale
Copy link

stale bot commented Mar 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 25, 2023
@stale stale bot closed this Apr 2, 2023
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.

2 participants