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

GUI elements for the tagging system #6453

Merged
merged 8 commits into from Oct 18, 2021
Merged

GUI elements for the tagging system #6453

merged 8 commits into from Oct 18, 2021

Conversation

devos50
Copy link
Contributor

@devos50 devos50 commented Oct 15, 2021

This PR contains the GUI elements related to the tagging system, including a dialog to add/remove tags, and changes to the table views.

There are some parts of the GUI code that remain uncovered by the tests. These parts are mostly related to mouse/timer events since they are very hard to test automatically (e.g., on Mac they require accessibility permissions). I tried to come up with a clean way to work around this (for example, by calling mousePressEvent directly), but this would not result in any clean code. Instead, I have tested the uncovered code manually. If you believe that there is code that absolutely needs to be covered, please let me know.

Design decisions behind the GUI elements

  • Since tags are projected to become a core feature of Tribler, we have chosen to increase their visibility in the user interface. Specifically, each row in the GUI will show associated tags. Users can edit a tag by clicking the small pencil. Since tags have a variable length, and since each content item can have a variable number of tags, the height of each content item is now dynamic.

Schermafbeelding 2021-10-15 om 10 18 16

  • Editing tags will show up a dialog. Even though a dialog is not considered best practice by everyone, we preferred a dialog over in-line editing of tags for two reasons. First, a dialog is consistent with the rest of our GUI. Second, we could not think of a layout that would make it easy for users to edit their tags in-line.

Schermafbeelding 2021-10-15 om 10 18 38

  • In the dialog, tags are separated by a space, similar to Stack Overflow. We believe that this is an intuitive way to creating tags. Other separators (such as a comma) would require additional explanation.

@devos50 devos50 force-pushed the tags_gui branch 2 times, most recently from 49f201d to b52cb64 Compare October 15, 2021 14:16
@devos50 devos50 changed the title [DO NOT MERGE] GUI elements for tagging system GUI elements for tagging system Oct 15, 2021
@devos50 devos50 marked this pull request as ready for review October 15, 2021 14:23
@devos50 devos50 requested a review from a team as a code owner October 15, 2021 14:23
@devos50 devos50 requested review from ichorid and drew2a and removed request for a team October 15, 2021 14:23
@drew2a
Copy link
Collaborator

drew2a commented Oct 15, 2021

Suggestion: I propose to reduce "pen" icon size to 80%

image

ichorid
ichorid previously approved these changes Oct 15, 2021
@devos50 devos50 changed the title GUI elements for tagging system GUI elements for the tagging system Oct 15, 2021
Added GUI setting to disable tags

Fixed fetching tag GUI settings

Closing edit tags dialog on ESC press
drew2a
drew2a previously approved these changes Oct 18, 2021
@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@drew2a drew2a merged commit dd7be6e into Tribler:main Oct 18, 2021
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

3 participants