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

Use uniqueId for recurring title and desc #244

Merged
merged 1 commit into from
Nov 29, 2022

Commits on Nov 28, 2022

  1. Use uniqueId for recurring title and desc

    The current implementation uses `guidFor` this will cache ids and reuse
    them if the same value is passed to `guidFor`, see
    https:/emberjs/ember.js/blob/4e3300bdfe75da14f9714b6b1539dbd1612c5af2/packages/%40ember/-internals/utils/lib/guid.ts#L97
    
    The ids in a HTML document should be unique. However if a `title` or
    `desc` is reused, for example you have a recurring element, then
    `svg-jar` generates ids which match for the recurring element.
    
    This commit uses the `uniqueId` function from the `unique-id` helper
    to generate a unique id regardless of the `svg-jar` `title` or `desc`
    matching previous `svg-jar`.
    
    Unfortunately `uniqueId` is not exported so it is copy and pasted.
    In the future it will be possible to import it, see
    emberjs/ember.js#20165
    
    Fixes evoactivity#243
    mrloop committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    9e68481 View commit details
    Browse the repository at this point in the history