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
Singleton always steps up to the original document from fragments, to
give absolute numbering.
Bug: T370874
Change-Id: I0353649289f6c8fe26fa6bdff5d2367b7b575bac
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
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
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
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
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
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
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
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
A change to the citoid error message referencing the manual tab is
breaking this test.
Bug: T364595
Change-Id: Ie79be1dbc1b7469cffc380478cf2d24bbe06f470
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
We want it to be possible to turn a <ref> into an extended one after
it was re-used for the first time, not knowing if it later turns out
to be an extended ref.
This should work: <ref name=x/> is a short re-use of a ref that later
turns out to be a <ref extends=… name=x>…</ref>.
<ref name=x></ref> is just another syntax that should behave
identical.
However, it should probably not be possible to turn
<ref name=x>foo</ref> into a subref later because it really, really
looks like a normal ref. Even if the content matches with a later
<ref extends=… name=x>foo</ref> and we usually ignore identical
content, I suggest to block this with a dedicated error message. But
this is for a later patch. This patch here just documents the status
quo.
This patch also contains minor code cleanups that will be useful in
Ia752a7d.
Bug: T367749
Change-Id: Ie38769b36e5c476b96e7af7f03b0fc800b32ba97
MVP implementation for adding a warning when editing a reference
that's the extension of another. In the current approach we're
just using the elements .text() like we do when you create an
extended reference.
Bug: T247922
Change-Id: I2fc574152059937b4aa3fc25ee486d363cc809d5
Includes renaming the method so it's more clear what it's doing.
As preparation for adding the extends warning to the edit pane and
to allow easier identification of parts belonging to the edit
workflow.
Change-Id: If84c5dbdee19c0ebc0a28b50dda93fef3f558c6e
I could just remove the getElementById replacement that was
failing the tests. In the Popups extension there really is a
renderer test that mocks this function call but that test is not
part of this file.
Also it seems that tracking is never triggered here. I think that
the beacon overwrite was only added to avoid tracking.
See I2638611ba67b785338f7e98a1c4b08a5e829812d
Change-Id: Ic3540f6f73783e79c81e2b693d2bf96cfc7fc66b
The Citoid dialog won't be available when the .json configuration
is missing. That's why test always failed here when triggered
from the Citoid CI.
Bug: T366383
Change-Id: I88ad478250328896c504ccbc95a973d4a0100dd7
In some cases the click on the save button did not trigger the
save dialog. After playing around with this, it seems that the
only thing helping here is a little pause.
Even if we wait for the button to change the state to `enabled`
the click sometimes does not trigger the dialog.
Bug: T366383
Change-Id: I2754fd5a0e9b439e9e0378f3597f67e743a6d0c1
I could identify and fix the issue in
I3224c6131a6e959821bc36e4525889e5088777a2
stress test run fine see
I8e38e8cc533065998f91794a9e490d38d77ad21a
Bug: T368267
Change-Id: Ib7db6c39988ef45404817b8c7a68132572f16e36
This was never working it seems. The result of the check needs to
be wrapped in an expect() call.
Bug: T368267
Change-Id: I3224c6131a6e959821bc36e4525889e5088777a2
The idea is to make the code less ambiguous and easier to predict.
We passed the same information around two times in a few places.
Change-Id: I39c7a2962bb70bbe40074986e63b1051d0766ea2
Same as in I7e82e03. The extra "shield" element was added in
2013 (!), see Ib244ff6. Back then we couldn't use the CSS property.
But nowadays we can.
Bug: T360034
Bug: T367030
Change-Id: Ib41e062491e65eabc8a52facefe283ba04ce16ff
This makes it much easier to deal with the internal auto names
used on new elements created during one edit session.
We're ignoring the correct generation of the auto name literals
for now.
Bug: T367031
Bug: T367030
Change-Id: Idd579970cb64500dac27053213e9b116f23b6d76