JaneaSystems / PowerToys-DevProjects

0 stars 0 forks source link

Create shortcut checkbox does not reflect if the shortcut actually exists, should be a button #41

Open TheJoeFin opened 3 months ago

plante-msft commented 2 months ago

@donlaci while reviewing other applications, they almost always use a checkbox for "pin to taskbar" or "create desktop shortcut". I know I said earlier that we could change this to a button, but I think ideally we should verify whether or not the shortcut exists (by some ID maybe) and persist the shortcut checkbox selected state if we detect the shortcut.

Is this possible?

donlaci commented 2 months ago

@plante-msft yes it is possible. Currently the checkbox's state is stored in the json file. It indicates us that the user wants to have a shortcut for the given project. On pressing the Save button the shortcut is created. We can change it. The checkbox's state will be reflecting the existance of the shortcut upon entering the editor.

The change affects the use case, when the user creates a shortcut then moves it to a different folder or deletes it. With the current implementation, entering the editor the user would have a checked "create shortcut" checkbox and the shortcut would have been re-created when the Save button is pressed. After the modification the user would have an empty checkbox and should need to check it back if he or she wants the shortcut. Both implementations are reasonable, let's do the change then. Thanks!