Commit graph

4998 commits

Author SHA1 Message Date
WMDE-Fisch 48d0699f09 Add method to get the updated ref from the edit panel
That's another step to separate the editing form the dialog. The dialog should not know about internals of the edit panel.

And eventually the dialog can get rid of the referenceModel property.

Bug: T369005
Change-Id: I9cf3a68ef58bc5791497af362c0572734e4bcadd
2024-08-12 18:00:32 +00:00
jenkins-bot d056400800 Merge "Simplify ErrorReporter mocks in tests" 2024-08-12 09:17:19 +00:00
jenkins-bot e5808ef6fb Merge "Fix missing cursor focus visualization in reference search" 2024-08-12 09:17:18 +00:00
jenkins-bot 4d231c347c Merge "Fix incomplete test setup now that ref items are objects" 2024-08-12 09:02:25 +00:00
jenkins-bot 7955321a2f Merge "Remove unused test setup from ReferenceListFormatterTest" 2024-08-12 09:02:24 +00:00
jenkins-bot f11e415c24 Merge "Remove obsolete disconnect()" 2024-08-12 08:59:34 +00:00
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
thiemowmde f3b732bf93 Simplify ErrorReporter mocks in tests
In some tests we want to see the message parameters. But not here.
Simply echoing the message key (thats parameter number one) is
enough.

Change-Id: Id9824cbbe944c84c9fd1932b0863ac1b3f232b75
2024-08-07 18:22:59 +00:00
Translation updater bot e9d8aa1f25
Localisation updates from https://translatewiki.net.
Change-Id: I57fe9d001d75b5caf2499184f74fd4cf5c927eef
2024-08-06 09:46:17 +02:00
thiemowmde e078155e94 Remove unused test setup from ReferenceListFormatterTest
I think this was just a mistake in I5457304 when this test was
written. There was never an ->exists() call in the code, as far as
I can see.

This is motivated by our ongoing, probably year-long efforts to
clean this codebase up, see T335129.

Change-Id: I72d89213c5cff06d78ac119b3c79827afbd0b4f5
2024-08-05 16:25:03 +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
WMDE-Fisch 6bfe4f1c5d Remove obsolete disconnect()
I could not find any connect() was applied from this codebase to
the SurfaceModel. Looking back it seems that the code that connects
the event was removed in Icba13d84e10cf18a6c68e26448b2efe93b8c42b8
and the disconnect was never touched.

Bug: T369005
Change-Id: Ieab623751dd946ba43c42a1be144e6b3725abce3
2024-08-02 12:00:27 +02: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