-
Notifications
You must be signed in to change notification settings - Fork 4.9k
chore: move attachment link back to tree item, make it flash yellow #34353
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
Changes from 8 commits
2162ade
2b74e52
269b0bb
b191773
879ba72
13d89e4
299a52e
5dcff8f
b75cf1f
05ca43b
34df343
ef9f0ff
b4d900f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,7 +148,7 @@ export const Workbench: React.FunctionComponent<{ | |
|
|
||
| const revealAttachment = React.useCallback((attachment: AfterActionTraceEventAttachment) => { | ||
| selectPropertiesTab('attachments'); | ||
| setRevealedAttachment(attachment); | ||
| setRevealedAttachment({ ...attachment }); // copy to force re-render | ||
|
||
| }, [selectPropertiesTab]); | ||
|
|
||
| React.useEffect(() => { | ||
|
|
@@ -238,7 +238,7 @@ export const Workbench: React.FunctionComponent<{ | |
| id: 'attachments', | ||
| title: 'Attachments', | ||
| count: attachments.length, | ||
| render: () => <AttachmentsTab model={model} selectedAction={selectedAction} revealedAttachment={revealedAttachment} /> | ||
| render: () => <AttachmentsTab model={model} revealedAttachment={revealedAttachment} /> | ||
| }; | ||
|
|
||
| const tabs: TabbedPaneTabModel[] = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -224,3 +224,16 @@ export function scrollIntoViewIfNeeded(element: Element | undefined) { | |||||
|
|
||||||
| const kControlCodesRe = '\\u0000-\\u0020\\u007f-\\u009f'; | ||||||
| export const kWebLinkRe = new RegExp('(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s' + kControlCodesRe + '"]{2,}[^\\s' + kControlCodesRe + '"\')}\\],:;.!?]', 'ug'); | ||||||
|
|
||||||
| // flash is retriggered whenever the value changes | ||||||
| export function useFlash(flash: any | undefined) { | ||||||
|
||||||
| export function useFlash(flash: any | undefined) { | |
| export function useFlash(idObject?: any) { |
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.
It seems like you can revert this back to be a boolean? I don't see why it should be different now with the yellow flash compared to scrolling into view.
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.
Just like with scrolling into view, we need this to be an ID object so we can retrigger the animation. I think there was a bug with scroll into view before, where it didn't retrigger when clicking the same button twice. But it wasn't as noticeable because you'd have to scroll around between clicking the button.