-
Notifications
You must be signed in to change notification settings - Fork 44
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
Minor UI changes: Filename only, tooltip, and scrolling #73
Open
JedBurke
wants to merge
10
commits into
mwh:master
Choose a base branch
from
JedBurke:upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3995935
Add option to only show the basename
JedBurke 2c6588c
Show a tooltip of the file's name or path when hovering over the file
JedBurke ccfe8b0
Add scrolling behavior to accommodate many files
JedBurke 0293799
Align -f option in help text
JedBurke f9a273f
Document the -f/--name-only option
JedBurke 14ef890
Set the default size for the top-level window
JedBurke 5b48527
Use the file path to get the pixel buffer
JedBurke 9c80b7e
Add `tooltip` parameter to the `add_button` function
JedBurke 31a53a2
Set the main window's minimum size to the inner container
JedBurke d59a6f5
Merge branch 'master' of https://github.com/mwh/dragon
JedBurke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a good idea. I'd even argue that with the tooltip the "name only" option could become the default behavior, perhaps even the only one, but the option is cheap to implement anyway.
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.
If you feel like it can become the default, that's good. The option was included as not to cause disruptions for longtime users. So it can be removed if unnecessary.
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 the ideal default is probably something like "match name given on command line, if any", so that e.g.
dragon */index.html
preserves the relative path to distinguish items with the same basename, but wouldn't convert everything to absolute paths the way it does now; the architecture makes that tricky currently, I think. There could then be options for basename-only (this commit) and absolute paths-only (current default). This change is a good step for common cases now and it would be a reasonable default for as long as we don't have that middle point. The tooltip makes it possible to distinguish them in the cases where it matters.Perhaps
-f
like this,-F
/--full-path
for the existing default, and switch by default to the-f
behaviour for the moment?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 have made it do something like that, at least when the path is within the current directory. It could probably be smarter, but it's a start. Thanks for the PR! These were useful. The tooltip is a great idea.
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.
Adapting to the working directory is a clever compromise and functions well.
When showing the filename only, the tooltip doesn't have access to the full path. Instead of setting the tooltip in
add_file_button
andadd_uri_button
, I've added a parameter toadd_button
to be able to set the tooltip to the path. Please see if it's an acceptable change 9c80b7eWhen you say smarter, do you mean that it should show the basename and then resolve duplicates by showing the file's parent and its basename?
Consider the working directory
/path/to/file/project-1
You're welcome