Commit graph

5052 commits

Author SHA1 Message Date
Raimond Spekking 1882c463f2 Merge "Localisation updates from https://translatewiki.net." 2024-08-29 16:31:16 +00:00
jenkins-bot 1bae4d71c9 Merge "[refactor] Update some usages to new refs interface" 2024-08-29 12:23:14 +00:00
Adam Wight 633969300b [refactor] Update some usages to new refs interface
Change-Id: Idfffbe92ad1385e85b078bc4794a529c5f770eae
2024-08-29 13:21:48 +02:00
jenkins-bot 72056c5fd0 Merge "Make use of createNoOpMock in ReferenceListFormatterTest" 2024-08-29 10:21:44 +00:00
Translation updater bot 568cbfdd12
Localisation updates from https://translatewiki.net.
Change-Id: I2f148433c357c0f7a6804d703768fc5b48c70a7f
2024-08-29 09:17:33 +02:00
jenkins-bot 43274e9716 Merge "Reword the missing main ref hint in editing and context menu" 2024-08-28 13:47:18 +00:00
jenkins-bot 179e12f4ec Merge "[refactor] groupInput takes narrower parameters" 2024-08-28 08:09:55 +00:00
jenkins-bot 99d2cce694 Merge "[refactor] New interface in MWReferenceContextItem" 2024-08-28 08:06:54 +00:00
jenkins-bot 95263957a1 Merge "Clean up reflist usage of MWGroupReferences" 2024-08-28 08:03:25 +00:00
Adam Wight b69614fc82 [refactor] groupInput takes narrower parameters
Simple parameters hide knowledge and ease testing.

Change-Id: I9a8549199a1de07b437caf274c8d5e842183f570
2024-08-28 05:48:44 +00:00
Adam Wight 8c08491752 [refactor] New interface in MWReferenceContextItem
Switch to MWGroupReferences interface.

Change-Id: If6b0ee307ea8d44de8859953135be6e06f3e19e3
2024-08-28 05:47:31 +00:00
Adam Wight 35e8af7d40 Clean up reflist usage of MWGroupReferences
Switch this usage entirely to the new interface, moving much of the
junk out.

Bug: T372871
Change-Id: I445af469a823144b0b6fa5e6f4f23a858939e9e6
2024-08-28 07:45:39 +02:00
jenkins-bot de213b34d2 Merge "[refactor] Inline single-use variables" 2024-08-27 20:36:13 +00:00
jenkins-bot 6e6a7ebf2a Merge "Add parameters to Cite error messages in Parsoid" 2024-08-27 11:51:56 +00:00
Adam Wight 850586c625 [refactor] Inline single-use variables
Change-Id: Icee82498a9e7c9645ef2a9dc84be230a6d68ba42
2024-08-27 10:54:17 +00:00
Isabelle Hurbain-Palatin 3774c86a64 Add parameters to Cite error messages in Parsoid
The Parsoid error messages are missing a couple of parameters, according
to the json i18n files; this patch fixes that issue.

Change-Id: I4232c0b71ecc6d6f1220db3988e67d9cd4eb3d58
2024-08-27 12:01:30 +02:00
jenkins-bot 56ccdd0e48 Merge "Move existing ReferenceListFormatter code closer together" 2024-08-27 09:40:50 +00:00
jenkins-bot 9fb20ec09a Merge "Remove not needed int type from ReferenceListFormatter" 2024-08-27 09:37:49 +00:00
jenkins-bot f282a28021 Merge "Fix and update styling in reference re-use dialog" 2024-08-27 08:15:20 +00:00
Translation updater bot bcc6e2be69
Localisation updates from https://translatewiki.net.
Change-Id: I6bee2abcca5c448fc73a8c87714f51f841db608e
2024-08-27 09:47:16 +02:00
thiemowmde a3a6091534 Fix and update styling in reference re-use dialog
This makes the dialog's behavior much more robust, especially when
confronted with overly long and complex references.
* Limit the height of list items to avoid the situation where a
  single item overflows the dialog. This makes it especially hard
  to navigate with the cursor keys. We can't see any more what's
  going on. The proposed height is intentionally a very high upper
  bound, equivalent to about 2/3 of the dialog's height.
* Limit the name on the right side to take up less than half of an
  item. The left side is for the content. Usually the names are very
  short anyway. But if a name is long it currently creates a mess
  where the name is intertwined with the content.
* Break overly long words in references.
* Changing the opacity to use upstream values makes the dimmed names
  a bit darker. I think this is good, even necessary for legibility.

Technical changes:
* Use LESS variables from upstream, where possible.
* Remove redundant `relative` already set upstream.

Bug: T372385
Change-Id: Ie59b7b7e4aa7eadc8f82b39884313f5aa8cfd950
2024-08-27 07:07:06 +00:00
WMDE-Fisch d55d641314 Reword the missing main ref hint in editing and context menu
I think that the message is more clear when it starts with the
subject we're describing. That also seems to be the case in other
messages here.

It also aligns with the wording in referenceslist-missing-parent:
"There are subreferences with a missing parent reference."

Bug: T372871
Change-Id: If9a49faccb6cbe2000b15a2d28bd66565cce0e90
2024-08-26 23:13:43 +02:00
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
thiemowmde b223649f9d Move existing ReferenceListFormatter code closer together
This moves existing code around a little bit without changing
anything, as proven by the tests.

This is motivated by Iaca0e14.

Change-Id: I30366d32b07f87f238b045f0d7817686b5cc26bd
2024-08-13 12:42:02 +00:00
thiemowmde a4ffedbcc2 Remove not needed int type from ReferenceListFormatter
It's always a string anyway. Also improve the test coverage. The
localization was pretty much untested before.

Change-Id: Ie6f34c67ae7dd9559346eb45a2604e14c5633991
2024-08-13 10:46:52 +02:00
thiemowmde 3cebd437e8 Make use of createNoOpMock in ReferenceListFormatterTest
The main benefit is that this makes it more obvious what is actually
under test, and what's not.

This is mainly motivated by the ongoing work in Iaca0e14.

Change-Id: Icbf1b824ba1f5468dbdb30445134db2b568e19f8
2024-08-13 10:41:04 +02: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