freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
40 stars 39 forks source link

Starring: Create "Pending" State #874

Open ninavizz opened 4 years ago

ninavizz commented 4 years ago

This issue per conversation with Allie... Color also spec'd in #873

Problem

Communicating "pending" vs "done" vs "failed" vs "static" states to users w/in the UI feels important. When users are messaged about UI tidbits failing to update, it will hopefully make more sense if they regularly see how things transition from acted-upon, to pending, to compled.

Solution

Fudge a 50% transparency of the GrimaceBlue color of the selected star, when the star is initially clicked. This color is #8286c9. When the server calls are all done and the Source is officially starred, then the Star should transition to GrimaceBlue.

eloquence commented 4 years ago

As discussed, we don't need a visual state for pending stars for the pilot. However, to make it clearer what's going on in case of failure, this is a nice potential post-beta improvement.

zenmonkeykstop commented 6 months ago

Also (maybe more tangentially) a sync issue, marking as such. We should make a call as to how we handle local vs synced changes in general, which would inform the UX (ie. if we update locally and assume eventual consistency, we may not need a "pending" state).

cfm commented 2 months ago

From https://github.com/freedomofpress/securedrop-workstation/issues/1103#issuecomment-2207508008, here are two edge cases that emerge without (generalized, dare I say consistent...) consistency in the Client's synchronization model:

Data race (contention): If you click the star icon while a sync is in progress, then: (1) the GUI shows the source as starred; (2) the sync completes; (3) the GUI shows the source as unstarred; (4) the star operation completes; (5) the GUI shows the source as starred.

Data race (interruption): If you click the star icon and then immediately quit the Client, then: (1) the GUI shows the source as starred; (2) the Client quits; (3) when the Client restarts, the GUI shows the source as unstarred; (4) the first sync completes; (5) the GUI shows the source as starred.