Page MenuHomePhabricator

Improve persistence of CollapsibleNav, toolbar section state
Closed, ResolvedPublic

Description

We currently store these states in cookies that expire when the session ends. This means the state is lost rather often for most users.

An easy solution is to set the cookies' expiry far into the future (say, 30 days) and renew this expiry date every time.

A better solution would be to store this data in the preferences table for logged-in users. This would ensure it never expires and carries over between logins on different computers.


Version: unspecified
Severity: enhancement

Details

Reference
bz23744

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:03 PM
bzimport set Reference to bz23744.

(In reply to comment #0)

We currently store these states in cookies that expire when the session ends.
This means the state is lost rather often for most users.

An easy solution is to set the cookies' expiry far into the future (say, 30
days) and renew this expiry date every time.

Did this in r67204, as well as making the cookies domain-wide (rather than having separate cookies for /wiki and /w/index.php) in r67354. Both have been deployed.

A better solution would be to store this data in the preferences table for
logged-in users. This would ensure it never expires and carries over between
logins on different computers.

On second thought, I think this is a bad idea.

  • Bug 23628 has been marked as a duplicate of this bug. ***

marco27.wiki wrote:

Since the interwiki section has been set to be opened by default, the cookie doesn't affect the state of that section (instead it affects the one of the other sections).
For instance, when a user closes the interwiki section and opens another page, that section will always be opened (unlike the others).

(In reply to comment #3)

Since the interwiki section has been set to be opened by default, the cookie
doesn't affect the state of that section (instead it affects the one of the
other sections).
For instance, when a user closes the interwiki section and opens another page,
that section will always be opened (unlike the others).

Could you explain what you mean more clearly? I don't quite understand the bug you're talking about here.

marco27.wiki wrote:

Sure. Before showing interwiki section opened by default, the cookie remembered the choice of the specific user (if he opened a section, it'll be opened next time too, if he closed that one it'll be closed next time too).
Now, this works for all the sections, except for the interwiki one. In fact, if a user close it, it'll always be opened (but for this bug, it would have to be closed!).
Some users on it.wiki have reported the problem.
I hope I've explained it clearly.

  • This bug has been marked as a duplicate of bug 24140 ***