Go to file
Bartosz Dziewoński 8e44b43df0 Split off ThreadItemSet from CommentParser
Goal:
-----
Finishing the work from Iadb7757debe000025e52770ca51ebcf24ca8ee66
by changing CommentParser::parse() to return a data object, instead of
the whole parser.

Changes:
--------
ThreadItemSet.php:
ThreadItemSet.js:
* New data class to access the results of parsing a discussion. Most
  methods and properties are moved from CommentParser with no changes.

CommentParser.php:
Parser.js:
* parse() returns a new ThreadItemSet.
* Remove methods moved to ThreadItemSet.
* Placeholder headings are generated slightly differently, as we process
  things in a different order.
* Grouping threads and computing IDs/names is no longer lazy. We always
  needed IDs/names anyway.
* computeId() explicitly uses a ThreadItemSet to check the existing IDs
  when de-duplicating.

controller.js:
* Move the code for turning some nodes annotated by CommentFormatter
  into a ThreadItemSet (previously a Parser) from controller#init to
  ThreadItemSet.static.newFromAnnotatedNodes, and rewrite it to handle
  assigning parents/replies and recalculating legacy IDs more nicely.
* mw.dt.pageThreads is now a ThreadItemSet.

Change-Id: I49bfe019aa460651447fd383f73eafa9d7180a92
2022-02-21 16:22:32 +00:00
.phan Merge "Update DiscussionTools phan configuration to match new Parsoid DOM alias config" 2022-01-20 23:34:25 +00:00
i18n Localisation updates from https://translatewiki.net. 2022-02-16 08:12:56 +01:00
images Compress emptystate.svg with svgo 2021-10-04 12:56:20 +01:00
includes Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
maintenance Defensive use of dynamic paths in maintenance script 2020-02-20 19:51:07 +01:00
modules Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
sql Automatic topic subscriptions (on any edit) 2021-11-15 22:45:42 +01:00
tests Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
.eslintignore Fix linting on i18n key order 2021-10-07 17:37:51 +01:00
.eslintrc.json build: Updating ansi-regex to 5.0.1 2021-10-09 07:08:30 +00:00
.gitignore Remove extra blank line from .gitignore file 2020-08-31 15:24:56 +01:00
.gitreview Add .gitreview 2019-10-09 21:18:34 +00:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 10:53:01 +00:00
.stylelintrc.json Remove deprecated dt- classes 2021-03-23 12:39:34 +00:00
CODE_OF_CONDUCT.md build: Updating npm dependencies 2020-01-09 06:43:15 +00:00
composer.json Various code quality tweaks 2022-02-19 19:36:52 +01:00
COPYING Add required files for an extension 2019-10-10 19:42:56 +01:00
DiscussionTools.alias.php Translate Special:TopicSubscriptions to Czech 2021-11-22 16:23:41 +01:00
extension.json Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
Gruntfile.js eslint: Lint root folder with server rules 2021-10-07 17:37:52 +01:00
package-lock.json build: Update eslint-config-wikimedia to 0.22.1 2022-02-09 13:50:55 +00:00
package.json build: Update eslint-config-wikimedia to 0.22.1 2022-02-09 13:50:55 +00:00