-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(debugger-modal): Make 'debug ID' clickable and link to settings #92714
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
feat(debugger-modal): Make 'debug ID' clickable and link to settings #92714
Conversation
…ug-ids-in-debugger-modal
| to={{ | ||
| pathname: `/settings/projects/${projectSlug}/source-maps/`, | ||
| query: { | ||
| query: debugId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just do something like debugId! here to get rid of the unnecessary case above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can. but I usually avoid the usage of !
| aria-label={t('View source map Debug ID %(debugId)s in project settings', { | ||
| debugId, | ||
| })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aria-label={t('View source map Debug ID %(debugId)s in project settings', { | |
| debugId, | |
| })} | |
| aria-label={t('View source map Debug ID %(debugId)s in project settings', { | |
| debugId, | |
| })} |
can we just use tct here or is t preferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to always have a string for aria-labels, and tct returns a React Node
| )} | ||
| <DebugIdMismatchMessage | ||
| projectSlug={projectSlug} | ||
| debugId={sourceResolutionResults.stackFrameDebugId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add sourceResolutionResults.stackFrameDebugId to the if and make debugId non-nullable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to ensure this part of the code always renders, even if debugID is null - which shouldn't happen, but just in case. That's why we need to fix the types.
| debugId: string | null; | ||
| projectSlug?: string; | ||
| }) { | ||
| // At this point debugId is always defined. The types need to be fixed | ||
| if (!debugId) { | ||
| return ( | ||
| <Fragment> | ||
| {t( | ||
| "You already uploaded artifacts with Debug IDs but none of the uploaded source files had a Debug ID matching this stack frame's Debug ID" | ||
| )} | ||
| </Fragment> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| debugId: string | null; | |
| projectSlug?: string; | |
| }) { | |
| // At this point debugId is always defined. The types need to be fixed | |
| if (!debugId) { | |
| return ( | |
| <Fragment> | |
| {t( | |
| "You already uploaded artifacts with Debug IDs but none of the uploaded source files had a Debug ID matching this stack frame's Debug ID" | |
| )} | |
| </Fragment> | |
| ); | |
| } | |
| debugId: string; | |
| projectSlug?: string; | |
| }) { |
Preview
Screen.Recording.2025-06-03.at.09.38.45.mov
closes TET-363