Project

General

Profile

Actions

Feature #21313

closed

Warn users when closing dialog and sharing input box isn't empty

Added by Peter Amstutz 4 months ago. Updated 16 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Story points:
-

Description

To add a sharing link, the user needs to enter the name of the user being shared with, then click on a plus (+) button. Users sometimes forget to click the button.

When clicking "close" or otherwise trying to cancel the sharing dialog (e.g. the ESC key), it should check if the text entry is empty or not.

If the text entry is not empty, it should prevent the user from closing the dialog, show a warning that they have unsaved changes, and tell them they need to click on the (+) button to save.


Files

CancelSave.png (5.56 KB) CancelSave.png Peter Amstutz, 04/10/2024 01:32 PM

Subtasks 1 (0 open1 closed)

Task #21559: Review 21313-share-dialog-warningResolvedPeter Amstutz04/10/2024Actions

Related issues

Related to Arvados - Idea #20945: Using + button to save new sharing links is not obviousNewActions
Actions #1

Updated by Peter Amstutz 4 months ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz 4 months ago

  • Target version changed from Development 2024-01-17 sprint to Development 2024-01-31 sprint
Actions #3

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-01-31 sprint to Development 2024-02-14 sprint
Actions #4

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-02-14 sprint to Development 2024-02-28 sprint
Actions #5

Updated by Peter Amstutz 2 months ago

  • Target version changed from Development 2024-02-28 sprint to Development 2024-03-13 sprint
Actions #6

Updated by Brett Smith 2 months ago

  • Related to Idea #20945: Using + button to save new sharing links is not obvious added
Actions #7

Updated by Peter Amstutz about 2 months ago

  • Assigned To set to Peter Amstutz
Actions #8

Updated by Peter Amstutz about 2 months ago

  • Target version changed from Development 2024-03-13 sprint to Development 2024-03-27 sprint
Actions #9

Updated by Peter Amstutz about 1 month ago

  • Target version changed from Development 2024-03-27 sprint to Development 2024-04-10 sprint
Actions #10

Updated by Peter Amstutz about 1 month ago

  • Target version changed from Development 2024-04-10 sprint to Development 2024-04-24 sprint
Actions #11

Updated by Lisa Knox 23 days ago

  • Target version changed from Development 2024-04-24 sprint to Development 2024-04-10 sprint
  • Status changed from New to In Progress
Actions #12

Updated by Lisa Knox 23 days ago

developer-run-tests-services-workbench2: #678

21313-share-dialog-warning @ d7cf4c1ec30c7f90f38a9f34c14547c94c081b59

  • ✅ All agreed upon points are implemented / addressed.
  • ✅ Anything not implemented (discovered or discussed during work) has a follow-up story.
  • ✅ Code is tested and passing, both automated and manual, what manual testing was done is described
  • ✅ Documentation has been updated.
    n/a
  • ✅ Behaves appropriately at the intended scale (describe intended scale).
  • ✅ Considered backwards and forwards compatibility issues between client and server.
  • ✅ Follows our coding standards and GUI style guidelines.

Notes:
When typing in the participants field, the autosuggest populates a list of relevant suggestions. I think it's very obvious to the user that simply typing "John Doe" and hitting 'close' will not save any information. If the user hits Enter after typing the name, the first suggested name will be selected.

I changed it so that if there is a selected name (from the autosuggest list), the "CLOSE" button is disabled and a warning shows up explaining that the plus (+) button must be clicked to save the participant name. In this state, the only way to proceed is to either click the plus button to save the name or remove the name from the input field, so I changed the behavior to allow for background clicking to close the dialog. At that point, I think it is obvious to the user that nothing has been saved and it would be frustrating to the user to have no obvious way to close a dialog that they no longer want to interact with.

Actions #13

Updated by Lisa Knox 23 days ago

  • Assigned To changed from Peter Amstutz to Lisa Knox
Actions #14

Updated by Peter Amstutz 23 days ago

21313-share-dialog-warning @ d7cf4c1ec30c7f90f38a9f34c14547c94c081b59

I believe the (+) button was a response to older behavior where the button behavior was "Save and close" which was annoying if you wanted to make multiple edits to sharing. But the positioning is arguably awkward.

  • Brainstorming: instead of disabling the Close button, could we swap between "Close" and "Save" depending on the state? Or have both buttons but "Save" is the one in the lowermost right corner because that's what people will go to first.
  • So maybe the (+) button goes away so we don't have two save buttons
  • Then we'd adjust the message: "Click Save to share"
  • I don't think we want clicking outside the dialog box to close it when unsaved. It's too easy to miss the "save" button and click outside the box by accident and lose whatever you were doing. The ESC button also dismisses the dialog, I think we should keep that, because it is more intentional.
  • Could you also align the horizontal lines under "Users" and "Authorization", it's a bit painful to look at.
Actions #15

Updated by Lisa Knox 18 days ago

developer-run-tests-services-workbench2: #720

21313-share-dialog-warning @ 4a1e25b2df1817cb3bfa153076efd1a98ed802ff

  • Brainstorming: instead of disabling the Close button, could we swap between "Close" and "Save" depending on the state? Or have both buttons but "Save" is the one in the lowermost right corner because that's what people will go to first.
  • So maybe the (+) button goes away so we don't have two save buttons

I tried the first approach, but having the single button switch between states was jarring and unpleasant imo. I opted for two buttons, each disabling on the 'saveEnabled' prop.

  • Then we'd adjust the message: "Click Save to share"

Because of the buttons disabling, it's pretty obvious to the user what they need to do to proceed. I removed the error message entirely and it looks much cleaner.

  • I don't think we want clicking outside the dialog box...

Done, now the only way to close the dialog when a user is selected but not saved is to hit ESC

  • Could you also align the horizontal lines under "Users" and "Authorization", it's a bit painful to look at.

I fiddled with this for a while before realizing that the Material UI components actually render differently on Chrome and Firefox, meaning I would have to find a compromise between the two. I opted to just remove the underline from the Select component, making it match the other Selects in the dialog. It's still uneven, but basically unnoticeable now.

I also took the opportunity to re-style the grid and the components, because none of them really aligned before.

Actions #16

Updated by Peter Amstutz 17 days ago

Lisa Knox wrote in #note-15:

Because of the buttons disabling, it's pretty obvious to the user what they need to do to proceed. I removed the error message entirely and it looks much cleaner.

Yes, I think this is better. However, can we make the styling consistent with the "Edit" dialog?

Except it would say "Close" instead of "Cancel", and keep the behavior of being disabled when there's content in the text box.

Actions #17

Updated by Lisa Knox 17 days ago

developer-run-tests-services-workbench2: #727

21313-share-dialog-warning @ 495ee6b835dea5f053cf95bef2dc9d61d0324774

Done and done

Actions #18

Updated by Peter Amstutz 17 days ago

  • Target version changed from Development 2024-04-10 sprint to Development 2024-04-24 sprint
Actions #19

Updated by Peter Amstutz 17 days ago

Lisa Knox wrote in #note-17:

developer-run-tests-services-workbench2: #727

21313-share-dialog-warning @ 495ee6b835dea5f053cf95bef2dc9d61d0324774

Done and done

This LGTM

Actions #20

Updated by Anonymous 17 days ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF