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

Itemviews basetreeview cleanup #2464

Merged
merged 9 commits into from May 12, 2024

Conversation

zas
Copy link
Collaborator

@zas zas commented May 11, 2024

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

  • JIRA ticket (optional): PICARD-XXX

Solution

Action

Additional actions required:

  • Update Picard documentation (please include a reference to this PR)
  • Other (please specify below)

@zas zas requested a review from phw May 11, 2024 11:50
Copy link
Member

@phw phw left a comment

Choose a reason for hiding this comment

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

I noticed that the menu now breaks if there are no other versions other than the selected one. The previous implementation still showed the submenu, which I think works better.

Also if we limit the number of loaded results we should somehow still make sure that the list includes the currently selected release. It can happen that this is not the case if the total count exceeds the request limit and the current release is outside the returned result. Maybe we can inject the current release from already loaded release data?

I think the limit of 40 is still too much:

grafik

Maybe better use 20 only?

picard/releasegroup.py Outdated Show resolved Hide resolved
picard/const/defaults.py Outdated Show resolved Hide resolved
picard/ui/itemviews.py Outdated Show resolved Hide resolved
picard/ui/itemviews.py Show resolved Hide resolved
@zas
Copy link
Collaborator Author

zas commented May 12, 2024

I noticed that the menu now breaks if there are no other versions other than the selected one. The previous implementation still showed the submenu, which I think works better.

What do you mean by "it breaks"? It should be disabled (as there's no other versions).

Maybe we can inject the current release from already loaded release data?

Yes, that would be the best option, since we don't know if the currently selected will be or not in retrieved limited list of releases.
To be honest, I completely overlooked this point.

I think the limit of 40 is still too much:

This is why I added a default value, my idea is to add an option to make it configurable (using this default value), because it is very dependent on the graphical environment (size of fonts, screen resolution, etc.).

@zas
Copy link
Collaborator Author

zas commented May 12, 2024

@phw: I'll remove last commit from this PR, since it will require much more work and it's more than refactoring.
So please review up to 286bff9

@zas zas force-pushed the itemviews_basetreeview_cleanup branch from f97691c to b83c0e3 Compare May 12, 2024 13:00
@zas zas requested a review from phw May 12, 2024 13:00
@zas zas marked this pull request as ready for review May 12, 2024 13:07
Copy link
Member

@phw phw left a comment

Choose a reason for hiding this comment

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

LGTM

@zas zas merged commit 5bb313a into metabrainz:master May 12, 2024
45 checks passed
@zas zas deleted the itemviews_basetreeview_cleanup branch May 12, 2024 18:38
@zas zas mentioned this pull request May 12, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants