Commit graph

317 commits

Author SHA1 Message Date
bwang 1b4376c946 Reintroduce h2 to Table of contents label
Depends-on: I752eadc9bf54d58c799060a9eaefa0b125dd7952

Bug: T320451
Change-Id: Ic4ca5490a9a33cb319821bbdaa57d29f0ed9c887
2022-11-17 19:26:44 +00:00
jenkins-bot a0f7e2db32 Merge "Update TOC to use PinnableHeader" 2022-11-15 23:10:35 +00:00
bwang 0f7411bdf2 Update TOC to use PinnableHeader
- Update 'collapsed' naming convention to 'pinned'
- Introduce VectorComponentPinnableHeader

Bug: T317897
Change-Id: I752eadc9bf54d58c799060a9eaefa0b125dd7952
2022-11-15 16:37:50 -06:00
jenkins-bot 8c48541379 Merge "Rename TOC locales to be generic pin/unpin labels, standardize toc label locale name" 2022-11-15 01:19:03 +00:00
bwang ddf8706ae4 Fix main menu button spacing when the VisualEnhancementNext flag is enabled
This patch results in an expected visual change for the main menu button when the flag is on
When comparing with master with the flag off, this patch will still show a 1px difference for the main menu button, as well as user menu and language button. These are not introduced by this patch and are due to the flush classes taking into account the 1px border

Change-Id: Id46bc939338d5bbcc3459ab502e1cf8b8f2020b2
2022-11-14 22:32:51 +00:00
bwang 17bdb31de5 Rename TOC locales to be generic pin/unpin labels, standardize toc label locale name
- 'vector-toc-toggle-position-title' -> 'vector-pin-element-label'
- 'vector-toc-toggle-position-sidebar' -> 'vector-unpin-element-label'
- 'vector-toc-heading' -> 'vector-toc-label'

Change-Id: I4c45fa9a152e26691cc0b62ce8d40d00f8f2e617
2022-11-14 16:26:08 -06:00
bwang f73d255810 Replace aria-labelledby in ToC with aria-label
Bug: T318178
Change-Id: I7abcc977276b979c5a515fbbcccf42d7c993a130
2022-11-14 18:10:38 +00:00
bwang 6bff0011c1 Fix ToC dropdown menu spacing when visual next flag is enabled, address icon related feedback
Causes 20 visual progressions regardless of visual next flag, the ToC moves 1px when in the sidebar

Follow up to If3aed0ac401b0abc80c3ad52806eb85b33d43f06

Bug: T321504
Change-Id: I4b3ec90d8e79791a1bf17ba02c9f9d722499bec8
2022-11-11 18:56:12 +00:00
jenkins-bot cd0250dbb4 Merge "Replace 'more' menu with page tools pinnable dropdown" 2022-11-10 22:21:38 +00:00
bwang 8f5b33fee3 Replace 'more' menu with page tools pinnable dropdown
Bug: T317897
Change-Id: Ia94ebc32041bb3c2f86d461b310766b2d14c66a2
2022-11-10 15:33:16 -06:00
bwang 16da6a5e6a [Technical] Fix sticky header search input alignment when VisualEnhancementFlag is enabled
Visual changes when the flag is on

Follow up to If3aed0ac401b0abc80c3ad52806eb85b33d43f06
More context at T322673#8383888

Bug: T322673
Change-Id: I64a47fa869247f758c6369c2e0ff8b12f87f9d9e
2022-11-10 00:48:07 +00:00
bwang e90b7e341f Add ColumnEnd.mustache and new grid styles to support third column
Bug: T317897
Depends-On: Ibf304843a62d5269992a01eb826edf71ce8d3c35
Depends-On: Ib424ca1c767161fdae8c0aeedfe662b7fa039ff6
Change-Id: Ie7d31df972ff68313b2437ff14b7b6b8d7078204
2022-11-09 11:54:30 -06:00
bwang 9bb2f5a55a [Technical] Add DropdownContents.mustache
Bug: T317897
Change-Id: I62edc311a7a2434ab83592d99e870dd82d775de4
2022-11-08 13:56:21 -06:00
jenkins-bot afca126c96 Merge "[Technical] Drop redundant isLegacy logic" 2022-11-04 21:02:09 +00:00
Jon Robson 33a67b226c [Technical] Drop redundant isLegacy logic
It's no longer needed (hurrah) once we move
search logic into individual skins. This
will also make a difficult to add additional code
to SkinVector going forward supporting our goal
of removing it.

Bug: T319349
Change-Id: I595356db449572e5fb914b909d9624f25fc2d808
2022-11-04 17:47:14 +00:00
Jon Robson ea07136e73 Fix alignment between icons on left and right of screen
- Table of contents arrows are now aligned with sticky header search/hamburger
- The user menu dropdown now aligns with more and languages button

Bug: T321504
Change-Id: If3aed0ac401b0abc80c3ad52806eb85b33d43f06
2022-11-04 17:06:48 +00:00
jenkins-bot cdd5fd5950 Merge "Remove CSS classes and selectors from cached HTML" 2022-11-03 21:37:42 +00:00
Jon Robson c9cdaadb5e [Technical] Separate Dropdown template into 3 templates
Use the new format to remove the need for getTemplateParser
in SkinVector

Bug: T319349
Change-Id: Ic4ac1d6d58099a689c29c16b3029bf43a849e50e
2022-11-03 20:41:20 +00:00
bwang 099eed0487 Remove CSS classes and selectors from cached HTML
Bug: T316570
Depends-on: Ib4050768f20b1734d356104f18aa539f657099d8
Change-Id: I97f87b32402d7f4fd790f9a8b9abab42efd9d890
2022-11-03 11:12:39 -05:00
Bernard Wang 15d95fc24a [Technical] Split up Menu.template, restrict decoratePortletData to legacy Vector
Changes:
* Code is moved from SkinVector to SkinVectorLegacy verbatim since it is now only
needed by SkinVectorLegacy
so we remove it:
** This step broke MainMenu rendering so this was captured in VectorComponentMainMenu
** The isLegacy code no longer makes sense and is removed in a follow up

* storybook no longer run on CI

Authors: Bernard Wang and Jon Robson
Bug: T321102
Bug: T319349
Change-Id: Ib424ca1c767161fdae8c0aeedfe662b7fa039ff6
2022-11-02 21:22:50 +00:00
jenkins-bot e857cfa9e1 Merge "Align text of main menu and ToC to main menu button" 2022-11-01 16:47:05 +00:00
jenkins-bot c12d8bb96e Merge "Add generic PinnableHeader template, CSS & JS" 2022-11-01 16:45:18 +00:00
Jan Drewniak 8c63ac7c55 Align text of main menu and ToC to main menu button
Instead of aligning the edge of the main menu and
ToC with the edge of the main menu button, this
aligns the text of those sidebar items with the
edge of the main menu button.

NOTE: Currently not working with the
vectorvisualenhancementnext feature flag enabled.
This will be addressed in If3aed0ac401b0abc80c3ad52806eb85b33d43f06

Bug: T317583
Change-Id: I01f639c5ca63ac50235dc21ca5273c91213f041c
2022-11-01 16:30:01 +00:00
bwang 2ac38f2f9a Add generic PinnableHeader template, CSS & JS
Bug: T317897
Change-Id: Iedc5e6f64e72a4d7762cb4f2fa834980d6757793
2022-11-01 11:12:15 -05:00
Jon Robson 31b0fd08d2 [Technical] Prepare for template rename
The user links and language button are SkinVector22 features but
they are buried inside SkinVector.

When we rename the templates this code will become problematic
as SkinVector22 requires these modifications

Bug: T319349
Change-Id: Id5e5b97af0ea020ef20565a7e1acc685d7be0892
2022-11-01 03:45:21 +00:00
jenkins-bot 59e8ab5402 Merge "[Technical] Move isSidebarVisible and template boolean to SkinVector22" 2022-10-28 15:14:37 +00:00
Jon Robson 8ec5a51625 [Technical] Move isSidebarVisible and template boolean to SkinVector22
Additional change: Prefix with "is-" per template coding standards

Bug: T319349
Change-Id: Iadf149439d043d00a79094c4f34dfbea92abffe1
2022-10-27 18:45:47 +00:00
Jon Robson a1199a0917 Use standard utility classes for flushing icons left and right
Restricted to the feature flag (?vectorvisualenhancementnext=1)
 for now to allow us to not worry about caching.

mw-ui-icon-flush-left and mw-ui-icon-flush-right have been in core
for some time and using them means we don't have to manage hardcoded
values for these.

We'll need to think of .mixin-vector-flush-left-left
and .mixin-vector-flush-right-margin-left separately - I wonder
if these could be revised to use these 2 standard classes.

Additional changes:
- Drop unused mixin-vector-flush-right-margin-left mixin

Bug: T321504
Bug: T317583
Change-Id: I51f8e31be6771a3fb32fb07dc22d0c2872b5706d
2022-10-26 10:01:12 -07:00
jenkins-bot 598424b2e2 Merge "Replace incorrectly mw- prefixed classes Rename template and CSS files to match updated naming conventions, replaces instances of "sidebar" with "main menu"" 2022-10-25 22:32:06 +00:00
bwang 51457a78e7 Replace incorrectly mw- prefixed classes
Rename template and CSS files to match updated naming conventions, replaces instances of "sidebar" with "main menu"

Bug: T316570
Bug: T317437
Change-Id: Ib4050768f20b1734d356104f18aa539f657099d8
2022-10-25 10:28:31 -05:00
Nicholas Ray 990392cdeb Fix Vector 22 missing user menu on private wikis
When `$wgGroupPermissions['*']['edit'] = false;` is set, an `emptyPortlet` class
is added to the user menu which prevents the menu from showing even though it
contains a login link.

Changes:

* Vector-22 now determines what classes are applied to the user menu's container
instead of core deciding that on Vector's behalf (L761 of
SkinVector::getUserMenuPortletData). This eliminates the undesirable
`emptyPortlet` class. This can potentially be removed upon completion of
T319356.

* Conditionally renders the learn more link based on whether
$userMenuData['is-empty'] is `true` so that we don't show the learn more link
when the anontalk and anoncontribs menu items aren't present.

Bug: T317789
Change-Id: I883926c36f59d446076f960ead31f82e51967e70
2022-10-20 17:12:10 -06:00
Jan Drewniak 98068d9598 Restore navigation landmarks in page toolbar
Adds landmarks to the article toolbar
- Namespace navigation
- View navigation
- More options navigation

Removes the "tools" landmark and associated
aria-label (and translation message).

Makes the #left-navigation and #right-navigation
flexbox to ensure the new <nav> elements, along with
gadgets, align on one line. Moves the styles for
these elements from screen.less to ArticleToolbar.less.

Bug: T317440
Change-Id: Iceff337b0e250c1f368dbaea6cc41a977d8ee868
2022-10-03 10:39:39 -04:00
jenkins-bot 71bc90f225 Merge "Restore unconditional rendering of siteSub with styling modifications" 2022-09-28 03:38:13 +00:00
Jon Robson 330dc5f705 Restore unconditional rendering of siteSub with styling modifications
The margin is moved to non-empty elements to avoid extra whitespace
when it is empty

Bug: T315639
Change-Id: I22aa7dbbacc5bc4ac87cffa13113ced9c9400e0b
2022-09-27 15:10:26 -07:00
jenkins-bot 0387f14d08 Merge "Modify Vector 2022 skip-links" 2022-09-26 19:07:07 +00:00
Jan Drewniak 5a951e2159 Modify Vector 2022 skip-links
- Changes the "skip to content" link to point to "#bodyContent"
  instead of "#content".
- Adds a `aria-labelledby` attribute to #bodyContent.
- Changes the table of contents "back to top" link to
  point to "#" instead of "#top-page".
- Removes "#top" link as it appeared unused.
- Updates Jest snapshots.

Bug: T312818
Change-Id: I86443066d45c818d6f137d70ebe36798eba66f13
2022-09-26 17:34:23 +00:00
Jan Drewniak 06c243da35 Modify the sticky header offset styles
- Prevents the ToC in the sidebar from jumping down when the sticky
  header becomes visible
- Removes the `.sticky-header-element` class from the ToC since that
  only modifies the elements position when the sticky header becomes
  visible (whereas in this case, it should be modified when the sticky
  header is enabled, before it's visible).

Bug: T314330
Change-Id: Ic6f50b8dc4f1507d875825d23eb44c24a998eaf7
2022-09-20 10:34:09 -04:00
bwang c4ec68b13c Fix border when title is hidden and when toolbar is empty
Bug: T317930
Change-Id: Iba89a2e642a8377c3603d099fb1157fc2df465d0
2022-09-19 21:37:27 +00:00
Func c6bf88520e ToC: Handle anchors with % in plaintext
TODO: Remove the fallback to {{anchor}} when all old parser cache expired.

Bug: T315222
Change-Id: I1da089cfef83131cda26859e3346cd2d840b3839
2022-09-16 11:24:27 +08:00
jenkins-bot 8626e14ec1 Merge "Don't print table of contents on page with no table of contents" 2022-09-12 15:50:22 +00:00
Jon Robson ccc8df0ef9 Don't print table of contents on page with no table of contents
e.g. Special:BlankPage

This was causing unexpected visual regressions on Pixel

Follow up to 9c6f6709c

Bug: T313060
Change-Id: If8111f95be53e4504ed49d4ea140f62ac98e8e1b
2022-09-09 17:08:40 -07:00
bwang 4c622fe8de Correct ContentHeader source order to match design
- Use flexbox instead of float

Visual changes:
- The title wraps differently when the title is very long

Bug: T313947
Change-Id: I2915e36286b21c8fd1a07247ada7754a08a0b574
2022-09-08 19:10:55 +00:00
jenkins-bot d59885cf89 Merge "Enable related tabs on Vector" 2022-09-01 20:36:15 +00:00
bwang 9c6f6709c6 Create new sticky toc container
Bug: T313060
Change-Id: Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c
2022-08-31 21:27:06 +00:00
Jon Robson 486748ac41 Enable related tabs on Vector
Depends-On: I861e8fe9c80569224548b8569452f8c57a446998
Bug: T313409
Change-Id: I871291c91dfe1f92c1131a2403695394ef3d0533
2022-08-30 14:20:11 -07:00
jenkins-bot e00e0b4122 Merge "Support additional content in table of contents" 2022-08-26 20:57:37 +00:00
bwang 8ad777b896 Fix site notice spacing
- Removes grid row gap in favor of margins
- Add container div around site notice to allow margin collapsing

Bug: T315595
Change-Id: I39959f43f20880e83bef945a7535d58cfe0b6412
2022-08-25 11:13:57 -05:00
Jdlrobson 3d719455c4 Revert "Remove grid row gap in favor of margins"
This reverts commit b63244f367.

Reason for revert: Per standup this morning we'll revert this so
that we are back to a known state, and try this again in a second
attempt.

Change-Id: Ie1349fecbab6c49ce63d328aba08162d74145cb9
2022-08-24 16:54:31 +00:00
bwang b63244f367 Remove grid row gap in favor of margins
Bug: T315595
Change-Id: Ibf837775d972deb29e9619cc6c12c919aae5155a
2022-08-22 15:49:00 -05:00
Jon Robson 4d96034efe Support additional content in table of contents
Bug: T307823
Change-Id: I034a579b7ef51950726c9ac056d6c940a7d7d472
2022-08-18 23:04:47 +00:00