Commit graph

1331 commits

Author SHA1 Message Date
jenkins-bot 8d999c5ebf Merge "Separate dialog for abandoning a new topic" 2021-01-20 00:04:29 +00:00
jenkins-bot 994abdac39 Merge "Store reply links in the parser cache" 2021-01-19 21:35:36 +00:00
Bartosz Dziewoński 37b574f165 Separate dialog for abandoning a new topic
Bug: T269190
Change-Id: Ie4f486b0641edea369702631556d8ea31f991370
2021-01-19 21:40:21 +01:00
Bartosz Dziewoński 2798ee73f4 CommentController: Better handle clicking links while already commenting
Bug: T272389
Change-Id: If28a6cce250dca4810de3f51c0a2a4587d00649e
2021-01-19 21:21:47 +01:00
Ed Sanders 32789a9a55 Store reply links in the parser cache
Splits the cache on the reply links feature being enabled
for a particular user and title.

An additional check is done after parsing in case the user
has the feature enabled via query string or cookie.

Bug: T267404
Depends-On: I883a37fd67108243e7a20683b1a5d59fd0f6e39f
Change-Id: I3bc06ca7d4aea7f0fe39eef0e77ad88d1f9c1043
2021-01-19 17:01:53 +00:00
jenkins-bot 234198d9b1 Merge "Fix skipping past our own reply buttons for wrapped comments" 2021-01-19 15:14:53 +00:00
Translation updater bot d0c98fd9e5 Localisation updates from https://translatewiki.net.
Change-Id: I29407164d042be7a49373ae393bf221b2485a2bf
2021-01-19 08:19:10 +01:00
Bartosz Dziewoński 9ee2341310 Fix skipping past our own reply buttons for wrapped comments
Bug: T272318
Change-Id: I7c80a0be3af76d4db19f9934c5869be07e4bc52c
2021-01-18 20:42:23 +01:00
jenkins-bot e17467b09c Merge "Fix exception when trying to use non-existent 'typeof' attribute" 2021-01-18 18:58:35 +00:00
Bartosz Dziewoński 8f42c74985 Fix skipping to the end of paragraph, now it considers nested tags
Add yet another tree walking utility: CommentUtils::linearWalk().
Unlike TreeWalker, it allows handling the beginnings and ends of nodes
separately – kind of like parsing a XML token stream, or kind of like
VisualEditor's linear model.

(Add unit tests for this utility. The simple.html test case is copied
from [VisualEditor/VisualEditor]/demos/ve/pages/simple.html.)

Use this utility to stop skipping when we reach either a closing or
opening block node tag. Previously we'd skip over such tags inside
nested "transparent" nodes (like <a>, <del>, or apparently <font>).

Bug: T271385
Change-Id: I201a942eb3a56335e84d94e150ec2c33f8b4f4e0
2021-01-18 18:20:20 +00:00
Bartosz Dziewoński 0da00d44be Broken test cases for a big mess of <font> tags
Bug: T271385
Change-Id: I26b08923583593f40a372ef6614524f69781a87a
2021-01-18 18:20:13 +00:00
Translation updater bot 8c01d67c03 Localisation updates from https://translatewiki.net.
Change-Id: I4a6a40067365909805860bca7136458c983d8124
2021-01-18 08:37:40 +01:00
Ed Sanders 22ab55c8b3 Update description of BetaFeature to mention new topic tool
Also, update links following renaming MediaWiki documentation
page from `Talk pages project/replying` to `Talk pages project/Replying`

Bug: T270120
Change-Id: Ic609b506f0b360b0a8139526dac18f5e97d541db
2021-01-16 23:34:00 +00:00
Bartosz Dziewoński 1fa9a020ad Update 'save_failure_type' map for EditAttemptStep schema
Remove unused error codes, update the ones that changed, and sort in
the order in which the types are listed on the schema page.

Bug: T272162
Change-Id: Ib16f7e11ff81d43443b08cf704ce5196420671e4
2021-01-15 19:54:45 +01:00
jenkins-bot 90f2bbfe87 Merge "Preserve a user's beta preference when not in beta" 2021-01-15 13:39:13 +00:00
Translation updater bot 8399f0765a Localisation updates from https://translatewiki.net.
Change-Id: I856e6731963855a21435c221c8b0ddbc02f8d80e
2021-01-15 08:39:00 +01:00
Ed Sanders 1c741d3450 Preserve a user's beta preference when not in beta
The tool may go in and out of beta as new features
are release/graduated to opt-out. Users should only
need to opt in to the beta feature once to get all
future sub-features.

Bug: T272071
Change-Id: If6834b7fc07fc7e84757dc5fdcea814cd0d65936
2021-01-14 23:46:47 +00:00
Bartosz Dziewoński c20e7765ea Fix exception when trying to use non-existent 'typeof' attribute
Bug: T272090
Change-Id: I4d1e7457441f28d789dec8b7fd2dc3ba10fd995e
2021-01-14 22:11:32 +01:00
Ed Sanders c42e86f0f6 Config: Explicitly check feature availability in the client
Don't assume a feature is available because the code has
loaded and the user option is set. Export the logic from
Hooks.php to the client.

Change-Id: Ica0e58de7ed0d59e3b09645193eb2b691ae41c39
2021-01-14 19:04:18 +00:00
jenkins-bot 99acd2a925 Merge "A/B test bucketing for beta enrollment" 2021-01-14 12:49:05 +00:00
jenkins-bot 18f4ce2c90 Merge "Consistent wording in the warning message for missing new discussion topic" 2021-01-14 12:39:44 +00:00
Translation updater bot 7596e135e3 Localisation updates from https://translatewiki.net.
Change-Id: Icf8af86570e52543f033a39fc6b89df38aea79a9
2021-01-14 08:50:04 +01:00
Ed Sanders e16a519a05 Padding and border around new topic tool
Bug: T269157
Change-Id: I4f56f9dc0eca71ea4ed452df49e861aac47e3de8
2021-01-13 20:54:59 +00:00
Ed Sanders f6fe40b500 Fix check for feature availability
If asking if any feature is available, also check if
any feature has been set to 'available'.

Change-Id: I417f8756d91c5d3abab8b24109320737b8b86509
2021-01-13 19:35:42 +00:00
Bartosz Dziewoński 7751989136 Consistent wording in the warning message for missing new discussion topic
Bug: T269285
Change-Id: I00b3fef418d9893263d8f03e0a49724ae13ce17b
2021-01-13 19:20:10 +01:00
David Lynch 27a995d5a2 A/B test bucketing for beta enrollment
If DiscussionToolsABTest is enabled (set to `all` or a feature), logged
in users who have never used the tool before will be assigned to an a/b
test bucket. If they're in the test bucket, they get the feature
enabled.

If they manually set their beta feature preference, we don't override
that but do maintain their bucket for logging purposes.

Bug: T268191
Change-Id: I9c4d60e9f9aaef11afa7f8661b9c49130dde3ffa
2021-01-13 10:32:00 -06:00
Translation updater bot 4269d65868 Localisation updates from https://translatewiki.net.
Change-Id: I9a480a90eac4d8e9ea9583feadf3423d052b094b
2021-01-13 08:36:15 +01:00
jenkins-bot dce452fe6b Merge "Give new-section a specific init_type to distinguish it" 2021-01-12 22:02:13 +00:00
Ed Sanders 706f4438fc Add "new topic" user preference
Bug: T270119
Change-Id: Ie27ea645602f7533610826cbc0cc422e3682d863
2021-01-12 20:15:46 +00:00
David Lynch 5696495754 Give new-section a specific init_type to distinguish it
Bug: T265099
Change-Id: I0117a41ec44263162621a34cf045b13650c6918c
2021-01-12 20:15:41 +00:00
Bartosz Dziewoński d76143bc08 Ability to add new discussion sections
1. Extend the JS modifier to allow adding top-level comments
   (that is, replies to headings). PHP modifier doesn't do this
   because we'll save the changes using paction=addtopic instead.

2. Subclass CommentController to allow adding a new heading and a
   top-level comment underneath it at the same time.

3. A lot of ugly code in ReplyWidget to customize the interface
   for this case. Much of it should probably be moved to
   CommentController/NewTopicController.

Bug: T267595
Change-Id: I9c707bb7f7aae1b92c72fb4dee436490f8c8409b
2021-01-12 20:15:28 +00:00
Translation updater bot 82dcbcc33a Localisation updates from https://translatewiki.net.
Change-Id: Ifa2b9ee3b8b6ec36077b490713ea6458b0e65759
2021-01-12 08:37:27 +01:00
Translation updater bot a1fafe516f Localisation updates from https://translatewiki.net.
Change-Id: I96305862ec434bfd265eee5c77bf0f9de7d971fe
2021-01-11 08:34:08 +01:00
jenkins-bot 81cb4e8fe8 Merge "Load site config data in CommentFormatter tests" 2021-01-09 15:39:52 +00:00
jenkins-bot 446d4dc3ec Merge "ReplyWidget: Ensure scrollbar doesn't appear in source mode (for real)" 2021-01-08 23:17:01 +00:00
Ed Sanders 8b71a2b5dc Load site config data in CommentFormatter tests
This fixes missing reply links in arwiki test output.

Change-Id: I24d3b8371a8343c4445c716fadf0692be0924eed
2021-01-08 23:03:33 +00:00
jenkins-bot 3625f2d8f6 Merge "Catch when no changes are actually saved when posting a comment" 2021-01-08 22:46:14 +00:00
Bartosz Dziewoński 1c8ca53c92 Catch when no changes are actually saved when posting a comment
Bug: T268069
Change-Id: Ib9c136d846668335884a242322d5b0d4e038c6b1
2021-01-08 22:39:18 +00:00
jenkins-bot 452c6401d7 Merge "CommentItem/HeadingItem: Make more constructor args required" 2021-01-08 20:59:24 +00:00
jenkins-bot 89f6756e16 Merge "Pass interface language object to addReplyLinks" 2021-01-08 20:59:23 +00:00
jenkins-bot 28854303d5 Merge "Use content direction for styling reply links" 2021-01-08 20:59:21 +00:00
Ed Sanders 9ba6c3d159 CommentItem/HeadingItem: Make more constructor args required
This ensures the getters always return the promised types.

Change-Id: I1a3c909f5395463ef7a89d896ead1520b2a17509
2021-01-08 20:45:29 +00:00
Ed Sanders 0d2d3b16b8 Pass interface language object to addReplyLinks
Change-Id: I8a5562e11df3ad6430db48020d6005d0c4fd6834
2021-01-08 21:43:21 +01:00
Ed Sanders 823d61a69c Use content direction for styling reply links
Change-Id: Ib14ff4b69a20a2e928925a790a8892b6b2e29794
2021-01-08 17:08:45 +00:00
Translation updater bot 7ada28e361 Localisation updates from https://translatewiki.net.
Change-Id: I477ab75a71cdd3d71b434dc2fee85482937cf748
2021-01-08 08:55:41 +01:00
Translation updater bot 2d50037da3 Localisation updates from https://translatewiki.net.
Change-Id: I10cd25b4c15a9ac21566e6b1abe432003681ee35
2021-01-07 08:31:34 +01:00
jenkins-bot 6ee665f348 Merge "Messages for new topic tool" 2021-01-06 13:14:08 +00:00
Ed Sanders 63580d3fe8 Messages for new topic tool
Change-Id: I29066e3c4faa6980ece3fc583174efe2aa1ad2c4
2021-01-06 13:07:03 +00:00
jenkins-bot 4b1fe2d3b8 Merge "Refactor availability checks" 2021-01-05 19:04:29 +00:00
Ed Sanders dcc23f1108 Refactor availability checks
Allows for multiple features in the near future.

Separate availability and enabled.

Separate User/Title/Output checks.

Change-Id: I454bd8407675749d93ff3d2b4c5d624b433204db
2021-01-05 19:42:37 +01:00