Open DRYmag opened 2 months ago
Same problem here.
As a temporary workaround, I defined an id manually in my stories.
const meta: Meta<ButtonComponent> = {
title: 'Example/Button with an "é" accent',
id: 'Example/Button with an eacute', // <---
// ...
}
@vanessayuenn I want to work on this issue, can it be assigned to me?
I also noticed this change in behavior when I upgraded a project from Storybook v7 to v8.
This PR introduced an additional piece of information to the story wrapper component's selector: a story UID as an attribute (STORY_UID_ATTRIBUTE).
This attribute could contain accents (derived from meta & story names) but Angular is unable to handle components that have selectors with accented attributes e.g. app-component[spécial-character]
.
Filtering the characters of this attribute does solve the problem (I changed the source in my node_modules to quickly verify).
(The targetSelector
was somewhat similiarly already filtered in case it contained forbidden characters)
Describe the bug
If accent are used in Meta's title, the doc page is broken, stories can't be retrieve from partial url.
If the title is :
'Example/Button with an "é" accent'
, I have the error :Error: NG05104: The selector "-accent--primary--primary-inner-1" did not match any elements. Find more at https://angular.dev/errors/NG05104
.Reproduction link
https://stackblitz.com/edit/github-uxwf7j?file=src%2Fstories%2Fbutton.stories.ts&preset=node
Reproduction steps
System
Additional context
I use on my project the version 8.3.0 but I also reproduce on stackblitz with the version 8.4.0-aplha.