Remove the confirmation prompt from the deploy notification reload button

NEW
Assigned to

Status

Tree Management
Treeherder
6 months ago
4 months ago

People

(Reporter: mt, Assigned: KWierso)

Tracking

Details

(Reporter)

Description

6 months ago
When treeherder changes, it helpfully shows a reload button on the UI.

However, hitting f5/ctrl-r is more efficient because that reload button triggers window.confirm() rather than just reloading.

There are few cases where reloading is an actual problem and the right way to address that is to register a beforeUnload event handler in cases where state might be lost.
(Assignee)

Comment 1

5 months ago
There's actually a few things that happen when Treeherder gets an update deployed:

Treeherder polls for updates every five minutes.

If Treeherder detects an update, a little message within the site header appears saying "Treeherder Update Available". If you click that, it does the window.confirm() prompt, asking if you want to reload.

If more than an hour passes after detecting that update and you haven't reloaded the page, the infobar with the "reload" button appears. Clicking it also does the window.confirm() prompt.



I could drop the confirm() prompt for either/both of those cases, if that's what we want. Or change to registering a beforeUnload handler (I guess the only conditions to prompt would be if there were jobs pinned or classifications added but not saved?)

Ed, thoughts?
Assignee: nobody → wkocher
Flags: needinfo?(emorley)

Comment 2

5 months ago
I think we should get rid of the confirmation prompts for both. Ideally the text shown should make it clear that a click will reload, making the prompt unnecessary.

Also I wonder if we should make it less aggressive at checking (ie longer than 5 minutes)?
Flags: needinfo?(emorley)

Updated

5 months ago
Summary: Reload button efficiency → Remove the confirmation prompt from the deploy notification reload button
:KWierso, have you started on this?  I'll give it a try if you have not.
Flags: needinfo?(wkocher)
(Assignee)

Comment 4

5 months ago
I'm o. PTO through next Wednesday. Feel free to steal this in the meantime.
Flags: needinfo?(wkocher)
(Assignee)

Comment 5

4 months ago
Jryans, did you still want to take a look at this? My tab session was lost and I lost track of this bug for a while. Feel free to take it if you want.
Flags: needinfo?(jryans)
Haven't had time to get back to it yet, I'll check the bug status next time the prompt annoys me. :)
Flags: needinfo?(jryans)
You need to log in before you can comment on or make changes to this bug.