Page MenuHomePhabricator

Sidebar should allow for different states for logged-in and anonymous users
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Follow-up from T246419: Build collapsible sidebar and sidebar button .

Use cases

As a a reader, I would like my sidebar to be collapsed by default so that I can focus on the content of a page
As an editor, I would like my sidebar to be open by default so that I can easily go to pages related to my workflow, such as recent changes

Acceptance criteria

  • Allow the sidebar default to vary based on logged-in status
NOTE: the initial state for all uses will be for the sidebar to be OPEN by default. The eventual state will be for the sidebar to be OPEN by default for logged-in users and CLOSED by default for anonymous uses.

Event Timeline

Notes:

  • The visibility state is currently hardcoded.
  • Add a configuration parameter and set the appropriate default in skin.json and mediawiki-config.
  • Integrate with FeatureManager or check the configuration directly.
  • Caching is not part of this task.
  • This has possible overlap with T246427 in terms of how that initial default value is set. Remember that the default is blasted away as soon as the sidebar is toggled.

Change 609979 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/skins/Vector@master] Select initial side bar visibility depends on user login state and defaults.

https://gerrit.wikimedia.org/r/609979

Change 610069 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[operations/mediawiki-config@master] Add defaults for initial state for sidebar.

https://gerrit.wikimedia.org/r/610069

Change 609979 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Select initial side bar visibility depends on user login state and defaults

https://gerrit.wikimedia.org/r/609979

Jdlrobson added a subscriber: Jdlrobson.

Not sure how to QA this one in current state easily. Possibly a developer can verify as part of sign off?

Tested VectorDefaultSidebarVisibleForAuthorisedUser flag (true/false) and VectorDefaultSidebarVisibleForAnonymousUserflag (true/false). Both seem to be working as they should!

nray updated the task description. (Show Details)
nray added a subscriber: nray.