Commit graph

5027 commits

Author SHA1 Message Date
Adam Wight ab7d60ca05 Show specific error message in reflist when parent is missing
Bug: T372871
Change-Id: Idce84adc0100dfd73f02611f2825f3be1d2da223
2024-08-26 12:33:12 +02:00
jenkins-bot e9d2aecb5f Merge "Moving ref group knowledge into a dedicated data structure" 2024-08-26 10:10:37 +00:00
Adam Wight 6e03d2cafa Moving ref group knowledge into a dedicated data structure
Pushes per-group knowledge down into a structured object and give it
an interface, separated from the singleton cache across all groups.

Also changes the behavior of orphaned subrefs so that they're still
rendered as subrefs, with an error placeholder where the parent
should be.

Bug: T372871
Change-Id: I84e679a8365f3fbfabaf344d99f56f6d069c0776
2024-08-26 09:26:15 +00:00
thiemowmde 205cc3ecd0 Rename parser tests to avoid "book referencing" terminology
I try to be as consistent as possible here and avoid mixing
terminology.

Bug: T373307
Change-Id: I309916028328a7b8c93334c933baab1ac2a0233d
2024-08-26 11:21:11 +02:00
Translation updater bot b21b9a339e
Localisation updates from https://translatewiki.net.
Change-Id: I26e581d81dfb23e2aaacc8a72d2048d5fc77b30b
2024-08-26 09:21:51 +02:00
libraryupgrader 8cf48084cf build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: Iaa31d94a9c2eb550ed85e9f8165fd28a07a8a6bc
2024-08-24 17:46:15 +00:00
jenkins-bot caad08b63e Merge "Adjust indentation of subrefs in reflist for mobile view" 2024-08-23 22:58:50 +00:00
Subramanya Sastry b3af8fdcfd Parsoid: Add newline after every reference list item
Updated known failures to include the new output for previously
failing tests.

Bug: T372889
Change-Id: I32b2a7cff144d74f646962bb28a83180e5446798
2024-08-23 14:31:33 +00:00
mareikeheuer 52956bed11 Adjust indentation of subrefs in reflist for mobile view
Based on the mobile version evaluation in task T370876, indentation is aligned for subrefs in the reflist for mobile view to match the web version

Bug: T371666
Change-Id: I40a3fe0b9cc607365e0ead26cf554921fe0abc5b
2024-08-23 11:11:27 +02:00
jenkins-bot 1bbae40ca5 Merge "Show error message in ref edit dialog for orphaned subref" 2024-08-23 08:02:54 +00:00
Translation updater bot 4d14e6fa61
Localisation updates from https://translatewiki.net.
Change-Id: Ib15727bdb52343ec729deb34eaa03ff75c1e52e7
2024-08-23 09:45:46 +02:00
James D. Forrester a8985ad1e1 build: Update MediaWiki requirement to 1.43
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: Ibc1f2c62054f76423778af600cf7b563c8a10f1b
2024-08-22 16:43:49 -04:00
Adam Wight ce16e4a4cb Show error message in ref edit dialog for orphaned subref
Bug: T372871
Change-Id: I2b5c99f699ac4113f90b0b22913f1b7119d1d8ce
2024-08-22 17:27:51 +02:00
Adam Wight 438eed5c54 Show error placeholder in context item for orphaned subref
Bug: T372871
Change-Id: Ifc183b33793fb8e5c736488569f47838c138ce2e
2024-08-22 16:46:01 +02:00
Adam Wight 3c4d198eaa Tighten up test mock
Caller can be more ignorant about what happens inside the mock.
Mostly, this patch is meant to prepare for an internal refactor,
minimizing test changes.

Bug: T372871
Change-Id: Ie08624fea4a89ce6a6f61d5430cf5b7eb95278fa
2024-08-21 15:22:06 +02:00
Adam Wight 99c4c9856a More robust and thorough numbering test
Check all refs, and only check outputs without coupling to class
internals.

Bug: T372871
Change-Id: I99187b09b0d93e1fb19fedf80a8e4fe64fe4e7ac
2024-08-21 15:19:32 +02:00
Translation updater bot dfa08cbb03
Localisation updates from https://translatewiki.net.
Change-Id: Id8979317b7ace536692740998aeec173400f003a
2024-08-20 09:41:54 +02:00
Translation updater bot 934960b07b
Localisation updates from https://translatewiki.net.
Change-Id: Ifb602e7086bd59d3052e5c38a68bbf95f486da5e
2024-08-19 09:22:34 +02:00
Translation updater bot 203b9b7e2a
Localisation updates from https://translatewiki.net.
Change-Id: I5acd2b0a5ef95398f482678add4e6ba303b49011
2024-08-16 09:27:30 +02:00
jenkins-bot 7f14cc8679 Merge "Git rid of the ref class property in the dialog class" 2024-08-14 08:57:33 +00:00
WMDE-Fisch f5c96716f0 Git rid of the ref class property in the dialog class
The model is now fully owned by the edit panel and I could not find
any usages of this outside of that class using codesearch.

Bug: T369005
Change-Id: I911fee99d6c910e6e40e0b3cbdb4c7ab60b413c6
2024-08-13 18:41:31 +00:00
WMDE-Fisch 70e1f91bc0 Set more methods private in EditPanel class
These are just for internal use.

Bug: T369005
Change-Id: Ia3c6338c79c3ec4144727c841c24ea5066060eed
2024-08-13 20:37:42 +02:00
WMDE-Fisch 3af9dfdb71 Move event handler to the EditPanel class
Making sure that change events form the fields are handled in the
panel and forwarded to the dialog with the information needed.

Also slighly moving some calls in the setup process that inits
the dialog and removing some duplication. Calling focus on the
edit panel only makes sense in the ready step. Not during setup.

Bug: T369005
Change-Id: I4f9a022a06ec6543b106620eae030235b8f6712b
2024-08-13 15:53:24 +02:00
jenkins-bot e163f354a5 Merge "Add method to get the updated ref from the edit panel" 2024-08-13 13:22:15 +00:00
jenkins-bot 17241a296a Merge "Fix typo in closing sup tag in parsoid html in a test" 2024-08-13 07:55:03 +00:00
Translation updater bot 7d7a2469b8
Localisation updates from https://translatewiki.net.
Change-Id: I45f0398a3c72bf8c2d5e48e5f9e40887ac7837e3
2024-08-13 09:50:20 +02:00
Subramanya Sastry e66fedcfbe Fix typo in closing sup tag in parsoid html in a test
Change-Id: I06b827ed4b03216eaf73296739cb428eabe14aae
2024-08-12 16:23:36 -05:00
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 d847caf5b8 Merge "Hide main ref warning on orphan refs" 2024-08-12 13:34:09 +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
WMDE-Fisch 3d0a88c384 Hide main ref warning on orphan refs
Also adding tests.

Bug: T369005
Change-Id: Icb3deaf0c8e14e34bd05455590bd9680a7a5adec
2024-08-02 15:33:44 +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