Menu

Patches Welcome #6: A Colon in a Story Name Broke Widgetbook's Entire Canvas
πŸ“°

Patches Welcome #6: A Colon in a Story Name Broke Widgetbook's Entire Canvas

DEV Community: dartΒ·Sagar GhagΒ·8 days ago
#rQU64SSY
#devtodart#devto#dev#path#component
Long article (401 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Stories with a colon in the name don't render on web. You click the story, the canvas stays on "Welcome to Widgetbook", and nothing errors. No crash, no red text. The component just isn't there.

The report

Issue #2059 . A developer had a story named Profile (tap: Accept) . Worked fine on desktop. On web, the canvas stayed blank. Every story without a colon rendered normally.

Why colons break paths on web

Widgetbook builds navigation paths by joining story names with package:path 's p.join . On native platforms, p.join uses POSIX rules. On web, it uses URL rules. That's the trap.

URL path semantics treat a colon as a scheme separator. p.url.join('Folder/Component', 'Profile (tap: Accept)') sees tap: as a URI scheme and drops the parent segment entirely:

p . url . join ( 'Folder/Component' , 'Profile (tap: Accept)' ) ; // β†’ 'Profile (tap: Accept)' ← parent gone

p . posix .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.