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

Cleaner settings #67

Open
abisammy opened this issue Jun 16, 2023 · 13 comments
Open

Cleaner settings #67

abisammy opened this issue Jun 16, 2023 · 13 comments

Comments

@abisammy
Copy link
Contributor

abisammy commented Jun 16, 2023

I think this should wait until we remove compatibility with gnome 40 (#62) however I think there are a couple things we can improve in the settings page.

  1. As mentioned by @Moon-0xff make it less spread sheet like and add sliders and different form of input (Add sliders #63)
  2. Add more interactive blacklist inputs (Weird valid regex #61 (comment))
  3. Reduce repeteaded code e.g in prefs.js:
settings.reset('left-click-action');
settings.reset('middle-click-action');
settings.reset('right-click-action');
settings.reset('scroll-action');
settings.reset('thumb-forward-action');
settings.reset('thumb-backward-action');
settings.reset('volume-control-scheme');
  1. Reorganise settings page tabs e.g:
  • Panel
  • Label
  • Icon
  • Behaviour
  • Filters
  • Control
    (maybe thats too many tabs)
  1. Merge some settings, or disable or hide settings if they shouldn't be available (for example if the user disables the source icon, they shouldn't be able to change the settings for the album art, this may confuse them)

I'm happy to work on this, but as mentioned above, waiting until we just have to worry about gnome 40 might be best.

@abisammy abisammy mentioned this issue Jun 16, 2023
@Moon-0xff
Copy link
Owner

Moon-0xff commented Jun 16, 2023

I really don't know what to change or add to the settings, I mostly want to experiment, see what works, what doesn't.

I suppose the best guideline we can refer to is GNOME's human interface, but a different approach might be best (don't know, and haven't read it).

@Batwam
Copy link
Collaborator

Batwam commented Jun 17, 2023

Probably a bit controversial but, if you really want to modernise the settings panel, it would be worth considering going straight to libAdwaita. It's pretty neat and, thanks to the various generic function we created to add the various widgets types, should be relatively easy to update.

It would cut compatibility to gnome 42+ but even Debian Stable is at gnome 43 these days... Ubuntu 22.04 and its derivatives would be on Gnome 42.

See guidance here: https://gjs.guide/extensions/development/preferences.html#preferences-window

@Moon-0xff
Copy link
Owner

It might not be controversial at all, I've been looking at repology and there's few distributions using a version lower than 42.

I think the most prominent one is OpenSUSE Leap stuck at 41.

@Batwam
Copy link
Collaborator

Batwam commented Jun 21, 2023

Just saw the release of OpenSuse Leap 15.5 and thought "ah ah, one less hurdle", until I realised that it still uses Gnome 41 🫢

I don't really know a lot of people using OpenSuse anyway and with 1200 active users for this extension, there shouldn't be too many people affected!

@Moon-0xff
Copy link
Owner

Moon-0xff commented Aug 17, 2023

I made a quick patch to test how the prefs look and behave with an adwaita base widget.

@Batwam
Copy link
Collaborator

Batwam commented Aug 17, 2023

That was quick! Will you be creating a new branch for this?

@Moon-0xff
Copy link
Owner

I opened a new branch locally but it looks like it isn't such a big task to convert the code to adwaita. I might just do a single commit to main.

For sure I will share something tomorrow.

@Moon-0xff
Copy link
Owner

Moon-0xff commented Aug 17, 2023

Perhaps I'm done already.
One thing that bothers me though is that all pages have a different "border width".

@Moon-0xff
Copy link
Owner

Moon-0xff commented Aug 17, 2023

I pushed the commit to main now.
Of course this is only the first step if we want to change or redo the preferences window.

@Batwam
Copy link
Collaborator

Batwam commented Sep 3, 2023

See PR #75 for a more modern look using PreferencesGroup and ActionRow. Let me know what you think.

@abisammy
Copy link
Contributor Author

abisammy commented Sep 7, 2023

Looks good!

@Moon-0xff
Copy link
Owner

#76 has been merged and alongside it I pushed an small commit to main to make the filters page of prefs more consistent (is supposed to be a temporary change though).

It's a good time to reassess the list on the opening comment:

  1. As mentioned by @Moon-0xff make it less spread sheet like and add sliders and different form of input (Add sliders #63)

Structure-wise it's still like a spreadsheet. But the Adwaita style doesn't give it a flat, boxy appearance like Gtk.Notebook did.
I think we can check off this item of the list.

  1. Add more interactive blacklist inputs (Weird valid regex #61 (comment))

Pending.

  1. Reduce repeteaded code e.g in prefs.js

Removed the repeated code of the example on #76. The main function of prefs.js looks very well now.

  1. Reorganise settings page tabs

I think the number of tabs we currently have is good.

  1. Merge some settings, or disable or hide settings if they shouldn't be available (for example if the user disables the source icon, they shouldn't be able to change the settings for the album art, this may confuse them)

I prefer to 'disable' the settings instead of hiding them, like the double-click settings.
Some settings could be merged, like 'Hide when paused' with 'Hide when paused delay', but I don't think it's a better approach.
I want to remove the 'Ignore all sources except allowed ones', it isn't a useful setting.

@Batwam
Copy link
Collaborator

Batwam commented Sep 22, 2023

I think that the changes made to the filters page are good. To be honest, I don't have much in these fields so I don't personally need them to take the full width.

for item 3, please see #78, another 60+ lines of code gone :-)

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

No branches or pull requests

3 participants