atom / status-bar Public
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
Make shift clicks on the currentPath element copy the relative path #118
Conversation
| clickHandler = => | ||
| text = @getActiveItemCopyText() | ||
| clickHandler = (event) => | ||
| altClick = if process.platform is 'darwin' then event.metaKey else event.ctrlKey |
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.
Why does this need to differ by platform? Can't you just make it Ctrl for all platforms?
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 could, but I'd rather not from a UX perspective -- control clicking on OS X is a lot less natural than Command clicking; this is the pattern that Facebook's hyperclick package uses, too!
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 think it's fine the way it is right now - cmd is equivalent to ctrl on Windows/Linux.
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.
cf #104 (comment) for my feelings on it
|
@awans This looks pretty good - I think |
| @copiedTooltip = atom.tooltips.add this, | ||
| title: "Copied: #{text}" | ||
| trigger: 'click' | ||
| delay: | ||
| show: 0 | ||
|
|
||
| getActiveItemCopyText: -> | ||
| getActiveItemCopyText: (isShiftClick) -> |
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 rename this from isShiftClick to useRelativePath for clarity?
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'll change the name on my end
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.
sgtm, and thanks!
Make shift clicks on the currentPath element copy the relative path
|
Thanks! |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Implement ctrl/cmd click -> copy relative path as discussed in this issue.
I've added the most obvious test, but let me know if there are others you'd like me to take a pass at..
Please also let me know if I've missed any subtle issues!
This is my first:
so I'd love to learn :)