Page MenuHomePhabricator

Make a decision around how we share code between Minerva and Vector so that we can begin implementing night mode on Vector 2022
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Currently night mode is only available on the mobile site. As we pivot to desktop, we need to make a key technical decision to decide how we approach configuration in Vector (T359606). Without this technical decision, we will not be able to maintain a consistent night mode across skins.

In T357077 we explored different options for sharing code and created an ADR to document our findings - we now need to make a decision.

User story

As a developer I need to understand how PHP code should be shared between Vector and Minerva to help me work on new feature requests.

Requirements

See acceptance criteria.

Design

No design needed.

Acceptance criteria

  • The ADR is reviewed by the web team (developers, engineering manager and PM) and a decision is made on how we want to proceed
  • The ADR should be marked as accepted.

Communication criteria - does this need an announcement or discussion?

No

Sign off steps

The decision is fed back into https://phabricator.wikimedia.org/T357077 and that ticket is made ready for estimation.

Event Timeline

@Jdlrobson Flagged an issue with the exclusion logic for night mode on the special pages on translated wiki’s I have a fix waiting for review while testing https://phabricator.wikimedia.org/T359183, This issue is present in the limited width “VectorMaxWidthOptions” logic also but did not present it self as the configuration did not have emphasised on this part of the logic. The solution should be streamlined in the discussion and results of this task

The web engineers discussed this today and agreed that on the long term this code should be in core and on the short term we should use a git submodule. I'll update the ADR with this decision tomorrow by end of day Friday.

I also talked to Moriel about this task today for the long term solution, and she recommended should make a new general ticket for sharing code between skins that other teams (especially the MediaWiki platform team) can understand. I'll also take that on.

Jdlrobson set the point value for this task to 3.Mar 13 2024, 11:47 PM
Jdlrobson changed the point value for this task from 3 to 2.

Change 1012406 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] [POC] Use shared code submodule

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

Change 1012408 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] [POC] Use shared code submodule

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

Jdlrobson lowered the priority of this task from High to Medium.Mar 18 2024, 9:37 PM

Awaiting feedback from team in Slack before documenting further.

Change 1012759 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Permit sharing of code between Vector and Minerva

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

Change 1012760 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Add soft dependency on Minerva to Vector

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

Change 1012408 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] [POC] Use shared code submodule

Reason:

Taking another approach. Will summarize by EOD

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

Change 1012406 abandoned by Jdlrobson:

[mediawiki/skins/MinervaNeue@master] [POC] Use shared code submodule

Reason:

Taking another approach. Will summarize by EOD

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

Jdlrobson updated Other Assignee, added: Jdrewniak.
Jdlrobson added subscribers: SToyofuku-WMF, Jdrewniak.

I created T360452 for the long term issue here.
For the short term we recommend using a soft dependency as in https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1012759
The decision is documented in that patch.

https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/1012760 also needs to be merged to take advantage of the code sharing.

This will set us up nicely for T359606.

@SToyofuku-WMF or @Jdrewniak could you please review?

Sure thing! I left a comment on the patch about the failing tests (namespaces in PHP are confusing)

Change 1012759 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Permit sharing of code between Vector and Minerva

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

Change #1012760 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Add soft dependency on Minerva to Vector

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

@Jdlrobson should I move this to ready for signoff?