Commit graph

823 commits

Author SHA1 Message Date
Bartosz Dziewoński b019196e7a When using bullet syntax, hide the marker next to the reply tool
Bug: T259864
Change-Id: I47097c2b06f9deade7c234f08ebacb83d16a1d6d
2022-01-19 23:05:05 +01:00
Bartosz Dziewoński faf6da62cc Ensure the marker appears in a reasonable place when replying with a bullet
Bug: T259864
Change-Id: I782460797ea78ab689cbab19c631f651315d2c8f
2022-01-12 22:57:48 +01:00
jenkins-bot 3699158e81 Merge "Handle selflinks by returning the current page's title" 2022-01-12 21:46:35 +00:00
jenkins-bot 7f329ca9a2 Merge "Enable wikis to customize the syntax used for replies" 2022-01-12 21:32:49 +00:00
Ed Sanders f80ff74fc6 Handle selflinks by returning the current page's title
Bug: T287818
Change-Id: I67f10ac9976581279d1e6a477e90d55875ebab20
2022-01-12 21:18:04 +00:00
Ed Sanders 34011b7a07 Parser: Pass in title of page being parsed
Will be used to parse selflinks in the future.

Change-Id: I2bc29d1c5c69cb6309f582f162f9af7d96ce8913
2022-01-12 21:17:59 +00:00
Bartosz Dziewoński 7b1053300a Enable wikis to customize the syntax used for replies
The following values for configuration variables are supported:
$wgDiscussionToolsReplyIndentation = 'invisible'; (default)
$wgDiscussionToolsReplyIndentation = 'bullet';

Bug: T259864
Change-Id: Icefad79630adc6ed35687498614e6a03ede1451b
2022-01-12 20:54:04 +00:00
jenkins-bot 20378e7be3 Merge "Ignore the watch star when replying to a transcluded comment" 2022-01-12 18:26:25 +00:00
jenkins-bot ed9fca9e5c Merge "Ensure [subscribe] buttons don't float too far away" 2022-01-12 15:06:11 +00:00
jenkins-bot ecd649f6e2 Merge "Allow logged out users to be enrolled in the A/B test" 2022-01-12 01:58:50 +00:00
Ed Sanders 272b6595f5 Docs: Illustrate range overlaps in comment
Change-Id: If6f5d83719b8d078cd13327c0b9cbaef03f87508
2022-01-11 17:28:25 +00:00
Bartosz Dziewoński 72b9c2c6f5 Ignore some invisible nodes when looking for comment frames
Reimplement getFullyCoveredSiblings() using compareRanges(), which
checks basically the same thing, but works better and I like it more.

Bug: T297034
Change-Id: I33dc1d088bdee984064315290e378bfbfa830b10
2022-01-11 17:01:53 +00:00
jenkins-bot 7e61125c23 Merge "Work around a Safari bug causing shadows to remain when the popup is removed" 2022-01-11 16:14:15 +00:00
Bartosz Dziewoński 8de940b587 Improve detecting transcluded comments again
Previously: 569db3603c (2020-06).

Unfortunately we've found cases where the previous implementation
doesn't work correctly, resulting in comments being added to the wrong
pages or page corruption.

Bug: T289873
Bug: T298051
Change-Id: Id867b3005ebc46906d6df852a525fcaec9e6b19b
2022-01-11 16:07:44 +00:00
David Lynch 2f1e2f80e0 Allow logged out users to be enrolled in the A/B test
For logged out users we store their test state and an anonymous
identifier in local storage. So long as the test is enabled, we include
these in any logging that occurs.

This is done entirely client-side, to avoid any cache issues caused by
state depending on cookies from PHP for logged out users.

Bug: T291307
Change-Id: Ib39e2f2146cdfdac9df5690ee3de75718f0f2731
2022-01-10 18:10:50 -06:00
Bartosz Dziewoński 08d33f4ced Ignore the watch star when replying to a transcluded comment
Bug: T298917
Change-Id: I2523f5cf53151c4c32699ce0b0cadbcb7f9bd02d
2022-01-10 23:30:09 +01:00
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
Bartosz Dziewoński 704148bd44 Ensure [subscribe] buttons don't float too far away
Set `overflow: hidden;` on the heading element to establish a new
block formatting context, which will contain floating elements.
Most skins already do this, but not Timeless.

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context

Bug: T298069
Change-Id: Ic7afd82095b7440cf8b61b3f3fd0085e755a773e
2021-12-22 22:20:29 +01: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
Bartosz Dziewoński 4242b848d8 Work around a Safari bug causing shadows to remain when the popup is removed
Bug: T297266
Change-Id: Id6c4c140d8e49ad995dbabeb95ef0e41aabba024
2021-12-17 17:57:54 +01: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