search ui: add copy path button to search results#42721
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 49551e9...591bcb1.
|
500b42d to
56efd97
Compare
rvantonder
left a comment
There was a problem hiding this comment.
Yay! I actually spiked this and have some context. I abandoned things after I realized it would be best to factor out and share the CopyPathAction component first 😄
Show a "copy path" button next to paths in path, content and symbol results.
Side thought: I think including repo paths for repo results is useful and probably easy to include as well?
There was a problem hiding this comment.
nit: how about just an opaque value : string type to represent the copied value? Since we may pass in a repoPath from the RepoRevisionContainer...
We can align that possibility with the component name by renaming CopyPathAction -> CopyAction or CopyPathAction?
There was a problem hiding this comment.
That would also require (in principle) making the tooltip and aria-label props, since it would now be a generic button. I think I'll keep it specifically as a "copy path" button for now, and we can look into making it more generic next time we need a copy button in the app. Since the "copy repo" action is ambiguous, I'll punt that for now as well.
What would we copy here, the repo name without |
56efd97 to
cf591d6
Compare
This reverts commit 75efbc9.
Stacked on #42631
Show a "copy path" button next to paths in path, content and symbol results. The button is only shown when hovering or focusing the result.
Test plan
Manual and visual tests
App preview:
Check out the client app preview documentation to learn more.