-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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(html): link from attachment step to attachment #33267
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
demo: Screen.Recording.2024-10-24.at.14.40.25.mov |
This comment has been minimized.
This comment has been minimized.
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.
A screenshot of some sorts would be nice to see.
<span style={{ float: 'right' }}>{msToString(step.duration)}</span> | ||
{attachmentName && <a style={{ float: 'right' }} title='link to attachment' href={'#' + componentID(params => params.set('attachment', attachmentName))} onClick={(evt) => { evt.stopPropagation(); }}>{icons.attachment()}</a>} |
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.
Does this rely on the browser to automatically scroll to the anchor? How does that work together with the router? I am confused.
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, that's how it works. Didn't even know we had a router until now - i'll see if I can switch this to our Link
component.
I figured using the anchor to target an element is the most browser-standards way of making this work. But I can also change it to use scrollIntoView
if you'd prefer that.
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.
#33295 is a refactoring that allows us to use one scrollIntoView
implementation for all attachments. It makes this implementation a lot easier.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"1 failed 1 flaky36816 passed, 678 skipped Merge workflow run. |
Similar to #33265. Adds a link from the attachment step to the attachment view.