Commit graph

805 commits

Author SHA1 Message Date
jenkins-bot a627011ddf Merge "Use new wikipage.watchlistChange hook" 2022-01-10 22:21:17 +00:00
jenkins-bot ef13ceb9aa Merge "Fix some typos in doc comments" 2022-01-10 16:50:14 +00:00
Ed Sanders 9e98d72281 Fix collapsing whitespace in button section divider
Caused by inline-flex. These aren't used anywhere yet.

Change-Id: Ib9d407090d088e7c87112c22a3d8ae5bab5250c3
2022-01-09 00:42:25 +00:00
jenkins-bot e9155afea6 Merge "Filter username suggestions to accounts with edits" 2022-01-08 01:33:33 +00:00
Ed Sanders c3d54ec8a5 Fix styling of reply links when reply tool is open
To better support adding more links to the buttons group:
* Only disable the 'reply' link when the reply tool is open,
  not all links in the button group. If future links need
  to be disabled (e.g. 'edit') they can be done on a per-case
  basis.
* Add a 'separator' class for adding more links.
* Don't hide 'reply' link when in use. This feature was added
  very early on (I03a98495) and a long time before we started
  greying-out all reply links when the tool was open (I3bb5ad8e7).
  It would also lead to a strange display if there were
  other links in the button group. Instead change the link to
  black to indicate it is in use.

Change-Id: I23cc8d305d1d1c323cb69081749443f6e19de6a4
2022-01-07 17:09:15 +00:00
Bartosz Dziewoński 95c7824056 Fix closing the new topic tool hint
Bug: T298224
Change-Id: I32494990dd8e3bb8ffa2af097bc1f6400687c823
2021-12-23 19:59:33 +01:00
Ed Sanders 423983f26e Filter username suggestions to accounts with edits
Bug: T294774
Change-Id: I7346a7986d7caba473d31151495bb2263e43ca44
2021-12-22 23:57:15 +00:00
Ed Sanders 238a6b49b4 Use new wikipage.watchlistChange hook
Bug: T294254
Depends-On: I88af8585e8fc75f77ebef867d267199aeb2c6592
Change-Id: Ic7201de567329b5752dcf52602602030d7c347f0
2021-12-21 13:00:48 +00:00
Ed Sanders 8c6fadeb65 Remove getHeading from HeadingItem (JS)
This matches the PHP implementation and was only used in
one place (when fetching authors in new topic tool).

Change-Id: I9d9e774616112e8dc6ab4919846e3abecc24553d
2021-12-21 01:33:50 +00:00
jenkins-bot 793c8e990e Merge "Implement getSubscribableHeading/isSubscribable in JS and use" 2021-12-20 21:49:03 +00:00
jenkins-bot 6c1550b66e Merge "Better document {Object} types" 2021-12-20 21:38:09 +00:00
Bartosz Dziewoński 95780b0fab Fix some typos in doc comments
Change-Id: I0f6c78e49e4eb30549f313d1a48f28a648cbd3f3
2021-12-20 22:24:03 +01:00
Ed Sanders be9a9aa2a9 Implement getSubscribableHeading/isSubscribable in JS and use
Bug: T298037
Change-Id: Ifbec49f6da51527f9634fda74b4fb4788a4a015e
2021-12-20 17:29:43 +00:00
Ed Sanders 2e1241289c Better document {Object} types
Change-Id: Ibfaf2ded443301c68552dbf98a1897a50bda9ef5
2021-12-20 17:25:54 +00:00
Ed Sanders 640638b1dc ReplyWidget: Document all methods
Change-Id: Iab509a7605c3b8e25bcc20fb7176fed23409aed4
2021-12-20 15:59:47 +00:00
Ed Sanders fe18f5ba22 Controller: Use 'this' in $.each as intended
Change-Id: Icd507d6726ca391fc39e5d89429e0eed35ba9873
2021-12-20 15:59:47 +00:00
Ed Sanders ebd37369ce Controller: Document private methods
Change-Id: I6f5fb0c282c0dc15e175ae278006d918601ccdda
2021-12-20 15:59:46 +00:00
jenkins-bot fb16305135 Merge "Show a hint on legacy interface when arriving from new topic tool hint" 2021-12-17 17:30:39 +00:00
jenkins-bot e568c62f85 Merge "Show a hint on the new topic tool to explain that it's new" 2021-12-17 17:30:37 +00:00
jenkins-bot 5299596882 Merge "Fix replying when comments with the same name have different transclusion data" 2021-12-17 16:43:12 +00:00
jenkins-bot c4fb0f7046 Merge "Change auto topic subs to re-subscribe you if you unsubscribed" 2021-12-17 15:32:40 +00:00
jenkins-bot d0144c0bbc Merge "Make preferences button in auto-subscription popup more obviously clickable" 2021-12-17 15:26:51 +00:00
Bartosz Dziewoński 52c09788a1 Remove unused JS version of ThreadItem#getTranscludedFrom
We're probably not going to use it again, and I don't want to make the
effort of rewriting it in Id867b3005ebc46906d6df852a525fcaec9e6b19b.

Change-Id: I0b02533f7c9b8c1b0df271e03a74063f123d0dff
2021-12-17 00:54:37 +00:00
Bartosz Dziewoński d0eec56f6d Show a hint on legacy interface when arriving from new topic tool hint
Bug: T293962
Change-Id: I56823efb4e58839b3f121ff23d576984b86e4e81
2021-12-16 17:43:23 +00:00
David Lynch f24a73a05a Show a hint on the new topic tool to explain that it's new
This shows to users who are logged in and have more than 500 edits

Bug: T293962
Change-Id: Ic47fa897c6a4f43c27d4cfd5571e34f8acb01eb8
2021-12-16 16:01:38 +01:00
Bartosz Dziewoński a89d6ca445 Make preferences button in auto-subscription popup more obviously clickable
Bug: T295946
Change-Id: I3d30a91a2f4497bd5e222a507bdba853e8269162
2021-12-16 01:07:38 +00:00
Bartosz Dziewoński e9f5819d92 Fix replying when comments with the same name have different transclusion data
Follow-up to bfe6a36514.
We should only check the transclusion data for `comment.name` when
the data for `comment.id` is undefined, not when it's false.

Bug: T297850
Change-Id: Ia47462a7727edd551db88ec18b5b07017f669d2b
2021-12-16 01:23:58 +01:00
Bartosz Dziewoński ef7274d69e Move some helpers from CommentParser to CommentUtils
Change-Id: I0e323d3b75f47459a5548a13e9684f4c6ff4ba0c
2021-12-13 17:13:41 +01:00
Bartosz Dziewoński d3a7476cef Change auto topic subs to re-subscribe you if you unsubscribed
Bug: T295950
Change-Id: I7d3136c8bd7042b03487d85decea30a56dc3cde6
2021-11-29 21:37:11 +01:00
jenkins-bot eb0ca647ef Merge "Ensure highlighted comment is defined before we try to show auto topic sub popup next to it" 2021-11-29 19:24:05 +00:00
jenkins-bot 0e81c8520d Merge "Ensure we won't set 'seenautotopicsubpopup' pref when not showing the popup" 2021-11-29 19:24:03 +00:00
jenkins-bot 1cb8fb6e99 Merge "Don't try to load 'mobile.init' on non-mobile" 2021-11-29 19:24:02 +00:00
Bartosz Dziewoński b3b28dd1ab Ensure highlighted comment is defined before we try to show auto topic sub popup next to it
This was a logical merge conflict between 4912a1bf5c and 9ded06a655
that I didn't notice when rebasing the latter. Waiting for the
'mobile.init' module to load changes the order of operations if we're
highlighting the new comment after reloading a page, which we also do
after creating new talk page with the new topic tool.

Bug: T295945
Change-Id: Ief4810cc67c1bda9256585da1e2140b3a222dc5e
2021-11-18 16:01:00 +01:00
Bartosz Dziewoński 0110fe8b8d Ensure we won't set 'seenautotopicsubpopup' pref when not showing the popup
Change-Id: I20f1672bb40b07672474e81e7e59a440bf1f068b
2021-11-18 16:01:00 +01:00
Bartosz Dziewoński 3265b649cd Don't try to load 'mobile.init' on non-mobile
Change-Id: Ib988740e898f4163a1b97ba35a251c4275f44e80
2021-11-18 16:01:00 +01:00
Bartosz Dziewoński 72f806829c Ensure form tokens are not longer than allowed
Bug: T295940
Change-Id: I4e3fd5d3ef21274b104c4d22e3bab11043d61334
2021-11-17 23:53:38 +01:00
Bartosz Dziewoński 9ded06a655 First-run experience popup for automatic topic subscriptions
Bug: T262103
Change-Id: I9f9336718ad060d553146c4e27604565ce5822c6
2021-11-15 22:45:42 +01:00
Bartosz Dziewoński 90283b3a7e Update the [subscribe] buttons when auto-subscriptions are added
When our interface initialized on a page that the current user
recently edited (using the reply tool, the full-page source editor,
or any other way), check if any new automatic topic subscriptions
were added and update the interface to reflect that.

This requires doing some API requests after the page is loaded,
because adding auto-subscriptions happens asynchronously in a
DeferredUpdate (potentially after the user is already viewing
the page with their comment saved), and depends on the contents
of the edit.

(When using the reply tool, we could avoid this API request and
replicate the logic, but that's not implemented in this commit
to keep it simple.)

Bug: T284836
Change-Id: Ic0fabda0de4ebbc5e424f49641e6b03ebb4b7e6a
2021-11-15 22:45:42 +01:00
jenkins-bot 9fbf2b3177 Merge "Avoid splitting about-groups starting with an empty <span>" 2021-11-15 21:38:56 +00:00
David Lynch bd40523843 Set a user preference to record whether the new topic tool has been used
This will be used for an upcoming A/B test.

Bug: T294167
Change-Id: I494b0b3cf3ae568bec2b9cef80aeb22306896769
2021-11-15 10:25:51 -06:00
Bartosz Dziewoński 83ba496919 Avoid splitting about-groups starting with an empty <span>
Usually this isn't a problem, because the comments are marked as
template-generated and we don't allow replying to them. But we had a
special case where we were trying to skip over some invisible
elements, which was causing us to skip into the middle of the
about-group in some cases. When Parsoid sees that, it serializes the
contents twice.

Bug: T290940
Change-Id: I9fe0b8d43ab874ccef371990799f77bfc46bc954
2021-11-15 16:03:38 +00:00
jenkins-bot 640f9cac65 Merge "Handle window resize in debug mode" 2021-11-10 19:55:02 +00:00
Ed Sanders dbe900b08c Handle window resize in debug mode
Change-Id: I1fdefd40b02a7d188c09b754b76aa658e7a18b76
2021-11-09 13:38:48 +00:00
Ed Sanders 7c3e583bec build: Update eslint-config-wikimedia to 0.21.0
Change-Id: I72de463d5a878e555eeed0e7ce2772e1d3a46f06
2021-11-08 19:03:40 +00:00
jenkins-bot 779c5acd4f Merge "Fix layout of [subscribe] links on desktop Minerva" 2021-11-05 23:29:41 +00:00
Bartosz Dziewoński 9daf5e1202 Fix layout of [subscribe] links on desktop Minerva
This is the minimal fix, they still look out of place, but they don't
break layout of the whole page.

Bug: T292241
Change-Id: I1538962dd266fb455051e4dfe2680e47c4d1bb4c
2021-11-05 23:24:28 +00:00
Bartosz Dziewoński 578be2f91e ReplyLinksController: Update teardown code
Follow-up to de4d4bfb21.

Change-Id: Ibc3293a43befbbb0af400b197993135d4492fe35
2021-11-05 20:21:22 +01:00
Ed Sanders de4d4bfb21 Support new topic tool on mobile
* 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
2021-11-04 18:19:40 +00:00
Bartosz Dziewoński 2d5af9608a Fix saving edit mode on mobile in reply tool
When this code was added in 5feb69612f,
it was inside the `if ( this.modeTabSelect ) { … }`, because switching
was an experimental option and could have been unavailable.

Switching is always available now, but the `modeTabSelect` widget
doesn't exist in the mobile version (because switching interface is a
part of the toolbar there), so this line should be outside the `if`.

Bug: T270536
Change-Id: I7c5959281e77558bfe82bd39d38ba4dda36d590c
2021-11-04 18:19:30 +00:00
Bartosz Dziewoński 4912a1bf5c Reload the page after posting a comment on mobile
MobileFrontend does not use the 'wikipage.content' hook, and its
interface will not re-initialize properly after we update the page
contents with the new comment. Reload the whole page instead.

Bug: T270536
Change-Id: I3f81e4d77faed367606e47678b8896051982359d
2021-11-04 18:19:06 +00:00