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

[Feature] Tree view > Expand All || See differences between Standard and Strict #158

Open
j1elo opened this issue Aug 12, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@j1elo
Copy link

j1elo commented Aug 12, 2022

privacy.sexy is amazing. Thank you for coming up with this idea and implementing it! This is the wet dream of the sysadmin-wannabe that we all have within ourselves :-D

Problem description

I want to alternate between "Standard" and "Strict", to see the differences. But for that, I'd need to be able to expand all nodes first. An "expand all" feature (either a GUI element or a keyboard shortcut) would make this easy and quick.

This might be an XY problem, though. What I really wanted is to visualize the differences between "Standard" and "Strict", in a way that it's easy to visually spot the differences.

Proposed solution

A GUI button that shows in the tree views to expand all nodes.

Or (going the XY problem way), a way to easily spot the difference between modes? To be honest what I'd really would like personally, is something like what Meld would show if we were comparing a text file with all Standard option titles on the left, and all Strict titles on the right. But yeah, that might be a bit far fetched :-)

Alternatives considered

Opening all nodes one by one in the tree is always an option, but quite tiring.

Additional information

@j1elo j1elo added the enhancement New feature or request label Aug 12, 2022
@undergroundwires
Copy link
Owner

Thank you for your nice words and solid suggestion. This makes complete sense and I think we should have this. What I can recommend you is as temporary solution is to a) parse the collection files, b) generate all scripts and run git diff or diff (UNIX) command to see the differences.

Here are some other related ideas:

Flat mode

I think one interesting feature would be flat mode that we discussed in #50. This way you can just select "Flat" in the top menu and list all the scripts in a big list. I want to get this done and it has been in my TODO list for a while but I don't know when I will prioritize it. My focus is to soon get Linux support and then import/export along with better machine readable output for all scripts. Machine readable output would help you to parse and see the difference as well.

Indicators for every script

It does not really solve the "seeing all scripts at once" issue but I've been playing with the idea of having an indicator before each script name to show their recommendation level. It would make it easier to go through every script without toggling the recommendation settings. Something like:

  • 👍️ Configure OS to increase my privacy
  • 👍️ Increase privacy for Firefox
  • ❌ Reduce security to increase privacy
  • ❌ Uninstall Edge to increase privacy
  • ⚠️ Break WiFi settings but increase my privacy
  • ⚠️ Break something else but increase my privacy

Where 👍️ would mean recommended, ⚠️ is strict and something like ❌/☣️ or 💀 to represent unrecommended scripts.

Toggle all after the tree component is rewritten

I know that it does not solve "expand all" function though. privacy.sexy now uses LiqourTree which is dead and unmaintained (amsik/liquor-tree#244). It needs to go to be able to migrate from Vue 2 to Vue 3. I don't want to have third party dependency for tree component anymore so I'll need to rewrite the tree completely or would love to get a PR for it. Once the tree is rewritten we can than improve it with shortcut support and expand all functionality, right now it's not worth to code it for something that will go away.

undergroundwires added a commit that referenced this issue Sep 9, 2023
Key highlights:

- Written from scratch to cater specifically to privacy.sexy's
  needs and requirements.
- The visual look mimics the previous component with minimal changes,
  but its internal code is completely rewritten.
- Lays groundwork for future functionalities like the "expand all"
  button a flat view mode as discussed in #158.
- Facilitates the transition to Vue 3 by omitting the Vue 2.0 dependent
  `liquour-tree` as part of #230.

Improvements and features:

- Caching for quicker node queries.
- Gradual rendering of nodes that introduces a noticable boost in
  performance, particularly during search/filtering.
  - `TreeView` solely governs the check states of branch nodes.

Changes:

- Keyboard interactions now alter the background color to highlight the
  focused item. Previously, it was changing the color of the text.
- Better state management with clear separation of concerns:
  - `TreeView` exclusively manages indeterminate states.
  - `TreeView` solely governs the check states of branch nodes.
  - Introduce transaction pattern to update state in batches to minimize
    amount of events handled.
- Improve keyboard focus, style background instead of foreground. Use
  hover/touch color on keyboard focus.
- `SelectableTree` has been removed. Instead, `TreeView` is now directly
  integrated with `ScriptsTree`.
- `ScriptsTree` has been refactored to incorporate hooks for clearer
  code and separation of duties.
- Adopt Vue-idiomatic bindings instead of keeping a reference of the
  tree component.
- Simplify and change filter event management.
- Abandon global styles in favor of class-scoped styles.
- Use global mixins with descriptive names to clarify indended
  functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants