Skip to content
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

PICARD-319: Add an action toolbar to file browser #543

Closed
wants to merge 7 commits into from

Conversation

samj1912
Copy link
Collaborator

No description provided.

@samj1912
Copy link
Collaborator Author

samj1912 commented Jan 11, 2017

I want to add a couple more buttons to this toolbar

  1. A set home/set starting directory button
  2. A move files here button
  3. Maybe a toggle hidden files button?
  4. Add new folder button?

@zas
Copy link
Collaborator

zas commented Jan 11, 2017

It would be nice to provide a screenshot for such UI changes in the PR description.

else:
directories.append(path)

if len(files):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if files: should be enough.


if len(files):
self.tagger.add_files(files)
if len(directories):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if directories: should be enough

@samj1912
Copy link
Collaborator Author

Screenshot

Screenshot of the same. I plan to add 3 more buttons to that toolbar

@zas
Copy link
Collaborator

zas commented Jan 11, 2017

Screenshot of the same. I plan to add 3 more buttons to that toolbar

Imho this should be discussed, i'm not an UI guy at all, but i have the feeling adding more buttons don't make things easier.
I'll all for changes in the UI. What about creating a thread about this on forums so non-devs can participate ?

mineo
mineo previously requested changes Jan 11, 2017
Copy link
Member

@mineo mineo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds new icons in the user interface that need to interact in some form with the "Show text labels under icons" setting (Advanced -> User Interface).

@samj1912
Copy link
Collaborator Author

samj1912 commented Jan 11, 2017

I modified the code to show text labels under icons, but I don't think that is meant for the filebrowser toolbar.

filebrowser

This is how it looks and I think it kind of defeats the purpose of having a small toolbar. Also the '+' sign is intuitive enough and I have added tooltips for more info.

@mineo
Copy link
Member

mineo commented Jan 12, 2017

The + sign is intuitive for the single add-items-to-picard function, but if more buttons are going to be added, not all of them are going to have an obvious meaning. We should take this into consideration because either more buttons are going to be added or the Add one is going to stay the only one.
In the latter case, having it just say "Add" and use the whole width of the toolbar instead of being a lonely icon on the left might be preferrable.

@samj1912
Copy link
Collaborator Author

I am thinking of "Add new folder" button. Which I think will be intuitive as it is used a lot. and a move files here icon like this? move files

if os.path.isfile(path):
files.append(path)
else:
directories.append(path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add directories directly here ?

I understand why you are building a list of files to pass to tagger.add_files(), but you may skip this for directories and just do self.tagger.add_directory(path) here.

paths = []
for index in self.file_browser.selectedIndexes():
paths.append(self.file_browser.model.filePath(index))
return paths
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A list comprehension is prolly faster:

return [self.file_browser.model.filePath(index) for index in self.file_browser.selectedIndexes()]

@samj1912
Copy link
Collaborator Author

image

Updated look for add items button. I think we can add other buttons after more discussion.

@samj1912
Copy link
Collaborator Author

This PR is complete from my side pending any reviews :)

@mineo
Copy link
Member

mineo commented Jan 15, 2017

To be honest, I still can't get myself to like that toolbar very much :( On your screenshot it looks really good, but on a higher resolution the toolbar is 70%+ empty whitespace. Maybe this is just because there's only one button now there at the moment...

Since I don't have any other suggestions, I'll leave it to zas to decide about this.

@mineo mineo dismissed their stale review January 15, 2017 11:28

See comments

@zas
Copy link
Collaborator

zas commented Jan 15, 2017

To be honest, I still can't get myself to like that toolbar very much :( On your screenshot it looks really good, but on a higher resolution the toolbar is 70%+ empty whitespace. Maybe this is just because there's only one button now there at the moment...

I have the same feeling. I think we can do better, not sure yet how.

@mineo
Copy link
Member

mineo commented Apr 17, 2017

Let's postpone this until we have more operations that we'd like to put into that toolbar.

@mineo mineo closed this Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants