Skip to content

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Dec 8, 2025

Fix story links so that they are compatible with the double URL structure

@JonasBa JonasBa requested review from a team as code owners December 8, 2025 17:19
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 8, 2025
import {useStoriesLoader} from './useStoriesLoader';

export default function Stories() {
export function useStoryParams(): {storyCategory?: StoryCategory; storySlug?: string} {

This comment was marked as outdated.

Fix URL pattern matching to support both customer domain and organization-scoped URL formats:
- Update useStoryParams() regex to match /stories/ anywhere in path
- Update isLandingPage() regex to match paths ending with /stories
- Normalize hero button URLs with organization context

Without these fixes, stories would not load in organization-scoped deployments.
- Remove duplicate 'stories' segment in ESLint error message URLs
- Fix slug generation for root-level shared files to prevent leading slashes

Addresses bot feedback in PR review.
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Nice refactor!

{
children: 'Get Started',
to: '/stories?name=app/styles/colors.mdx',
to: '/stories/foundations/colors',
Copy link
Member

Choose a reason for hiding this comment

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

why are there no trailing / for story urls?

Copy link
Member Author

Choose a reason for hiding this comment

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

The current stories don't use them either, so this isn't a breaking change. That said, I'll open a PR to add support for it separately so that this remains django compat

@JonasBa JonasBa merged commit c565d7b into master Dec 9, 2025
48 checks passed
@JonasBa JonasBa deleted the jb/sentry/stories branch December 9, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants