It's unlikely we'll do another feature A/B test any time soon.
Bug: T322492
Bug: T341491
Depends-On: Ia3712e2930fcd971bce44f568430602ce3949f23
Change-Id: I1ef4191f9466b7420a2fead571615ed6d49f873e
WMF config change should be deployed first: Ica7dba4f17eb3e57a1a2415cc970c54a67eac696
The default value for this preference was already '1', and this code
was a no-op unless it was overridden to '0' like it was in WMF config.
Bug: T357221
Change-Id: I6b09bbea9bfb7a8f8ed17114dc59e657c5b66e91
When permalink data is available, display a permalink using
the current page title, instead of a plain link to the section
at the time of subscription.
Consolidate and clean up some existing permalink code.
Bug: T306373
Change-Id: Ie2f63cbfdbfa703530205201dfcfb0e5ad053b35
This was intended as a temporary config to facilitate a
staged rollout (T331635) which has now completed.
Change-Id: I432ec0a24b8e8c12b62556ff6703abff32a2fced
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Iaf161106c323461929abe9b8a021bbb3e34c4ae7
* This patch enables DT to work with Parsoid HTML without changing
the functionality for legacy HTML.
* The code comments document some of the decisions being made here.
Some of these decisions are temporary and need better solutions
but this patch will let us run visual diff tests and expose any
other latent bugs.
TODO
----
* We need to add new tests to verify CommentFormatter expectations
for Parsoid HTML. I'll tackle this in a followup patch.
Known issues:
-------------
* Performance: Since the getText() transformed output in ParserOutput
is not cached, if DiscussionTools is to switch over to Parsoid HTML,
we have to add some form of caching of the transformed output because
transformHtml can take a couple seconds in the p99 case which is too
long to render uncached!
* Longer-term: Since this hook is called when getText() is
called, all calls to getText() will now invoke this handler
(which will return but still has to do a bunch of checks to
determine this won't apply). Presumably, transformHtml() is
idempotent because when some other code (other extensions, for ex)
calls getText(), we will run the transfromHtml() on previously
transformed content.
My understanding is that getText() is going the way of the dodo
and that getText() callers will have to explicit call the output
transform pipeline code (and presumably this issue of repeatedly
calling the same transforms on previously transformed content will
be addressed there).
* Some CSS doesn't apply to Parsoid HTML because intervening <section>
tags interfere with existing query selectors -- will be addressed
separately.
Bug: T341010
Change-Id: I9846193656cdc658f5237df0a133d9d4dcc20d00
These are not widely used anywhere, but linking to an #h- heading ID
that doesn't exist should say "topic not found" rather than
"comment not found".
Change-Id: Ifd269cc72e640f36431f85c751874ca06229ba9f
All features should be enabled by default for 3rd party installs.
I74ecd243 ensures this will have no effect on WMF wikis.
Depends-On: I74ecd2438c86d99b5727de488c928cc7d37da6db
Change-Id: Ia3245902abf2601f53065f1ffb94133d7b25e223
Only a fraction of a percentage of users are still using
ReplyWidgetPlain, and keeping these modules separate:
* Adds to code complexity
* Adds to ResourceLoader module bloat
* Causes bugs when we use VE dependencies in the
core ReplyWidget class
The disadvantage is that ReplyWidgetPlain will now be
loading all of the VE dependencies, but this will make
switching to visual mode faster.
Bug: T348834
Change-Id: Ifb0cfd43fdab761c3321ad01fa9fefca26473f86
Why:
- We'll reuse this functionality on desktop, so it makes sense to
extract it to a standalone file
What:
- Remove relevant code from mobile.js and place in overflowMenu.js
Bug: T342251
Change-Id: I98f1253e8d6db31c1f71203b50911b6f1b92778b
Why:
- We want to allow extensions to register interactive menu items in the
overflow menu.
What:
- Create a PHP hook to allow extensions to provide menu items
for rendering in the overflow menu
- The hook allows for registering resource loader modules required by
the menu item
- The hook passes in some contextual information, like the thread
item data, context source object, and if the page is editable
- Create a JS hook that fires when a user selects one of the menu items
- Example implementation: Ie9afbedb4f24cbd75eb48bb21dc9f6d8d732d853
Misc:
- Remove b/c code that existed to handle a transitional period where
JSON encoded overflow menu data did not necessarily exist in the
parser cache
- Rename code instances of ellipsis button / data / menu to refer to
"overflow menu"
- Some renames will have to wait until parser cache is updated; these
are noted with TODOs
Bug: T342251
Change-Id: I5f2a51791f8ba7619d1399a4b93111e9bb44e172
When rendering a preview of the comment in order to check whether it's
signed, use the previously acquired temporary user username for the
signature.
Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I7aeb1cc4c107ed752dc805405780a7609a6d4d3c
I think the issues in T329299 are caused by partially autosaved
comments. We store data in multiple localStorage keys, and if some of
them are stored but others are not (due to exceeding storage quota),
our code can't handle the inconsistent state.
We already have a wrapper around localStorage that tries to cover up
these issues. Change it so that all values specific to an instance of
a reply tool are stored under one localStorage key. This ensures that
all updates consistently succeed or fail, with no partially stored
state.
One of the reasons we haven't done this is because this requires the
whole data to be serialized to JSON every time, but our experience
with VE change 4355d697aa shows that this is fast enough.
Extra changes:
* Remove storagePrefix, now redundant
* Remove use of createConflictableStorage, now redundant
* Prefix the key with 'mw' as advised by mw.storage documentation
* Use ES6 syntax for the new code (just for fun)
* Use consistent expiry (T339042)
Bug: T329299
Change-Id: I347115f7187fd7d6afd9c6f368441e262154233b
This existed to do a staged rollout to WMF wikis, which was
finished in March 2021 (T276497).
Bug: T322497
Change-Id: I8851f0243e6920d93f3eb1870d1604bf201ed5a4