Commit graph

1201 commits

Author SHA1 Message Date
jenkins-bot daff9f6c27 Merge "Special:TopicSubscriptions: Perform unsubscribe asynchronously" 2023-02-06 23:01:01 +00:00
Ed Sanders a00d1b7a87 Hide (un)subscribe buttons when JS disabled
These buttons require JS to do anything. We can consider
providing a fallback action for subscriptions at a later date.

Change-Id: I9da546b2968e06d80c515eb5a05656a462b8201d
2023-02-06 22:36:14 +00:00
Ed Sanders 15a8074002 Special:TopicSubscriptions: Perform unsubscribe asynchronously
Bug: T327662
Change-Id: Ib7f5cf8b075f44ac06c0a014aa1e200ccda8fe26
2023-02-04 14:30:14 +00:00
jenkins-bot f42b6db413 Merge "Always reset ReplyLinksController before re-initializing" 2023-02-02 18:04:11 +00:00
jenkins-bot d7f30dcd19 Merge "Restore autosave for new topic when only title was provided" 2023-02-02 17:57:02 +00:00
jenkins-bot b30256d01b Merge "Fix summary when topic title is changed after restoring from autosave" 2023-02-02 17:56:41 +00:00
jenkins-bot 9a318bdc89 Merge "Remove dtenable API hack" 2023-02-02 17:52:57 +00:00
Ed Sanders a1217913ae Remove dtenable API hack
This hack isn't necessary any more as reply links are always
added and enabled/disabled by CSS.

Change-Id: Ifecdd4299396f6cab7b192cde18d3001b9553f61
2023-02-02 17:20:37 +00:00
Bartosz Dziewoński 579766b5ab Fix detection for the sticky "Add topic" being stuck
This fixes some animations when scrolling.

Change-Id: I5ed4a066436f673732227612c5b393ea47e16c45
2023-02-01 20:09:28 +01:00
Bartosz Dziewoński 52de4b0b1b Fix interaction of "Add topic"/"Read as wiki page" buttons with categories
Bug: T328452
Change-Id: Iabb52c73e4b4a83175d95d8d542ef752f6f961dc
2023-02-01 20:09:28 +01:00
Bartosz Dziewoński 8374094109 NewTopicController: Attach after .mw-parser-output
Bug: T328039
Change-Id: I32b07756f2a967fcbd26b44ebfbcfd5a608e9484
2023-02-01 20:09:28 +01:00
Bartosz Dziewoński b75112f5e2 Tiny CSS simplification
Change-Id: I2b554ae524f36da5c495eb853af027b8ab21ece7
2023-02-01 20:09:28 +01:00
Bartosz Dziewoński 4e69ae1a18 Fix double margin/padding on the mobile lede dialog
Change-Id: Ib5bf882c04d0979728fbfb65b4e9767ddbb4f6d2
2023-02-01 20:09:28 +01:00
Ed Sanders 34a120d53a Look for Vector 2022 sticky header class in new location
This class was moved from <body> to <html> in Id5afe2c60.

Change-Id: Iad64abb02839c376d2f8955a0889f9ff0658a98c
2023-01-31 15:51:12 +00:00
Bartosz Dziewoński 06919f9444 Always reset ReplyLinksController before re-initializing
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
2023-01-24 16:42:43 +01:00
Bartosz Dziewoński a5a026ceba Restore autosave for new topic when only title was provided
Bug: T315730
Change-Id: Ib68ebd23d3c4ef8e577023465236b4391b00bf2c
2023-01-24 14:28:17 +01:00
Bartosz Dziewoński 1fb67ef63d Fix summary when topic title is changed after restoring from autosave
Previously, we would restore the title and the summary generated from
it, but we wouldn't restore `prevTitleText`, so we would lose track of
the fact that it was automatically generated, and stop updating it
because of that.

Instead of adding it to the stored data, let's instead stop storing
automatically generated summaries, and tweak the code to support
generating them when restoring.

Bug: T315730
Change-Id: I96420bc0a3e34373190d2c2c0db2e2175ad3156d
2023-01-24 14:28:17 +01:00
Bartosz Dziewoński 88e4956711 Hide "Add topic" footer on talk pages when empty state is shown
We already have code to hide it (added in a98cd369ba),
but this code (added in b132522fa9) made it reappear.

I think this rule was added in the development of that
change when the class was placed on a ButtonWidget,
to override `display: inline-block` on it, but it was
then moved to another element, removing that need.

Bug: T327536
Change-Id: I2a162dde93d04d76f6d5540edf6d3c4719a67f92
2023-01-23 21:16:11 +01:00
jenkins-bot 87d67d4a1c Merge "Use localStorage for auto-save" 2023-01-21 09:58:30 +00:00
Ed Sanders 9d331d0c86 Use localStorage for auto-save
Bug: T218663
Depends-On: Idcf50a527e2386122d077c497477057657824646
Change-Id: I514e5340d8bce3dd10a1142e7cced49edee5c9db
2023-01-21 09:25:55 +00:00
Bartosz Dziewoński 6d8f92a6b2 Tweaks for new heading HTML structure
Bug: T327328
Bug: T327469
Change-Id: I8c7593e98dc677b28925129dda592dbc24106220
2023-01-20 06:23:23 +01:00
jenkins-bot 8facd83609 Merge "Improve handling for comment separators" 2023-01-17 11:48:43 +00:00
jenkins-bot ba2f6ac2cf Merge "Flip the reply button icon on RTL" 2023-01-17 11:47:38 +00:00
jenkins-bot d81886c5ce Merge "Enable collapsible content in mobile talk page lede content" 2023-01-10 16:37:11 +00:00
Bartosz Dziewoński 3a9997d6ea Improve handling for comment separators
* Detect comment separators at the end of comments too
* Consider TemplateStyles associated with ignored templates

This unexpectedly improves a lot of cases other than T313097 too,
mostly where <br> or {{outdent}} was used within a paragraph:
splitting comments that were previously jumbled together, or restoring
content that was previously ignored for apps / notifications.

Bug: T313097
Change-Id: I9b2ef6b760f2ffd97141ad7000f70919aeab7803
2023-01-10 01:59:52 +00:00
Bartosz Dziewoński 2a38098785 Flip the reply button icon on RTL
Bug: T325664
Change-Id: Id254420db317848e4894c9c683a3b27a98931155
2023-01-10 00:38:17 +00:00
Bartosz Dziewoński 360e3584c6 Delay API requests for preloading metadata until user interaction
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
2023-01-06 01:24:00 +00:00
Bartosz Dziewoński af7097f02f Enable collapsible content in mobile talk page lede content
Bug: T323639
Change-Id: I3cfc8e7337172b44156a7f3bed9ff134c0851475
2023-01-03 18:16:15 +00:00
jenkins-bot 8070ce8a57 Merge "a/b test anonymous ID was being reset because of cookie prefixes" 2022-12-22 15:12:25 +00:00
jenkins-bot 477917e7e7 Merge "Only preload getPageData if there's thread data for the page" 2022-12-19 10:08:58 +00:00
David Lynch 013872ae22 Only preload getPageData if there's thread data for the page
This should avoid hitting the API if the DT JS is loaded off of talk
pages. At worst, if this is overly restrictive, later calls should still
load it when someone actually interacts with a reply widget.

Bug: T325477
Change-Id: If898dd4a21f1d2620c5a1e79908647070c441854
2022-12-19 03:03:02 -06:00
David Lynch fcb6468805 a/b test anonymous ID was being reset because of cookie prefixes
Bug: T321961
Change-Id: Ie37d0dbefaf10bf48c32461cd7d5d1b4c7882725
2022-12-16 14:45:07 -06:00
David Lynch 0db7b997f3 Log an event when the lede button is clicked
Bug: T314596
Change-Id: Ifb5c9eb3cfac8b217546d4945e6f39ce38251e1e
2022-12-15 11:27:26 -06:00
jenkins-bot 459554b18c Merge "Use new stable API for subtitle modification" 2022-12-14 04:09:58 +00:00
David Lynch c706562ce9 VisualEnhancements: in some languages put an arrow by the reply button
New config: DiscussionTools_visualenhancements_reply_icon_languages

Config is set up with a provide_default merge strategy so we can remove
items from it quickly if need be.

Bug: T323537
Change-Id: Ib748897a2162bb233000f7364e30b268932f4c4a
2022-12-13 00:11:08 -06:00
Jon Robson fbd951906a Use new stable API for subtitle modification
Bug: T324876
Depends-On: Id8436324e2ae2fd9f488b65b3b7bfc19611870d1
Change-Id: I4b178f67b6718fa9a84827e1804ec4eb1483f735
2022-12-13 01:13:29 +00:00
Bartosz Dziewoński fda9f159f5 Deemphasize "Learn more about this page" link
* Increase selector specificity to make it work
* Tweak colors, they were lighter than intended
* Use color rather than opacity on text to avoid making it blurry
  (opacity disables subpixel rendering)

Bug: T324702
Change-Id: Ie32a7481ea90b983cd33e6eae981d47db8612c9f
2022-12-07 22:13:55 +01:00
Francois Pignon de107bb6a8 Optimize some jQuery selectors
Bug: T324523
Change-Id: I57a86f3f29cd33e93db31338420af15fdb3113b9
2022-12-05 23:56:09 +00:00
jenkins-bot 984f804f17 Merge "Don't collapse the lede section when it has comments" 2022-12-05 19:04:37 +00:00
jenkins-bot 8a6bc91f46 Merge "Consider MediaWiki:Talkpageheader message when adding "Learn more" button" 2022-12-05 19:04:35 +00:00
jenkins-bot e27e5ac55e Merge "Clear pageDataCache whenever re-initializing" 2022-12-02 11:58:45 +00:00
Bartosz Dziewoński 7dc35aa3ad CommentController: Fix 'discussiontoolscompare' polling not stopping
The .always() callback can be called after .teardown(), and would
previously restart the polling.

Bug: T313096
Change-Id: I6e4c0f7d47e13bd4a259282a508afcdf0c1bd949
2022-12-01 21:12:37 +00:00
Bartosz Dziewoński 37fda5e181 Clear pageDataCache whenever re-initializing
Bug: T323661
Change-Id: Ia080f4a8e79551bd16a1ce96f6851a76159d8da7
2022-12-01 21:49:08 +01:00
jenkins-bot 64e5c91970 Merge "Hide buttons for print media" 2022-12-01 15:14:33 +00:00
jenkins-bot db1aa31eed Merge "Remove dd overflow hack" 2022-12-01 15:04:09 +00:00
Bartosz Dziewoński b4475801fd Don't collapse the lede section when it has comments
Bug: T324139
Change-Id: I14e1dae0fef4177f5a6a223bc9b663e99c9f741c
2022-11-30 20:25:22 +01:00
Ed Sanders 7ab0c69f39 Remove support for data-mw-comment
Can be merged once I85ee8e6ed6 has been deployed long enough
for all the caches to have been purged.

Change-Id: Ic9773c2e45a4aa796cb6bca52e58d7db1016a977
2022-11-30 18:31:02 +00:00
jenkins-bot 5a524d0fa3 Merge "Track events for the new comment notice" 2022-11-29 19:40:32 +00:00
Bartosz Dziewoński 74fbe19838 Consider MediaWiki:Talkpageheader message when adding "Learn more" button
We also need to move the code to the other hook to avoid adding it twice now.

Bug: T324046
Change-Id: I186d15f6e6537b47b019c9707d7ae8ef080f4ae2
2022-11-29 18:46:40 +00:00
Ed Sanders 79537c9892 Ignore negative page scroll values on iOS
Bug: T323400
Change-Id: Id37f3da183a08f936c6b6d11ed7307bb9d8bd28b
2022-11-29 14:29:50 +00:00