-
Notifications
You must be signed in to change notification settings - Fork 77
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
update(ErrorMessage): Add trace ID link #361
Conversation
openInNewWindow | ||
href={Core.settings.traceURL.replace('{{id}}', traceID)} | ||
> | ||
<T k="lunar.trace.viewDetails" phrase="View trace details" /> |
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.
Do I need to do anything with this new phrase?
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.
Yes you need to add it internally like our other apps.
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.
Done
@@ -25,11 +25,6 @@ export function getErrorMessage(error: string | ErrorType, includeCode: boolean | |||
return message || ''; | |||
} | |||
|
|||
// istanbul ignore next | |||
function createRedirectURL(id: string, url?: string) { |
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.
Seemed unnecessary to generate the URL on-the-fly on a Button's onClick
when we can just set an href
Size Changes
View raw build statsPrevious (master){
"apollo": {
"esm": 10832,
"lib": 14147
},
"app-shell": {
"esm": 12906,
"lib": 19874
},
"composer": {
"esm": 68247,
"lib": 101805
},
"core": {
"esm": 563646,
"lib": 706618
},
"forms": {
"esm": 35672,
"lib": 47577
},
"icons": {
"esm": 156355,
"lib": 205626
},
"layouts": {
"esm": 15298,
"lib": 20770
},
"metrics": {
"esm": 5467,
"lib": 7729
},
"test-utils": {
"esm": 4279,
"lib": 5937
}
} Current{
"apollo": {
"esm": 10832,
"lib": 14147
},
"app-shell": {
"esm": 12906,
"lib": 19874
},
"composer": {
"esm": 68247,
"lib": 101805
},
"core": {
"esm": 563903,
"lib": 706970
},
"forms": {
"esm": 35672,
"lib": 47577
},
"icons": {
"esm": 156355,
"lib": 205626
},
"layouts": {
"esm": 15298,
"lib": 20770
},
"metrics": {
"esm": 5467,
"lib": 7729
},
"test-utils": {
"esm": 4279,
"lib": 5937
}
} |
<T k="lunar.error.viewDetails" phrase="View error details" /> | ||
</MutedButton> | ||
</Spacing> | ||
)} | ||
|
||
{traceID && ( | ||
<Spacing top={1}> |
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.
Buttons shouldn't be stacked. Wrap with ButtonGroup
instead.
{traceID && ( | ||
<Spacing top={1}> | ||
<MutedButton | ||
inverted |
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 you also make them small
.
@milesj feedback addressed |
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.
Nice!
to: @milesj @stefhatcher @hayes @alecklandgraf
Description
traceURL
settingtrace_id
property fromErrorMessage
for link for more info on that trace IDButton
to aLink
(no need for it to be a button that I can think of - don't need to generate the URL "on the fly" when the button is clicked, we can use a plain anchor tag)Motivation and Context
Allow better debugging when a
trace_id
is present in anError
passed toErrorMessage
component.Testing
Added tests. Ran
sg
locally and verified.Screenshots
Checklist