Commit graph

5101 commits

Author SHA1 Message Date
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
thiemowmde 0e0cbaf784 Fix incomplete test setup now that ref items are objects
We forgot to update this in I405fe7a.

Bug: T353451
Change-Id: I7c66983466fe0517fa84ef720b59aed5e496491b
2024-07-21 14:28:59 +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 55ef3dee9e Fix missing cursor focus visualization in reference search
This is really just a bug. The reuse tab in the reference dialog
always supported keyboard actions (cursor up and down). It was just
impossible to see it because the OOUI base widget we use here doesn't
come with a default styling for this. I suspect this got lost with
some OOUI update years ago. Let's just fix it.

The colors are what OOUI dictates for this situation.

Bug: T360034
Change-Id: I6cfd423830bc0cc86b1aff5dc08a53c49b6e2d9f
2024-07-19 17:54:15 +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
WMDE-Fisch eb6624a6f9 Remove static leftovers that moved to MWReferenceEditPanel
When Citoid uses these from the new class they can be removed here.

Bug: T369005
Depends-On: I46fa9fe72b4d095291a01c208cac6c98df2ec088
Change-Id: I1aef5d6a05308191d7d8608902a38c801039af7e
2024-07-18 20:34:29 +02:00
WMDE-Fisch 36d9270c1c Introduce MWReferenceEditPanel to extract editing UI
First step to move the UI parts that are relevant for creating,
editing (and extending) a reference to it's own class.

There remains some duplication because of the sub-referencing in
Citoid currently depending on the static properties to build its
own editing interface.

More patches follow, I just wanted to keep it small for reviewers.

Bug: T369005
Change-Id: I8588cde1a54cd505a57a36ed97fc591653c9fb6f
2024-07-18 14:46:23 +02:00
jenkins-bot 26632dbb0c Merge "build: Update jsdoc-wmf-theme to 1.1.0" 2024-07-18 12:21:28 +00:00
jenkins-bot 9d4050b1e0 Merge "Use MainConfigNames constants in tests where possible" 2024-07-18 12:16:12 +00:00
jenkins-bot ae776a32ce Merge "Rename ReferencePreviews i18n keys from Popups" 2024-07-18 12:16:10 +00:00
jenkins-bot 66603a01df Merge "Rename all remaining .css files to .less" 2024-07-18 12:09:10 +00:00
Ed Sanders 9df2a07e19 build: Update jsdoc-wmf-theme to 1.1.0
Bug: T368081
Change-Id: I1449746b4f3ded811ca512bc9719b3f314763cc7
2024-07-18 13:53:28 +02:00
WMDE-Fisch c87e6046ff Rename ReferencePreviews i18n keys from Popups
Final step to get the i18n key names align with this extension.

Note that the few community overrides should have a copy of the
keys we're changing here in place so the overrides work for both
variants as long as the deployment is not finished.

Bug: T363156
Change-Id: Idf098d2cb04e8f02247b78e6b4866338eaf02b44
2024-07-18 11:47:14 +00:00
thiemowmde a62e855697 Disallow recursively extending already extended references
Note that the duplicated search panel is most probably a temporary
solution anyway. We probably want a single search panel that can do
both kinds of "reuse with/without different details".

This is also inconsequential for production. Nothing related to
extended references is currently visible on production.

Added to the otherwise unrelated T369005 for code review purposes.

Bug: T369005
Change-Id: Iedee38dacc01ae59fb1a681e49e655ca91b25b64
2024-07-18 08:59:50 +00:00
Translation updater bot f2146c043f
Localisation updates from https://translatewiki.net.
Change-Id: I6acdd975ff86c3accd32db596c69682a11452d75
2024-07-17 09:33:23 +02:00
WMDE-Fisch e7443560f0 Introduce a clearSearch method for the ReferencesSearchWidget
Mainly to support the activity tracking use case where we want to
track an active use everytime the user starts anew in this UI.

Bug: T368533
Change-Id: Iecf7e697bbbd637c4a00a44debf615c2351eb390
2024-07-16 16:21:35 +02:00
jenkins-bot eae980a8e7 Merge "Cypress: selecting the reuse tab is fragile" 2024-07-16 14:13:57 +00:00
jenkins-bot 7bb639d667 Merge "Use the term reuse for code related to that use case" 2024-07-16 14:13:55 +00:00
WMDE-Fisch dc67570f96 Use the term reuse for code related to that use case
I found that the code is in some cases not clear with the
terminlogy. Let's start by making it at least more clear what's
related to the "reuse" use case.

Change-Id: I5325489be3b14276b0163d8cb8b84215b55d041e
2024-07-16 13:41:55 +00:00
WMDE-Fisch c732ee1e96 Cypress: selecting the reuse tab is fragile
Similar to Ie79be1dbc1b7469cffc380478cf2d24bbe06f470

Change-Id: I8ea8951629ec7545261752a4e5f4f4db2ae60b41
2024-07-16 15:02:29 +02:00
Translation updater bot bc7910dcba
Localisation updates from https://translatewiki.net.
Change-Id: I53e377004ddfc9af4276a5a447a346e5a6159cbd
2024-07-16 09:39:17 +02:00
thiemowmde 6dc56deebd Rename all remaining .css files to .less
Change-Id: Ib41cad1e14243577c0a78becb2bc5cb6a50afa5d
2024-07-15 21:59:02 +02:00
jenkins-bot d4573aab0d Merge "Wire subref counting into the numbering renderer" 2024-07-15 12:06:21 +00:00
jenkins-bot 6315e0da7b Merge "Use existing extends warning i18n" 2024-07-15 07:39:26 +00:00
Translation updater bot 2981378a56
Localisation updates from https://translatewiki.net.
Change-Id: I3cf88bd6289fd785000a65217650a047d0eaf9c8
2024-07-15 09:23:36 +02:00
Adam Wight 5b2cbc48bd Wire subref counting into the numbering renderer
Significant change is that footnote marker numbers are changed from
being a CSS-rendered marker to using the rendered "fallback" text.
This could be avoided using the same trick as is implemented for the
reflist: send an inline style variable with the marker content; but
let's only do this if really necessary for user experience.

Template-produced refs are still wrong, but this patch continues to
render them as they come from Parsoid, in the content script.

TODO in later patches:
* reuse of a subref is rendered as '3.2.1' in reader view but '3.0'
and '3.1' in the editor.
* subref numbering is backwards in RTL languages

Bug: T247921
Change-Id: Ieff73769f8ebbc3724f6a9b498487c4e7d09aa2e
2024-07-15 07:08:06 +00:00
WMDE-Fisch 9266cce141 Ignore placeholders when getting refs from document
Citoid uses placeholder refs to preview where a new/re-used ref
would be added. This also influences the counting and preview in
the reference list for the moment the placeholder is visible.

I can image this that this might become a feature in the future
but for the moment it's a distraction IMO.

Bug: T247921
Change-Id: I5c5e84ae4b183f99530fda0736a58139e9e25d1a
2024-07-12 18:14:36 +02:00
jenkins-bot 660214f9cf Merge "Cypress: selecting the manual tab is fragile" 2024-07-12 11:33:24 +00:00
Adam Wight a0af51b476 Fix: safely handle refs which have no "firstNode"
This can apparently happen when pasting refs from another document.

Bug: T247921
Change-Id: Ibe8c4d1625d2b6c9a11d9b4fea85c305f84265fa
2024-07-12 12:41:01 +02:00
David Lynch 68a3eb496e Cypress: selecting the manual tab is fragile
A change to the citoid error message referencing the manual tab is
breaking this test.

Bug: T364595
Change-Id: Ie79be1dbc1b7469cffc380478cf2d24bbe06f470
2024-07-11 11:59:39 -05:00
WMDE-Fisch c0d98cdd4f Use existing extends warning i18n
Also introducing a line break to make the difference a bit more
clear what's part of the message.

We still probably want parsed content and not only text here.

Bug: T247922
Change-Id: If545ab2fe1d807a6bcbcdfc0c3b7de83817554e6
2024-07-11 13:16:14 +02:00
Adam Wight 08969af51c Make content language data available to VE
We have a use case in which the client needs to be able to use
language utilities in the content language (footnote markers), so the
data must be wired through.  This will only be done in VE, and in the
special case that the interface language != the content language.

Bug: T369613
Change-Id: I2c10e1e36ba594da98e0efa433dd9e1a25aae6fe
2024-07-10 13:41:31 +02:00
thiemowmde 4d8ec5ebc5 Use MainConfigNames constants in tests where possible
I believe this makes the code less brittle, and also makes it a bit
more obvious what these strings are meant to represent.

Change-Id: I0c5cdaa0b94b525ad3e65278ca9bf088f480df40
2024-07-10 12:44:36 +02:00
jenkins-bot e22dc3c08b Merge "Split FootnoteMarkFormatter code into logical pieces" 2024-07-09 08:47:38 +00:00
jenkins-bot 1b5c3f241a Merge "Re-enable linting tests post-sync" 2024-07-08 23:57:40 +00:00
Translation updater bot 81bb451395
Localisation updates from https://translatewiki.net.
Change-Id: I0ae952009d28914848da86ee6b290a41b8cb2686
2024-07-08 09:32:30 +02:00
thiemowmde 36f4ab138d Split FootnoteMarkFormatter code into logical pieces
This is motivated by T367749 where we probably need this code to be
separated. This minor refactoring just moves existing code around
without changing anything. The idea is just to make the concepts more
visible in the code.

Bug: T367749
Change-Id: I765d19fa9cb43a6f8492b707a7ae46ddffe43897
2024-07-07 14:14:39 +00:00
Arlo Breault c44eaf6f96 Re-enable linting tests post-sync
Depends-On: Ibc421e4c2e339133f5f8879517cc22c8ce58c502
Change-Id: Ibaac02cc51787ae3b26a2be23c7d00bcf38ecf5f
2024-07-05 12:58:09 -04:00
Arlo Breault d9351bc0f4 Disable linting tests temporarily for cross repo sync
Change-Id: Ibaef82dc9c72d290c2f92f03cf518b413a77f8ad
2024-07-05 12:55:29 -04:00
jenkins-bot 13474951dd Merge "Additional parser test cases for delayed extends usage" 2024-07-05 11:33:54 +00:00
jenkins-bot 5dc88f01db Merge "Promote orphaned subrefs to the top level" 2024-07-05 11:25:58 +00:00