Leave rule off for now as manual fixes are required.
Also temporarily disable prefer-const rule as that
will also require some manual fixes.
Change-Id: I8c3478f26f51287acb943bd38c9c1020c06b9f39
We no longer need to support toggling visual enhancements without
reloading the page, so we can remove the extraneous set of buttons
to reduce HTML size.
Bug: T322457
Change-Id: I54e57c754c54b7e611069f9832d1ebabf141a396
The gadget version doesn't do this, and we already have code
to prevent your scroll position from changing.
Allowing default rewrites the address bar and highlights the
copied comment.
Change-Id: I9aec2b2be7498a268d7b2eb3d2b4a4f76e658042
Some wikis customize the 'pagetitle' in ways that are not compatible
with the client-side message parser.
Depends-On: If1979da12777e4ee4e97937640fc5e6176f9b5fe
Bug: T317600
Change-Id: Id05a08f8d350a8d8c6d301a3cb3a53f3a798fe09
To avoid affecting existing preload forms, the new topic tool is only
used when the 'dtpreload' query parameter is also set.
Bug: T269310
Change-Id: I4ee024cc4760542790319f302f42b1b2389ac897
Previously we only did it when re-initializing after saving a reply
using our tools, but it could happen for a different reason, such as a
NWE edit.
Bug: T317035
Change-Id: Ia8152fc83f74689802f8dbbc20607c9026a2a5ab
Instead of doing them right after page load, only do them on
hover/touch/focus, when we can expect that the user is about to
click/tap/activate a reply link, but which lets us start the work a
fraction of a second earlier.
Bug: T325598
Change-Id: Ida4cb70d8e9ab423ad2dabca7258f92e9fca3157
Can be merged once I85ee8e6ed6 has been deployed long enough
for all the caches to have been purged.
Change-Id: Ic9773c2e45a4aa796cb6bca52e58d7db1016a977
For preview parsing, the span containers are empty.
Not sure why not strip the container along with all generated
contents, but this should be the easiest fix.
Bug: T321185
Change-Id: I9afb2d0f543b79dbac8a652236fe55284de542a8
We already do this while editing so that users can quickly see which
tabs they are actively working on.
This extends the functionality to the reply and new topic tools.
Bug: T262066
Change-Id: Iae662ad26072617aad71e519bb6c3cbb19ef1246
Follow-up to 31c57d594a. This was
causing an exception, preventing the page contents from updating after
saving changes.
Change-Id: I8c9ab51385172056be9032ec0087f64ff34b6709
Rather than setting it on both the reply link and the reply button,
set it on their parent element.
Update ReplyLinksController to handle this.
Change-Id: I650e9c0ebd354a82b8f66a63c5b4c02b2e29b105
We remove the [reply] and [subscribe] links when they should not be
visible (controlled by 'enableSectionEditLinks' option, which is
disabled when previewing).
Bug: T309423
Change-Id: Ie0d3fba2c4d166daac3ea2e117a246c9584284ca
The Data class contained utilities for two unrelated purposes.
Split each half to a separate class.
Notably, this improves the signature of the getLocalData() function.
Change-Id: Icde615fb9d483fee1f352c34909b37f8ffde8081
* Use featuresEnabled.newtopictool to decide when new topic
links might exist on the page, instead of relying on
`#ca-addsection` existing. Change the logic of that feature
flag to check if __NONEWSECTIONLINK__ is on the page.
* Render the add-topic button locally in a hook to replace
the one suppressed by onMinervaNeueTalkPageOverlay. Do so
whenever the newtopictool feature is enabled (see above).
Bug: T270537
Change-Id: I3e3f7403b3b86bb84fcb75a8833919512519b70f
Normal link: `<a>reply</a>`
Google Translate: `<a><font><font>reply</font></font></a>`
Using jQuery's `closest` method to make sure we go up if the event
target isn't the data-mw-comment element should avoid problems.
Bug: T245563
Change-Id: I19ffb9a5b91617b98b0f00e4d185c01bcde093b0
This includes the dtrepliedto URL functionality from
I3f81e4d77faed367606e47678b8896051982359d.
Bug: T274831
Bug: T274832
Bug: T277329
Change-Id: I035d04f30c8312b0cb42902d3bf940df1482ffb3
* Move getTitleFromUrl() from parser to utils. It's a generic method,
the PHP equivalent is already in utils.
Bug: T277371
Change-Id: Id960e5f60af02bdeb0a3a68f43b7a695eb035139
I noticed that the NWE new section editor would open sometimes even
though we attempt to prevent it. This way seems to work more reliably.
Change-Id: I0ce1640b8c1dd098bf3f0d41dc4fdc276a0c5fd5
Problems with the current setup:
* Each CommentController must have exactly one link.
For T277371 we want multiple, and for T282205 we might want zero.
* CommentController objects must be constructed immediately.
They are implemented to make this pretty fast, but it's still
unnecessary work to do on page load.
* Only one link may be activated at a time, and activating one affects
the styling of others, so CommentController has to use global state
to check if it can set up and to update them.
Instead introduce ReplyLinksController, which knows about all reply
links and which one is active, and emits events that allow
CommentControllers to be constructed on demand.
Change-Id: Iabdeded2e71e598ae78703a6ff9410d0cfba397c