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

FEAT(client): Settings Profiles #6681

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Hartmnt
Copy link
Member

@Hartmnt Hartmnt commented Jan 5, 2025

This is very much WIP and I need to add a proper description, but it is functional on a fundamental level.

Feedback for both UI and settings refactor welcome

sneak_peak.mp4

Closes #1264

@Hartmnt Hartmnt added client feature-request This issue or PR deals with a new feature labels Jan 5, 2025
Copy link
Member

@Krzmbrzl Krzmbrzl left a comment

Choose a reason for hiding this comment

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

For reference, this implements #1264

One thing we need to think about/discuss is whether we believe whether all settings are created equal or whether there might be some settings that should be profile-dependent and some which are global-independent.
In the latter category, one might have things like the ask-on-quit setting.

If we believe that some settings should be independent of profiles, then the entire feature would become much more complex as this dependence would also have to be reflected in the UI in order to not make users guess whether a given setting depends on the profile or not 👀

@@ -401,6 +446,8 @@ std::size_t qHash(const ChannelTarget &target) {
return qHash(target.channelID);
}

const QString Profiles::s_default_profile_name = QLatin1String("default");
Copy link
Member

Choose a reason for hiding this comment

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

Why not use std::string for this?

Comment on lines +192 to +193
QString activeProfileName = s_default_profile_name;
QMap< QString, Settings > allProfiles = {};
Copy link
Member

Choose a reason for hiding this comment

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

Where (reasonably) possible new code should prefer the use of std containers

@Hartmnt
Copy link
Member Author

Hartmnt commented Jan 7, 2025

One thing we need to think about/discuss is whether we believe whether all settings are created equal or whether there might be some settings that should be profile-dependent and some which are global-independent.
In the latter category, one might have things like the ask-on-quit setting.

I am 100% in favor of "all settings are created equal".

  1. The implementation complexity (and maintainability) would be a nightmare. We would need 2 settings versions and keep track of global vs non-global ourselves.
  2. The user should decide what settings are important per profile. Maybe they want Ask-on-Quit profile specific 😆 And I imagine the outcry for "I can't set this setting per profile" will be much harder than "why don't you save this globally?".
  3. The "Add" will actually duplicate the current profile, which should make it pretty easy to deal with this UX-wise from the user side. And in the worst case where you have to change every profile for a single setting: I don't see the benefit in making this so much more complex to implement just because the user will have to set like 5 checkboxes in that scenario...

@Krzmbrzl One thing that I am unsure about as of yet is "settings_version". That should be included in the individual profiles, but when we leave it out of the JSON root, we might - in rare, error caused circumstances - have users that might not be able to start Mumble... I/We have to come up with a nice solution for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client feature-request This issue or PR deals with a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Audio profiles
2 participants