Commit graph

4 commits

Author SHA1 Message Date
jenkins-bot be04b6c6e4 Merge "Add BetaFeature for CodeMirror 6" 2024-11-26 02:53:19 +00:00
MusikAnimal 6ad8e6231b Add BetaFeature for CodeMirror 6
Don't list beta feature if $wgCodeMirrorV6 is true

Move all images to new images directory

Bug: T376735
Change-Id: I3ce25cccb7c66fbf5c719e6b704af9c22f405876
2024-11-25 14:03:05 -05:00
MusikAnimal f62a2be966 CodeMirrorWikiEditor: properly manage WikiEditor buttons
Fixes an issue introduced with Ib65d47e989 where continually toggling on
and off CodeMirror would duplicate the search button exponentially, even
leading to browser crashes.

Create a new 'codemirror' toolbar group for the prefs button, styling it
just like the search group, and use WikiEditor's removeToToolbar() to
remove it.

Remove now redundant CSS classes.

Bug: T359498
Follow-Up: Ib65d47e98908b6a888d24157a235de4efe95a33b
Change-Id: If8ae9c0b04b2edcb30a5b8cd788214598a492d30
2024-11-25 02:37:57 -05:00
MusikAnimal 81ec0c292a Implement dark mode styles and use Codex CSS components in search panel
Use Codex design tokens where possible, and implement custom dark
theming for things for which there is no suitable design token.
This means we're changing the colors for light mode ever so slightly.

We need to style the search panel for dark mode, so we might as well
tackle T371436 and use CSS-only Codex components. The same is done for
the "Go to line" panel (can be opened with Mod+Alt+g). The messages in
this panel are now also localizable.

The search panel (and goto line panel) are abstracted, with helpers to
create the Codex components. These will not only be used here but also
for the upcoming preferences panel (T359498).

Visually, the search and goto panels were inspired by the 2017 editor
and share a similar layout. CodeMirror similarly uses a more compact
design than usual to maximize the real estate of the editor itself.

Other changes:
* Bump codemirror/search to get latest bug fixes
* Remove stylelint ignorance and fix errors
* Move CM5 styles to ext.CodeMirror.less
* Move CM-specific styles out of mediawiki.less and into codemirror.less
* Move WikiEditor-specific styles to codemirror.wikieditor.less
  (incidentally, these only apply to CodeMirror 6)
* Correct qqq documentation; the "dialog" should be called a "panel"
* extension.json: alphabetize list of messages

Bug: T365311
Bug: T371436
Bug: T359498
Change-Id: I6a3bbc6bce4e490886753ff484e377c1763de456
2024-08-29 18:59:57 -04:00