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

webui: Add Views panel #2535

Merged
merged 4 commits into from
Jul 22, 2023
Merged

webui: Add Views panel #2535

merged 4 commits into from
Jul 22, 2023

Conversation

TrimmingFool
Copy link
Contributor

The set of selected labels determines which torrents the user will see. If a user is interested in switching to another view, the labels in State,Labels,Search and Trackers have to be clicked manually.

In order to make switching between views more convenient this PR introduces a Views panel which allows the selection of user-defined views:
views-panel

Clicking on a view will select all its labels automatically.
A new view can be saved by pressing the [+] button which is only enabled if the view does not exist, already.
Additionally, if the current (manually selected) view includes a saved view, the corresponding row will appear active (similar to when it is clicked).

  • There are context menu entries to control the rows in the Views panel:
    • Rename View, Move View -> To top, Up, Down, To bottom, Remove active views
  • The circular icon before each row contains the first letter of the view name
  • An option in Settings > Format allows to hide the Views panel

Code

@stickz
Copy link
Collaborator

stickz commented Jul 17, 2023

Could we make a new object for panels? The webui object is getting very polluted. Code review is becoming increasingly difficult.

@TrimmingFool
Copy link
Contributor Author

Could we make a new object for panels?

This sounds like a good idea. I could move the panel methods out of webui.js and into panels.js. However, theWebUI.updateLabels would then belong into panel.js, as well. This would require adjusting some plugins. I think, it might be easier to do this refactoring in a different PR. Let me know, if you prefer it being part of this PR.

@stickz
Copy link
Collaborator

stickz commented Jul 22, 2023

Okay, I will merge this pull request into develop. I was going to freeze for version 4.2, but I think it's beneficial to keep going.

It's probably a better idea to refactor into panel.js in a separate pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants