New issue
Advanced search Search tips

Issue 902669 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Collapse/uncollapse doesn't remember state with back-button

Project Member Reported by machenb...@chromium.org, Nov 7

Issue description

Take https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20builder/37113 for example.

Start out with the "Default" selection. All elements are collapsed:
http://shortn/_DUzRK1WXqb

Now open measurements and press a log link:
http://shortn/_yXRaYH2C6G

On the logdog page press either "Back to build" or the browser's back button (makes no difference).

Result: measurements is collapsed again.
Expectation: measurements should still be open.

Repeat the same workflow, but instead of opening measurements, select "Expanded", which opens all nodes. After pressing the back button, "Expanded" is still selected, but all nodes are closed.

Version: 3594-050869a
 
Cc: hinoka@chromium.org
Not sure how easy this will be to fix. The state is essentially local DOM modification and it seems browser looses those modifications when navigating forward/backward. In other words, navigating back is the same as opening the page in a new tab from the app perspective. The only thing that I can think of is to store the state of the steps in fragment of the URL, but it feels too hacky to me since this will be visible to the user. I'll let Ryan comment on this.

As a workaround you can try opening logs in a new tab, i.e. use Ctrl modifier when clicking on the links. Then you'll have your old tab still open and keep its state.
Oh, my workaround is to just open those nodes again :) It's just not very convenient. It's also not a big deal, i.e. severity is rather low I guess.

It is a bit strange though that when "Expanded" is selected, that selection stays, but the nodes close. That's somewhat inconsistent.
Status: Available (was: Untriaged)
Like sergiyb said, I think this is non-trivial to fix, it would involve saving the DOM state for every build as a cookie.  But I agree it's not ideal.
The reason "Expanded" works is that the Show preference is saved in cookies, but not the individual steps. Perhaps we can use cookie after all as long as we keep them limited to the current session such that they do not grow with every expanded/collapsed step on every visited build.
You can scope cookies to individual pages.
Labels: -Pri-2 Pri-3
Good point. Still I'd prefer them to have some reasonable expiration date, e.g. 1 month. Otherwise, cookies will continue to be store in browser for build pages that the user will never visit again.

Sign in to add a comment