Peel off some layers, remove some unused computation,
remove code from ve.init.mw.trackSubscriber.js (which
is to be removed in T332438).
Change-Id: I4073b9a2a4b2af06f30e603a9d2a1968203f3b6d
New changes:
1b912ce6b ve.ui.DiffElement: Don't override margin on added/removed block elements
a43720b34 [BREAKING CHANGE] Move ve.dm.MetaList to ve.dm.Document
e7d6d2317 ve.dm.VisualDiff: Include metadata in diff
Local changes:
* Use new ve.dm.MetaList API
Bug: T331925
Change-Id: Id21c122d48519013a5c3325cc4bc316cedcb63f6
Discussed in todays story time. The blue "active" color is mostly a
"reminder with which parameter I interacted last". It's more a
secondary, passive information. In contrast, the gray
highlighting/hover effect that appears when navigating the sidebar
with keyboard or mouse is an active, primary information ("this is
where you are right now"). It's really confusing when the keyboard
navigation indicator disappears behind the blue box.
This patch changes this for both top-level elements as well as
template parameters. The blue text color "shines through" the gray
highlight so we can still see both information.
Bug: T289043
Bug: T311204
Change-Id: Ief6a023d8fde4f6ca0c4b2ea2e831b66e1ea8c83
disableForAnons is used to present a single wikitext tab on
dual-edit-tab wikis, and/or default-wikitext red links.
Users who open the editor and then switch to VE should still
have that preference stored in a cookie when that happens.
Bug: T331462
Change-Id: If2a866cff7e54d2832f6aa22eb268eb125f2d1c2
These haven't been used for a while, and we usually enable experimental
features via BetaFeatures these days.
Change-Id: Iec3a7da3cc962d8ac9416b508780fcdc3ca58d3e
When checking for the presence of edit buttons, we should include
the VE edit button and the MinervaNeue page action link, but not
the "view source" button (which means the opposite: the user can't
edit).
Bug: T312632
Change-Id: I2eb6e833a0489c17cf8360aca61bd8b615e30461
Parsoid will start populating the link content with the alt text if it's
available before falling back to the filename. Preserving what's there
is needed to avoid dirty diffs during the transition and for cached
content. In the future, we can remove errorText and replicate Parsoid's
new behaviour..
Bug: T273014
Needed-By: Iddf3e204d6e489cc8a33034da0d9e540efe65553
Change-Id: I7ab3d141b1df92d4447f7e3d6164082844d5bd10
Going through onEditSectionLinkClick() is not needed, and it confused
some code that actually expected a section edit link.
Bug: T328094
Change-Id: I8975ade38d9dd064272781fb9d4bd22bab4d65ce
This allows VE to support even more skins with minimal or no changes to the skins themselves.
Partially reverts 75ff121b29.
Change-Id: I7536610459b7401015d4a033cc516c5d9a0ca5f1
onWatchToggle didn't cope with the case where there was already an event
in the hook-queue when it was registered during setup
Bug: T328955
Change-Id: Ic80f707e86ba3c9f88097cac8aec8c6b3cc32cee
New changes:
0cf02db3a [BREAKING CHANGE] Pass Target to UI Surface and use instead of ve.init.target
Local changes:
* Pass target to surface
Bug: T305762
Change-Id: I3412c53cc70346c8ba4b8b76976ba9c7535e945f
This reverts commit a92dce4999.
A workaround for the previous problem was added in ContentTranslation
in I945897a27db479986855002b389034a745bf9bef.
Bug: T325249
Bug: T325566
Bug: T327779
Change-Id: I2d9c330dc4328468a65315ec6bed1d0f53ebd1f6
We could do something more complex and compute the height of the
available space, but a fixed height is a reasonable solution with
a fraction of the complexity.
Bug: T328048
Change-Id: I0b7bfa55f23afc16be43b85270666ec6a480ca32
Accounts for the use of CSS Grid in Vector 2022, in
the 2017 Wikitext editor preview, by placing the heading and
content in named grid areas (`titlebar` and `content`).
Bug: T327778
Change-Id: I66a30e282e808559b4f375f5924ae0d945c058a9
At first I was going for a more minimal replacement of mw.Uri with URL,
until I discovered that this code depends on a mw.Uri bug that would be
difficult to replicate:
// Expected: Relative URLs are accepted
new mw.Uri( '/foo' ).toString() // => 'https://localhost/foo'
// Expected: Protocol is optional
new mw.Uri( 'example.com/foo' ).toString() // => 'https://example.com/foo'
// Unexpected: Treated as empty domain with no protocol rather than relative URL
new mw.Uri( './foo' ).toString() // => 'https://./foo'
So I went for a bigger rewrite to preserve the intent rather than the
exact logic.
I had to change some test cases to use more realistic fake data. They
previously relied on bugs in our URL handling to pass despite the base
URLs being incorrect, particularly for non-short URLs (see T270219).
In my testing non-short URLs behave the same as before in practice.
Depends-On: I07a8c097dba0f5572c0aedf4febdf1434063ea6f
Bug: T325249
Change-Id: I232361266c1dda795b88018c3aaa3d9ecbe42b93
New changes:
2201b350c Localisation updates from https://translatewiki.net.
da74736c1 Remove unused test code
d1b016e90 Minor test tweaks
551de4f0c Specify document base URLs in more test cases
Local changes:
* Specify document base URLs in more test cases
Change-Id: I0e301bef38d97fa2234aa901c787360d9fbde8a3
New changes:
4355d697a Replace ListStorage with ConflictableStorage
978061f86 Update SafeStorage and ConflictableStorage with expiry functionality
79019ed88 ve.dm.Surface: Support storage expiry
Local changes:
* Pull through conflictable storage
Bug: T218663
Change-Id: I36e49c01e9f2ddb7d362d539b72a4beca925bcb7
Before the `height: 2.5em` was applied to _both_ the visible
<textarea> and the $clone. While this shouldn't make a difference –
one of the first things .adjustSize() does is setting the $clones
height to 0 – it somehow triggered that Firefox bug.
With this patch we remove the `height: 2.5em` before handing over to
OOUI's .adjustSize(). It looks like this fixes the issue. We might
be able to revert I7560ceb then.
Bug: T317369
Change-Id: I96c2d7d7bf359ff0373d478b2b7e97c8833ba5b6
Persistent global-ish properties in ArticleTarget and friends. A lot
of our own code re-uses them, and code elsewhere could refer to them
as well (although I didn't find any uses).
In one case we need to keep using mediawiki.Uri, to handle building
an array from query parameters exactly like PHP would handle it.
Bug: T325249
Change-Id: I57699ff9dd39179ca29a87b6e2d9b12c2b86eb7d
Our encoding for the hrefs like "./Foo" that we send to Parsoid
differed slightly from how Parsoid outputs them, so to avoid dirty
diffs, we had to store the original ones we received from Parsoid
and send them back if they were unchanged.
Change the encoding to match Parsoid's exactly (by referring to the
Parsoid source code), and then remove 'rawTitle'/'origTitle'.
On a historical note, 'rawTitle'/'origTitle' were originally added to
fix other issues with links, which I hope are long behind us:
* bb45d984ca (T145978)
* fda2e6c1b5 (T44140)
Follow-up to 362df66b47, which removed
some other old stuff from the handling of Parsoid links.
Bug: T325766
Change-Id: I0ad0a655380eb2fb29b5ac01e2e399ac550ce34a
Replacing one-off uses in various auxiliary features: only used
in function scope (or narrower), nothing else depends on them.
Some of them didn't even need to do any URL parsing or formatting.
Bug: T325249
Change-Id: Ia9a18656f67cb0a204c87605459abb9f5bbdc347
I've never liked how this looked, it feels so 1995. Let's just use
multiple paragraphs instead of a <hr> to separate the text, similar to
what we do in ve.ui.MWParameterPage. The second paragraph is already
emphasized with italics.
Change-Id: I324cd1d81e61cf8a23095b4f8aed68040eb1bd8d
By using OOUI 'label' instead of 'help', the label is associated with
the input using <label for=...> in HTML.
The result looks almost the same, except for font size. I like the
change, and I don't think it was intentional to make the font smaller
here.
Bug: T277028
Change-Id: If178ca8feb9970c9287ab6dfe51fdf0a81df1c45
Use distinct messages for section heading, button label and input
aria-label, to allow a potentially better localization.
Bug: T304121
Change-Id: I3e3b06a035e2f11f5f32face789b934e22916e49
The ARIA label was added via Ieeb29de. It was reusing an existing
message.
Later we added a placeholder to the same input field via I07c6e60.
Since then screenreaders possibly read two texts: "Find template" and
"Add template".
Bug: T296465
Change-Id: Icb8d5419b4a4e34a224744873c557cb873e17c40
While at it, also fix a few broken uses of `@see` where `@link` was
intended or for full names, there is no syntax needed, as JSDuck
already links those.
Change-Id: Iaeb46b05c6f2e6f00198bc2ae773c895935b4cea
For external links, `.title` and `.rawTitle` properties previously
contained the external link corrupted with some normalization intended
for MediaWiki titles.
This was useless, and in fact no caller actually uses this value:
they all check `.isInternal` first before accessing `.title` or
`.rawTitle`.
Also, correct other parameter documentation.
Change-Id: Ieeab56548f0a3b2f81a90f0d3ae0f81d744aa67b
An incorrectly-encoded fragment is allowed-in-wikitext but will make
mw.Uri throw an error. e.g. `[[foo#1%bar]]`
Bug: T324976
Change-Id: I97cb85507d9ae3d648300245dd7e48cc239c4d90