Commit graph

4987 commits

Author SHA1 Message Date
Translation updater bot bde79b6a61
Localisation updates from https://translatewiki.net.
Change-Id: I2b315df554f6a1444e9b3175d0706410893d75ed
2024-08-12 09:22:11 +02:00
libraryupgrader 0ccfdc41e7 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 43.0.0 → 44.0.0
* mediawiki/minus-x: 1.1.1 → 1.1.3

Change-Id: I72a2f4568f516075a4fb713c0718b95f1f212e7c
2024-08-11 03:53:05 +00:00
thiemowmde fb8494b4dd Relax support for error/warning message keys with dashes
This is a direct follow up for I6f05842 where we already started
supporting dashes, but converted them to underscores. The only change
in this patch is that the CSS class will use the message key as it
is, without the dashes being converted to underscores. I added a test
case specifically for this.

Bug: T352676
Change-Id: Ic22e897c27b8371e3b1ed63932b619e7af71bd5c
2024-08-09 12:29:34 +00:00
Translation updater bot 70a19357f3
Localisation updates from https://translatewiki.net.
Change-Id: I9f0054a7cee1233669adccbbd9f36b4f1b36fd3a
2024-08-08 09:19:17 +02:00
Translation updater bot e9d8aa1f25
Localisation updates from https://translatewiki.net.
Change-Id: I57fe9d001d75b5caf2499184f74fd4cf5c927eef
2024-08-06 09:46:17 +02:00
Translation updater bot 26d8a80cb5
Localisation updates from https://translatewiki.net.
Change-Id: I1fe4ce3d87042a69ca9eaee30b43a1023acf8f81
2024-08-05 09:24:41 +02:00
jenkins-bot 0ad0baa001 Merge "Don't use the edit form when reusing a reference" 2024-08-02 10:11:46 +00:00
Adam Wight 4328a8c9bd Test orphaned subrefs
Change-Id: If3091b5a7e1ac382d95691bade0cfff2d418d270
2024-08-02 08:18:33 +02:00
WMDE-Fisch cc6aec4c77 Don't use the edit form when reusing a reference
There's no need to populate and use the form fields when we're
reusing a reference. The group and content are already stored
in the model and we can insert more directly.

I found that it's also not needed to update the internal item
because we're not changing the content or group. The same is done
in Citoid when reusing a reference.

Bug: T369003
Change-Id: I57315aafb73b0cd68a0d397d2f79833ac54a7c7f
2024-08-01 18:09:07 +02:00
jenkins-bot 6c508d0c95 Merge "Reading mode square brackets become customizable through CSS" 2024-08-01 12:37:52 +00:00
jenkins-bot 8ef86b2f0f Merge "Rename function to getIndexLabel to clarify that it's presentation" 2024-08-01 06:33:30 +00:00
Translation updater bot 5390af6c37
Localisation updates from https://translatewiki.net.
Change-Id: I4e3c07184856ef853e3aaef690b9f29b59eb1b3a
2024-07-31 09:22:33 +02:00
jenkins-bot a9b8380bcb Merge "Helper function getAllGroupNames" 2024-07-30 12:30:14 +00:00
Adam Wight baedd6c44c Rename function to getIndexLabel to clarify that it's presentation
Bug: T370874
Change-Id: I2e00aca86d2a97f8dff11b742e010ef117b5522a
2024-07-30 12:05:25 +00:00
Translation updater bot 8cfe81657e
Localisation updates from https://translatewiki.net.
Change-Id: Iafeb6359268042d54e8b8d30c76d217738204b20
2024-07-30 09:42:37 +02:00
Adam Wight 06e7dda6a3 Helper function getAllGroupNames
Bug: T370874
Change-Id: I8d61b1ab428ab30e250c8dad05d1b97e15905ed5
2024-07-30 00:00:50 +02:00
jenkins-bot caee02b888 Merge "References always deal with original document" 2024-07-29 21:29:30 +00:00
jenkins-bot 014b0bcffb Merge "Test MWDocumentReferences on subref doc" 2024-07-29 21:29:29 +00:00
jenkins-bot 35b104e292 Merge "Move more editing methods to the EditPanel" 2024-07-29 13:52:07 +00:00
Adam Wight 3e2d060037 References always deal with original document
Singleton always steps up to the original document from fragments, to
give absolute numbering.

Bug: T370874
Change-Id: I0353649289f6c8fe26fa6bdff5d2367b7b575bac
2024-07-29 11:45:24 +02:00
Adam Wight c54000ed86 Test MWDocumentReferences on subref doc
Change-Id: I8fb9bee9f0f1447b38d6d67033c42c05934d1e12
2024-07-29 11:45:24 +02:00
jenkins-bot 96bba4a1e3 Merge "Add basic QUnit test for MWDocumentReferences" 2024-07-29 07:59:23 +00:00
WMDE-Fisch f9b9c7aa9b Add basic QUnit test for MWDocumentReferences
Change-Id: I40a62ceecc4ab5d0b4b6154bd934ccf4ae6a2774
2024-07-29 09:33:23 +02:00
Translation updater bot d3431d5302
Localisation updates from https://translatewiki.net.
Change-Id: I4d03f63062d35d457acd30f1af446b47531cc158
2024-07-29 09:26:12 +02:00
WMDE-Fisch 8b60ead109 Move more editing methods to the EditPanel
Mainly leaving out the event handling for the change detection to
still keep it simple.

Also the data flow back for editing the content is still somewhat
opaque because the relevant data is passed by reference. I might
change that in follow up patches so it's more clear.

Bug: T369005
Change-Id: I93b62791ef10bf318697905af8a0c5b5d438fdb5
2024-07-26 17:45:23 +00:00
jenkins-bot c50282b381 Merge "Switch reuse dialog to use shared numbering mechanism" 2024-07-26 10:06:56 +00:00
Adam Wight 257b3f3816 Switch reuse dialog to use shared numbering mechanism
This patch gives us the same number as will appear in the document,
even when subrefs are present.

Tests could be improved using sinon to check some call assertions
but should be fine for now.

Removed the test for placeholders, because these should be filtered
in MWDocumentReferences.getGroupRefsByParents()

Bug: T370874
Change-Id: I7543a6593308c529bcfbeb0835a7c0882cbf8621
2024-07-26 09:44:36 +02:00
Translation updater bot c29b10683d
Localisation updates from https://translatewiki.net.
Change-Id: Ieb35a338d876deb54874e95d7c0ccc04d02e2e8c
2024-07-26 09:43:38 +02:00
Translation updater bot 886751669f
Localisation updates from https://translatewiki.net.
Change-Id: I605a1e4827c83860d68b727d5167d9350c7e10ce
2024-07-25 09:18:38 +02:00
Adam Wight 7691f49ea8 Parent is shown as HTML in the subref edit dialog
Minor tweak to render the parent as HTML, without fixing anything
else about the layout.

Bug: T370873
Change-Id: I507acf7b86a20d1965bbb32fdc0132b41c929d0c
2024-07-24 16:09:50 +02:00
Adam Wight 8aa889dbe6 VE square brackets appear in a span
Some wikis such as eswiki and frwiki prefer to hide the square
brackets by default.  Adding a selector-friendly DOM element around
the brackets supports this customization.

This makes it possible to hide the brackets with CSS:

  .cite-bracket {
    display: none;
  }

And it also becomes possible to hide the brackets but make them
appear in copy-pasted article content:

  .cite-bracket {
    font-size: 0;
  }

Bug: T370512
Depends-On: I56b52c399d2c76689fdcb0bc7fd50a8c0ced28fd
Change-Id: Id8684ccee2e6725af2c861da20fc31af1067e614
2024-07-24 12:31:00 +02:00
Adam Wight 525b7ab876 Reading mode square brackets become customizable through CSS
Now the brackets can be hidden with `display: none;` or made
invisible but appear in copy-pasted content with `font-size: 0;`.

Bug: T370512
Change-Id: I21accb6bf9cdd7f96144cc9a762ff889e48efca4
2024-07-24 12:14:07 +02:00
Adam Wight 5542e4ea45 Respect wgTranslateNumerals in Cite footnote markers
Some wikis prefer to use Western Arabic numerals rather than the
digit transformation table associated with the content language
script.  For these, we should respect the existing
$wgTranslateNumerals configuration settings.

Bug: T370585
Change-Id: I663ae28c5b5d4fdd66b8590eb0b453ec25c2db84
2024-07-23 16:07:20 +02:00
jenkins-bot 809e713ade Merge "[refactor] finish abstracting the parsoid language style overrides" 2024-07-22 17:25:17 +00:00
jenkins-bot dfb107a22a Merge "Fix broken reference to the new EditPanel class" 2024-07-22 14:25:13 +00:00
jenkins-bot 3387a59802 Merge "Remove static leftovers that moved to MWReferenceEditPanel" 2024-07-22 12:10:57 +00:00
WMDE-Fisch 42b658004b Fix broken reference to the new EditPanel class
Missed that in I8588cde1a54cd505a57a36ed97fc591653c9fb6f

Bug: T369005
Change-Id: Ia08ac2d3d41ece91fe6b75d607d7b18f57f39333
2024-07-22 13:23:20 +02:00
jenkins-bot e5b4d9edfb Merge "Introduce MWReferenceEditPanel to extract editing UI" 2024-07-22 10:08:34 +00:00
jenkins-bot 033045c99b Merge "Drop redundant fallbacks from parsoid-styles directory" 2024-07-22 09:59:49 +00:00
jenkins-bot d167c8e293 Merge "Fix reference search not working with uppercase groups/names" 2024-07-22 09:52:09 +00:00
Adam Wight ed8f499cb8 [refactor] finish abstracting the parsoid language style overrides
This should cause no user-facing changes.

Now the per-language overrides are expressed as pure data and styling
happens in a single file.  We can clearly see the types of
customization that have been made so far.

The CSS styling has also been enhanced, it can now be customized by
setting the CSS variables alone.

Bug: T370027
Change-Id: I2a1bf0365ac0c40991a4fe3f9a2c05dba8b7510c
2024-07-22 11:35:09 +02:00
jenkins-bot eaf9f4b8e8 Merge "Start using design tokens in .less files relevant for VE" 2024-07-22 07:31:45 +00:00
Translation updater bot b26e3fca8d
Localisation updates from https://translatewiki.net.
Change-Id: Id044f6e9bc100ebe96e6e8c30820854d028afbf6
2024-07-22 09:24:03 +02:00
Umherirrender f58114be65 tests: Use LanguageFactory to create qqx language
Bug: T343771
Change-Id: Ib7ec113a21fd36a82c0345ffb98ed8692d82155d
2024-07-20 21:40:18 +02:00
thiemowmde aa6a5c3bf2 Start using design tokens in .less files relevant for VE
Note this actually changes the "subtle" color to be darker. As far
as I understand this is an intentional decision. The old color token
from OOUI is deprecated and intentionally made darker in Codex.
See Ie667c35 and most notably T313502.

Change-Id: I37ad25aa6821d61fe3321e1390d1ccf987075250
2024-07-19 17:45:17 +02:00
thiemowmde 5ef0ccdaa6 Drop redundant fallbacks from parsoid-styles directory
These .less files are pointless because these languages have
fallbacks, and the .less file for the fallback is identical. The
behavior on the cluster will not change when we remove these
files. Another file with the same rules will be loaded instead.

I made this patch algorithmically by writing a piece of code that
iterates all existing .less files, checks if the language does
have fallbacks, and if one of the fallback .less files is
identical.

I also updated the existing test case to reflect what's going on.

Change-Id: Iab647956f7bf45e59da1af33ff2b3e81ad016b4c
2024-07-19 15:00:01 +02:00
thiemowmde f1bd3175fd Replace copy-pasted CSS snippets with LESS @imports
There is a lot of copy-pasting going on here. I hope the longer file
names also make it more obvious what's actually happening here.

Change-Id: I1cb5fe230cc8e2b90d97f92bc0156110afd6fc79
2024-07-19 14:33:02 +02:00
thiemowmde 883fa0a4ba Remove redundant per-language CSS identical with the default
This is identical with the CSS in ext.cite.parsoid.styles.less that's
active for all languages. The small per-language files should only
contain details that are different from the default.

Change-Id: Ic5470772e3138a7711d006dffa88e727f46bddd6
2024-07-19 12:11:36 +02:00
thiemowmde 7f33002411 Fix reference search not working with uppercase groups/names
The internal search index is optimized and expects everything to be
lowercase. This was already done for the text, but not for the name
and group. As far as I can see in the Git history this problem always
existed ever since this code was written.

This fixes an 11 (!) year old bug.

Bug: T53838
Change-Id: I12b3b7c23d34d49b630e9151525409dbddfac24e
2024-07-19 09:59:35 +00:00
Translation updater bot 9b8478bb59
Localisation updates from https://translatewiki.net.
Change-Id: I443bd05a6453c2d330080c736b3404a7e2bcd92d
2024-07-19 09:39:41 +02:00