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 option to delete user profile in Profile Selector (adds #38243) #58763

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

JuhoErvasti
Copy link
Contributor

@JuhoErvasti JuhoErvasti commented Sep 16, 2024

This is my implementation of this somewhat old feature request #38243 to be able to remove user profiles in the GUI without having to manually delete the folder.

  • I figured that a logical place to add this feature is the recently added QgsUserProfileSelectionDialog.

  • Since not everyone has the selection dialog enabled I thought I'd add a button to open the Selector from Settings > User Profiles

image

  • I've also disabled deleting the default profile, although I'm not sure it's necessary

If this is at all an okay direction for the Profile Selector, personally I'd like for it to have even more features:

  • Being able to select and delete multiple profiles
  • Being able to add profiles without immediately starting a new process
  • Being able to rename profiles
  • Maybe being able to reset a profile?
  • Maybe being able to edit the profile icons?

- Ask to confirm deletion
- Refresh list of profiles after deletion
- Disallow deleting default profile (not sure if necessary?)
- Check for errors
- I figure this is better and safer since with Ok and Cancel the default
  option is Ok so a user might accidentally confirm deletion with the
  keyboard, now the default option is No
@github-actions github-actions bot added this to the 3.40.0 milestone Sep 16, 2024
Copy link

github-actions bot commented Sep 16, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 7a44d29)

src/app/qgisapp.cpp Outdated Show resolved Hide resolved
@nyalldawson nyalldawson added the Frozen Feature freeze - Do not merge! label Sep 16, 2024
@3nids
Copy link
Member

3nids commented Sep 17, 2024

This is super nice. I would be in favor of adding this to 3.40. Thoughts?

- I think this is clearer and also matches the behaviour of the User
  Profiles menu
- Also add ... to indicate a dialog
@JuhoErvasti
Copy link
Contributor Author

image
I fixed some oversights

  • When opening the dialog from the GUI the active profile is greyed out and cannot be opened or removed
    • I thought this would be good since it matches the behavior of the User Profiles menu
  • Also as per Gustry's review the action now has ... to indicate that you're opening a dialog

This is super nice. I would be in favor of adding this to 3.40. Thoughts?

For my part I'd like that if it's possible.

src/app/options/qgsuserprofileselectiondialog.cpp Outdated Show resolved Hide resolved
src/app/options/qgsuserprofileselectiondialog.cpp Outdated Show resolved Hide resolved
src/app/options/qgsuserprofileselectiondialog.cpp Outdated Show resolved Hide resolved
src/app/options/qgsuserprofileselectiondialog.cpp Outdated Show resolved Hide resolved
src/app/options/qgsuserprofileselectiondialog.cpp Outdated Show resolved Hide resolved
src/app/qgisapp.cpp Outdated Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator

I'd suggest we re-word "remove profile" to "delete profile" everywhere, as it's clearer that it's a destructive action rather then just removing it from the list. (We use "remove" elsewhere for actions like removing a connection to a geopackage, where the file won't be actually be deleted).

@JuhoErvasti
Copy link
Contributor Author

I'd suggest we re-word "remove profile" to "delete profile" everywhere, as it's clearer that it's a destructive action

That makes a lot of sense, it was very inconsistent too. I've changed the term to 'delete' across the board here 3658792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frozen Feature freeze - Do not merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants