Also:
* Disconnect change event on this.input, which doesn't
get destroyed on teardown
* Add padding between attributes and this.input
* Assume the alien extensions can have a rendering when
their body is empty.
Bug: T177181
Bug: T177183
Change-Id: I2e59f8195b255f33f91901213c92ea14793635b4
Tests are broken most of the time. Ruby framework will be deprecated next month. Selenium tests
that are needed should be implemented in Node.js.
Bug: T164479
Change-Id: I8ec1d9b19b9538936c508daf2b50249a705b3170
This code is meant to fix up the tabs if wgVisualEditorTabPosition
was changed and we're seeing cached HTML with the tabs in wrong order.
But it seems it has never worked. `$caEdit[ 0 ].nextSibling` is a text
node and obviously not equal to `$caVeEdit[ 0 ]`, and vice versa for
the other case. The logic is actually correct, so let's fix it to skip
over text nodes.
Also, remove a stray 'eslint-enable' comment left over in
a0f934ed26.
Bug: T50017
Change-Id: I23663a9bfcfdbf52918452c878a128e6960b1191
Vector no longer does the silly thing where the tabs are reversed in
the HTML in RTL languages, so we must remove our hack to do the same,
since otherwise it reintroduces the issue it was intended to prevent.
This essentially reverts 2efd4f0061.
Bug: T50017
Change-Id: Ibeaa55bc34899bffab849ea8ad8b127fb5184d43
The default value of target#pageName is wgRelevantPageName
but other targets my override this, or change it dynamically
(e.g. ContentTranslation).
Also remove duplicate setter of pageName in mw.ArticleTarget,
already set in mw.Target.
Change-Id: Iebd1def1d4142978a673afec584a0b663644d176
* Tiny fix to 33dc60838c for PHP variable name
* Bigger fix to properly pass preloadparams in and split them up
Change-Id: I844db115f2563cb9ee1629c30d5f49d1ce58f5bd
This allows the use of the preload and preloadparams query parameters. They
should behave as they do in the old editor, loading substituted content in
visual and source modes.
Bug: T51622
Change-Id: I522fb5b480d17912f6d6116be6aa043ead855b52
Basic inspectors for editing. Changing from block to inline, or
adding "hidden" or "describe" flags not supported.
The UI layout for two-way and one-way rules could certainly be improved.
Bug: T49411
Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f5185
The MW attributes are 'style' and 'class'. The plural
forms are used internally only to avoid JS keywords.
Change-Id: I1b7d14872aab4b6b3882d00165924fd1639e1744
Other page state is read directly, rather than passed in.
If we come up with a use case for passing this in at a later
date we can reconsider the best way to do this.
Change-Id: Iee7e608c969776b89dbb38b3b56a5177e48344af
Not doing this makes adding a new extension node with the exact same content
as a previously-viewed one have the Done button disabled.
Bug: T172586
Change-Id: I39105144e17135044ef644b5464b0fbfdfc019d5
Resolving attributes means turning 'href' and 'src' URLs from possibly
relative to absolute, so that they don't depend on the base URI of the
document.
This is necessary when rendering for clipboard (and in some other
cases), but at the point when toDomElements() is called, the document
these elements are in does not necessary have a sane base URI set,
giving us hrefs pointing to nonexistent pages.
Don't do it here; it will happen later when we know what the right
document (and right base URI) is, e.g. in ve.ce.Surface#onCopy or
ve.ui.PreviewElement#replaceWithModelDom.
Bug: T169675
Bug: T175157
Change-Id: Ie0a5d6e1c57b8efdbbfba0c24f31ca91d156e200
Instead, use getCheckboxesDefinition(), and build our save form
checkboxes from that rather than extracting them from the HTML.
The ability to have non-checkbox fields there is removed, as that was
never intentional and is now impossible.
To avoid transient problems during deployment (old JS code cached in
the user's browser receiving the new format of API responses), the old
property is kept in the API response. We should remove it next week.
Bug: T174613
Bug: T174686
Change-Id: I5bfca5e116fe790302c3b6ac1357e80237fb1ed2
We still expect the user to click on the tool, and
the actions still works (albeit delayed), so we
should use cursor:pointer.
Change-Id: I6d2b0140f5fd918809f05acc6e405ef430c518fd
Since "nbsp" is hard to translate, it is removed from the current
text of visualeditor-mwlanguagevariantcontextitem-rule-code-label,
which was "Language code" - now changed to "Language code".
Instead the table headings (where this message is used) are defined
as non-breaking in CSS.
Bug: T173181
Change-Id: I9794fa010ad908fe772fa6858c25acc6beb973d5
For magical HTML reasons, a `<tbody>` node is automatically inserted
inside the `<table>` node. Therefore the table always had exactly one
direct child, this check always failed and table was never shown.
Instead, count the rows.
Change-Id: Ia8a5387c3f605689ab1053c923952ec955b83253
Focusing a TextInputWidget normally unsets validity. However, because we're
kind of pretending this is the same input, just in a different mode, it
doesn't make sense to the user that the focus behavior occurs. So, make it
recheck validity after we switch.
Bug: T172159
Change-Id: I1d9d6670d72483c7510fd5ed3c539b43af8432bf
We can place them in bottom center of the toolbar buttons with
just CSS, no need to manually calculate the position (which
doesn't give the correct results if the toolbar is not visible).
Also add z-index for correct rendering inside TargetWidget,
not overlapped by the toolbar border (e.g. in the media dialog).
Bug: T174120
Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906