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 ability to toggle alternating row colors in tables #21123

Merged

Conversation

skomerko
Copy link
Contributor

This PR introduces ability to control alt row coloring in tables.

It is no longer necessary to handle files table in any special way - n-th child selector with modern [of <selector>] syntax covers all cases. Currently web seed table is not handled at all but everything will sort itself out after #21055 is merged.

Included tiny fix to achieve better visibility of unread rss articles. It was hard to make out their titles with alt coloring off and dark theme on.


I read that using MooTools is discouraged so I decided to use vanilla JS as much as possible (even for element lookups) - is this ok now and going forward?

@luzpaz luzpaz added the WebUI WebUI-related issues/changes label Jul 28, 2024
@Chocobo1 Chocobo1 requested a review from a team July 29, 2024 08:20
@thalieht

This comment was marked as outdated.

@skomerko
Copy link
Contributor Author

skomerko commented Jul 29, 2024

  1. It seems the effect of "Use alternating colors" option is reversed (it's on when it's off)
  2. I don't know if the colors of this option have some designated name so i'll try to describe the problem i see:
    In GUI and WebUI, with this option enabled, the first row of a table doesn't have a colored background. When this setting is disabled in GUI, this is the color of the background for all rows but here, all rows have the color of the 2nd row. Is that intentional?
  1. Hmm, this shouldn't be happening. By default alt coloring is enabled, so I opened fresh WebUI in private mode and it was on, then I unticked the setting, saved changes and it was off after page reload. Could you help me pinpoint the problem?? One thing to note here is that in this case there's no setting sync between webui and desktop.
  2. Currently, GUI/WebUI colors even rows and in the incoming change I unintentionally switched to odd ones (in the WebUI).
    But looking at it now I would like to keep this change, because first row and header above it are nicely differentiated from each other:
    image

Not sure if you agree, but I can always bring back old behavior easily if that's the decision.

@thalieht
Copy link
Contributor

Damn i messed up my testing again... none of the things i mentioned happen actually, sorry. I don't see any problems.

Currently, GUI/WebUI colors even rows and in the incoming change I unintentionally switched to odd ones

Not what i meant but doesn't matter anyway. On topic: I have no preference on this, both look OK to me.

@Chocobo1 Chocobo1 added this to the 5.1 milestone Aug 2, 2024
@Chocobo1 Chocobo1 merged commit 49507ad into qbittorrent:master Aug 4, 2024
14 checks passed
@Chocobo1
Copy link
Member

Chocobo1 commented Aug 4, 2024

@skomerko
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants