Commit graph

1064 commits

Author SHA1 Message Date
Ed Sanders 664d5d041a Fix fetching of oldest comment in a thread
The implementation in Parser doesn't descend into sub-thread.
Re-use the getThreadSummary method in ThreadItem and traverse
the thread properly.

Bug: T298617
Change-Id: I318d9012eb83f37ccbe463923524ef2e9f995ced
2022-09-01 21:22:09 +00:00
Ed Sanders 2883829678 highlighter: Use upstream getTargetFromFragment
Bug: T315872
Depends-On: I605a24c708e60ccffde9dce524485f61fd5c7b06
Change-Id: Ie689c57ce23b6298e089c7bf9bc53409abc45016
2022-08-31 13:10:10 +00:00
jenkins-bot e680735d63 Merge "Remove all stuff about legacy IDs" 2022-08-27 05:34:48 +00:00
jenkins-bot b9e3043415 Merge "Enhance vector-2022 table of contents" 2022-08-26 20:57:39 +00:00
jenkins-bot f9dc5dd135 Merge "Support nested-directionality content" 2022-08-26 18:46:57 +00:00
Ed Sanders 4a092df740 percentDecode: Pre-escape query string separators (&,=)
Change-Id: I1f648f192749fdd1d9d1217a87bd0a78ba064f7d
2022-08-26 13:33:38 +01:00
Ed Sanders c232df01a4 Support nested-directionality content
Bug: T315037
Change-Id: I93f258a5d5fea174902b77d5d0728cfd68a66867
2022-08-26 12:46:26 +01:00
Ed Sanders 40bd58859e Prefix browser title while replying/starting a new topic
We already do this while editing so that users can quickly see which
tabs they are actively working on.

This extends the functionality to the reply and new topic tools.

Bug: T262066
Change-Id: Iae662ad26072617aad71e519bb6c3cbb19ef1246
2022-08-25 16:12:54 +01:00
Ed Sanders 776fca861f Update categories list when reloading page
Change-Id: I0f6b61eec33dca26e128bd60bb027a5a42a3f9ee
2022-08-24 13:13:12 +01:00
Ed Sanders dec755c802 Fix updating of subtitle when reloading page for new comments
The subtitle prop and some others were missing from the action=parse
request. Use the same props as the VE edit API.

Change-Id: I8e9cc735d3ee50dfe0fbe0349713d88654ad9fd1
2022-08-24 13:05:07 +01:00
Bartosz Dziewoński cfa45a5f4c Remove all stuff about legacy IDs
We can no longer change IDs so easily, because they're stored in the
permalink database, so remove this mechanism to make sure it's not
accidentally used in the future.

Change-Id: I392ee1f49c48fc2f23d05e9a37c643438b4f2b9a
2022-08-24 01:01:09 +02:00
Bartosz Dziewoński 434944b197 Enhance vector-2022 table of contents
Bug: T307823
Depends-On: I034a579b7ef51950726c9ac056d6c940a7d7d472
Change-Id: Icafc13e1c846549429fe2b3b4a1721c02ab7428d
2022-08-23 19:46:44 +00:00
Ed Sanders 9adafd43a1 Show latest comment info in subtitle
Bug: T306675
Change-Id: I1400dbb50cdf8a0a5e23ce533c84fad96f3fae16
2022-08-23 19:31:40 +00:00
jenkins-bot e309fba4c2 Merge "Update permalinks when refreshing the page" 2022-08-22 23:03:40 +00:00
Ed Sanders 837591f12e Don't pass an empty string to getElementById to avoid Firefox warning
Bug: T315614
Change-Id: I6d4eedd75a23f6ada26aedca54da80c5e33ea4f0
2022-08-22 16:36:09 +01:00
Ed Sanders c221a2fb7b Update permalinks when refreshing the page
Bug: T315830
Change-Id: I56620e9d31799640241430ceba6da959a0c8405e
2022-08-22 12:15:34 +01:00
jenkins-bot ab8b1fe815 Merge "Logging: platform as phone/desktop depending on whether MF is active" 2022-08-19 22:45:04 +00:00
jenkins-bot 3267a1deed Merge "Fix headings changing height when JS loads on mobile (FOUC)" 2022-08-19 00:56:13 +00:00
Ed Sanders c56bf250ac Fix headings changing height when JS loads on mobile (FOUC)
The bottom margin used to collapse into the next heading, but
MobileFrontend changed how section hiding was done.

Change-Id: Ide10e9f17ad38d672958e2c3a43c2eb2cfdd82ae
2022-08-19 00:50:08 +00:00
David Lynch acadaf7f1e Logging: platform as phone/desktop depending on whether MF is active
Change-Id: I3ecf4b56b11008dbe6d30a0a868affa028786d95
2022-08-18 14:48:29 -05:00
Ed Sanders 0e95e45e88 Add space after namespace on talk pages
Bug: T313636
Change-Id: I481e885b54a1aeb9dd69a08dc614ab5f4f94b41e
2022-08-18 16:02:27 +01:00
jenkins-bot 4b0349a178 Merge "Initialize on live preview and real-time preview too" 2022-08-10 15:14:05 +00:00
jenkins-bot 91a94fe9bb Merge "Pass empty string to unused argument of pushState/replaceState" 2022-08-09 20:48:12 +00:00
jenkins-bot 89607c6e25 Merge "Implement percentDecode for finding link fragment targets" 2022-08-09 20:18:58 +00:00
Ed Sanders b3b543040b Implement percentDecode for finding link fragment targets
Relying on :target getting set means we can't use
history.pushState to change the URL without scrolling.

Should conform to https://url.spec.whatwg.org/#percent-decode

Change-Id: I4ccc3fd745884849a781a9f7fc8b00b8b689e20a
2022-08-09 20:06:28 +00:00
Ed Sanders 9f27c55f8c Pass empty string to unused argument of pushState/replaceState
Per https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
this argument is treated as unused in all the browsers we support.

Change-Id: I515193fdafaaf1c19701bc77e590d6f66b1cf4bf
2022-08-09 13:37:57 +01:00
jenkins-bot a4d9455743 Merge "logger: Also log EditAttemptStep events via Metrics Platform" 2022-08-06 05:01:19 +00:00
jenkins-bot 7ba6443a05 Merge "Clear floats above the new topic empty state" 2022-08-05 08:16:27 +00:00
Bartosz Dziewoński 0c80eeb88b Fix ReplyLinksController#teardown
Follow-up to 31c57d594a. This was
causing an exception, preventing the page contents from updating after
saving changes.

Change-Id: I8c9ab51385172056be9032ec0087f64ff34b6709
2022-08-03 20:46:19 +02:00
jenkins-bot 7ee49a2138 Merge "Make comment markers inline-block to fix comment wrapping in Safari (in headings only)" 2022-08-03 14:22:51 +00:00
Bartosz Dziewoński 2bb0a11d55 Clear floats above the new topic empty state
It should appear below any page content, at full width.
Currently it gets squished by floats on some pages.

Change-Id: I4c4107d438dfd06eec21badce5f216aa2c137272
2022-08-02 19:37:12 +02:00
jenkins-bot b1934c8a84 Merge "Don't infuse reply buttons if not in use" 2022-08-02 12:58:17 +00:00
Ed Sanders a0fa7c466f Don't infuse reply buttons if not in use
Change-Id: I704cbf3f1a681c474ce5d44b7c5af5c8dbb82f3b
2022-08-02 13:27:43 +01:00
Bartosz Dziewoński 35db93d9f5 Disable OOUI reply buttons for real, not with CSS hack
We already infuse them, so might as well do this...

Change-Id: I962c052d3f5b5c15b3a15e6e4533bd87624eb6e2
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 293df2438f Make "Add topic" button in Vector sticky header disabled after click
Bug: T307726
Change-Id: I3077357d7753d9259c5c32b71dd23a0e21bde6de
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 549fcc062b Fix focussing the reply button/link after closing the reply widget
Change-Id: I0db0fc8a93512751f8a9bcc96b048c1ab1f24f95
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 31c57d594a Do not duplicate item JSON in page HTML
Rather than setting it on both the reply link and the reply button,
set it on their parent element.

Update ReplyLinksController to handle this.

Change-Id: I650e9c0ebd354a82b8f66a63c5b4c02b2e29b105
2022-08-01 22:14:50 +00:00
jenkins-bot 47158f28dc Merge "Fire new 'wikipage.tableOfContents' hook to update TOC after save" 2022-08-01 19:49:39 +00:00
Ed Sanders 980b2c38bc Make reply links into buttons when visual enhancements enabled
Bug: T255560
Bug: T309904
Change-Id: I3932f576086a43df89ff97a1b3dafdc27c54f71c
2022-08-01 20:59:53 +02:00
jenkins-bot 9ceccd2d48 Merge "Fix styling of new comment notification on mobile" 2022-08-01 18:28:10 +00:00
jenkins-bot d247842772 Merge "Ignore "tracked" templates at the beginning of comments" 2022-08-01 14:52:39 +00:00
jenkins-bot 96868976bf Merge "Re-enable keyboard sequences for template, table etc. in new topic tool" 2022-08-01 12:28:15 +00:00
Ed Sanders 54eabe1f4f Fix styling of new comment notification on mobile
* Keep buttons on the same line
* Reduce font size to align borders

Change-Id: I1cc44ae1bd8b5e45d9a5b2ea4f9352163d12e8e6
2022-07-31 23:00:05 +01:00
Bartosz Dziewoński ddd391b6db Ignore "tracked" templates at the beginning of comments
This improves the behavior when replying to these comments
and the message snippets shown in notifications.

Bug: T313097
Change-Id: Ia10400472c9e999fa526c7437a03b72461c37b74
2022-07-31 03:56:36 +02:00
Bartosz Dziewoński e5abfdbe8a Re-enable keyboard sequences for template, table etc. in new topic tool
They were only disabled in the reply tool, because their wikitext
markup doesn't work when indented. This is not a concern in the new
topic tool.

Rename our sequences that display the wikitext warning to avoid these
items showing up in the command help dialog, and remove overrides for
global ve.ui.commandHelpRegistry. (As a result, the dialog now lists
the blockquote command, which was previously missing even though it
was enabled, but only with the 'Ctrl+8' shortcut and not 'Type ":"'.)

Also remove filtering rules for external paste.

Bug: T311653
Change-Id: I4557c376fcf099d81e91ae5c2b18301d97921180
2022-07-31 02:40:12 +02:00
Ed Sanders 434e11df87 Enable new comment notifications on mobile
Since writing this feature we added the ability to update
the page dynamically on mobile, so this shoud just work now.

Bug: T301929
Change-Id: Iceb5d8c90a892807745ba7133b7dd389293d3327
2022-07-31 00:07:14 +01:00
Ed Sanders 4da2ecf32f Hide section collapse button in preview.
In general we are hiding non-content elements in the preview
and this matches the behvaviour of the article editor.

Change-Id: I6669d8cc737214d464b662ccc6900ccce229b3d7
2022-07-29 14:09:56 +01:00
Bartosz Dziewoński f4a9d5b8f9 Fire new 'wikipage.tableOfContents' hook to update TOC after save
Bug: T294950
Depends-On: Icaeda68ded94a04edef7a3629385eeb232048684
Depends-On: I1644a74370b42b04d0db167879f7de2207ebfcf5
Change-Id: Ic3ef4e332ade8918778b6aaaa8eaf7e98f0a8d7d
2022-07-28 23:37:29 +02:00
Bartosz Dziewoński 9425f75f47 Initialize on live preview and real-time preview too
Bug: T309423
Change-Id: I661dfb2b9159fe56edffabd9fba00cd2c56343cd
2022-07-28 19:06:32 +02:00
Ed Sanders 2f44d99184 Simplify CSS selectors for [reply] and [subscribe] links
:first-of-type selectors refer to the node name, so just
use :first-child and :last-child for the open and close brackets.

Change-Id: I2e8ca7e99d1262522ed2d3b5133093817af8ad29
2022-07-27 16:22:11 +00:00