While our implementation of night mode is in beta, we want to respect
the existing night mode gadget and disable night mode in favor of the
gadget, providing a notice with an option to disable the gadget and
reload the page
Additionally, raise the max bundle size to account for the additional
code added
Note: the tests still aren't exactly where I'd like them to be, but
hopefully they raise confidence a little bit with reviewing this patch
Additional changes:
* Upgrade to latest version of TypeScript types and remove several
@ts-ignore statements
Bug: T365083
Change-Id: I9583ee7ebf8c810ddd504193d568034c954d28f2
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also unifiying npm command to qua standard notation `minify:svg`.
Bug: T354875
Change-Id: I4fffd9efd430786911fe36e409d2575bfab719bd
This also includes the replacement of WikimediaUI Base with Codex tokens
in OOUI – all backwards-compatible.
Bug: T334934
Change-Id: I2e05852424ab5db90b94c65a6c409cb40b66d04c
Holding back some packages as they need some work to unbreak tests:
* mustache
* jest
* typescript
Change-Id: If2b9e27bd83c43c6e7d8c0ac1b6d25b2aa74499b
* Upgrade @wikimedia/types-wikimedia to allow us to drop several
@ts-ignores
* Merges eslint rules now that ES6 is default everywhere
* Runs autofix command
* Fixes various prefer-const errors
Change-Id: Iee5bcb93f10a76d80dbeec813f6387c13438263e
svgo ^2.8.0 → ^3.0.2
Amending to new `cleanupIds` plugin name.
Re-crushing SVGs while at it.
Bug: T333158
Change-Id: I29e74ec1240142af3440004b68ac985558836410
In Codex v0.7.0, the CdxButton's `type` prop changed. The `type`
prop was renamed `weight` and will continue to accept the same
values ('normal', 'quiet', and 'primary'). A new `type` prop was
added that accepts the old types, plus native button types
('button', 'reset', and 'submit'). In a future release of Codex,
the `type` prop will be removed altogether and the native type
can be bound to the CdxButton via the `type` attribute.
So, while the old values for `type` still work, we want to
update the prop name in anticipation of the `type` prop's
removal. For any new code moving forward, the `weight` prop
should be used.
This patch:
- Updates the Button stories to change the `type` prop to `weight`
- Updates Codex dev dependencies to v0.7.0
- Updates Storybook webpack config so it can process *.mjs files
(Codex ES dist files now have this extension, see
Ic29c891c8d7ac705d016aa6f91c5f63684d7d7c8)
Bug: T312987
Change-Id: If98dad4769ed72900dbae579823a356669d6cf64
The 'real' versions in production are already 0.4.2, as they're supplied
by MediaWiki, so we should use the same versions in test as well.
Change-Id: I06775acd7ab22d103829b9b734736bf3ec137a82
This ensures that the wprov parameter is included when users follow the
link as a link (click, middle-click, etc.), and also prepares us for a
future where pressing Enter after selecting a search result navigates to
that result’s URL instead of submitting the form. It also matches the
behavior of the legacy search form.
We put this in App.vue + instrumentation.js, not in urlGenerator.js,
because we also want wprov to be added when custom URL generators or
search clients are used. (The reason for instrumentation.js instead of
purely App.vue is just that it’s easier to test there.)
In the tests, we need to update @wikimedia/mw-node-qunit so that we have
a sufficiently functional mw.Uri() mock.
Bug: T317682
Change-Id: I765d3bbf89b2253add7b50305c362e4bbc9ecceb
All the images available in Fresh [1] include an npm version that
produces new-format lockfiles by default, so it’s actually not easy for
contributors to make any package changes *without* bumping the version.
Let’s just do it in a separate commit.
[1]: https://github.com/wikimedia/fresh
Change-Id: I42b2d0189c2cc1c20e4d1a05a6593a5ea421d060
Upgrade Codex to the latest version and add the new icon
only buttons to our side by side table
This is needed to help bring these inline.
Bug: T314323
Change-Id: I7f59968cf5be6242e8002b11ca030c9bd4dd882d
Adds tests for the addPortletLinkHandler, which should
add an icon element to items added via 'mw.util.addPortletLink'
and conditionally move elements from the toolbar into
the more menu at narrow widths.
- Adds tests for dropdownMenu.js
- Adds associated Jest snapshots
- Stubs the mediawiki.page.ready module
- Updates mockMediawiki.js to 4.6.0
- Adds global mock for mw.util.showPortlet()
- Cleans up tests using local versions of these mocks
Bug: T314798
Change-Id: I81394d840321916756a41a23c40d96c4b6341931
[Visual changes]
This should result in 9 visual regression failures relating to
increased height of search results and loading bar
[More details about change]
- Migrate search app from Vue 2 to Vue 3; update tests
accordingly
- Remove dependence on WVUI and use Codex instead, via the special
`@wikimedia/codex-search` package
- Update search app to use CdxTypeaheadSearch, which no longer
takes in props related to the search client or fetch start/end
instrumentation. Instead, directly use the restSearchClient
and call fetch start/end events in the search app.
- Handle hideDirection in the search app/API response formatting
code, not within the TypeaheadSearch component
- Handle showing/hiding the search button in the app
- Move the WVUI URL generator into Vector
- Update server-rendered search box styles to match design updates
included with CdxTypeaheadSearch
- Replace references to WVUI with references to Codex
- Update values of various LESS variables to match Codex, and update
searchBox styling to prevent jankiness when the searchBox is replaced
with the Codex TypeaheadSearch component
The VectorWvuiSearchOptions config variable has been maintained and
will be updated to a code-agnostic name in a future patch.
Bug: T300573
Bug: T302137
Bug: T303558
Bug: T309722
Bug: T310525
Co-Authored-By: Anne Tomasevich <atomasevich@wikimedia.org>
Change-Id: I59fa3a006d988b14ebd8020cbd58e8d7bedbfe01