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

Add a way to hide columns in the download table #8025

Merged
merged 1 commit into from May 15, 2024

Conversation

heldersepu
Copy link
Contributor

@heldersepu heldersepu commented May 11, 2024

This PR adds a simple way to hide columns in the download table

Kazam_screenshot_00000

right clicking in the header header().customContextMenuRequested, will show a small menu
in that menu we have options:

  • allow the users to hide the clicked column header().hideSection(index)
  • restore all hidden columns

@heldersepu heldersepu requested a review from a team as a code owner May 11, 2024 17:47
@heldersepu heldersepu requested review from kozlovsky and removed request for a team May 11, 2024 17:47
Copy link

Hi @heldersepu, thank you for contributing to Tribler! 🚀

This PR was created by an outside collaborator, so some checks were not run for security reasons.
To trigger the full set of checks, any member of the Tribler team can add the label PR: safe to check to the current PR.

Copy link
Collaborator

@kozlovsky kozlovsky left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. While hiding a column can be useful for some users, the way it is implemented has some usability issues:

  • Unexpected Behavior: Double-clicking a column header typically relates to sorting or adjusting the width of the column in many applications. Hiding a column by double-clicking could be counterintuitive for users accustomed to standard UI patterns.

  • Accidental Clicks: Users might accidentally double-click a header, expecting it to sort or adjust, and instead find the column has disappeared. Imagine the Name column disappears after a user accidentally double-clicks it. This could lead to confusion and frustration. It may be hard for a user to understand what has just happened, and it will look like a bug.

  • Lack of Reversibility: The absence of an immediate way to bring back the hidden column without restarting the application is a significant usability issue. Users should have the ability to easily undo the action, ideally through the same interface mechanism used to hide it (e.g., right-click the context menu to show/hide columns).

A more intuitive approach might be to implement a right-click context menu on the column headers. This would not only prevent accidental hiding but also enhance functionality by giving users more control.

@heldersepu heldersepu requested a review from kozlovsky May 14, 2024 12:43
@heldersepu
Copy link
Contributor Author

@kozlovsky right-click context menu added

Copy link
Collaborator

@kozlovsky kozlovsky left a comment

Choose a reason for hiding this comment

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

It looks good, but one fix should be added.

After you apply the fix, can you please squash all commits in the PR branch to make the commit history easier to read?

src/tribler/gui/widgets/downloadspage.py Outdated Show resolved Hide resolved
Co-Authored-By: Alexander Kozlovsky <alexander.kozlovsky@gmail.com>
@heldersepu
Copy link
Contributor Author

After you apply the fix, can you please squash all commits in the PR branch to make the commit history easier to read?

Fix applied, and all commits have been squashed

@heldersepu heldersepu requested a review from kozlovsky May 15, 2024 13:09
Copy link
Collaborator

@kozlovsky kozlovsky left a comment

Choose a reason for hiding this comment

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

Great, thank you for the contribution!

@kozlovsky kozlovsky merged commit 410b72e into Tribler:main May 15, 2024
18 of 20 checks passed
@heldersepu heldersepu deleted the header_hideSection branch May 18, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants