Remove the replyWidget property so users always have to use the
replyWidgetPromise.
Assume that the controller is setup immediately and so the
replyWidgetPromise will always be available.
Change-Id: Ib63952d745033721cac448feda9310e691c60090
I tried to benchmark this. It's not really a big bottleneck in this
codebase, but can still be seen. For example, the relative runtime
of the method CommentUtils::isCommentSeparator (the heaviest user of
this feature) goes down from 1.5% to 0.3%.
Depends-On: If9252a97562542e7a4bec29edcc6e8dee0fb8221
Change-Id: I6b94a2481b5c4f7983df78ee48d45c0d8a50e53b
Follow-up to arrow functions refactoring
(a74c00ba8c).
This caused API errors to be handled by showing an error box that
always used the message "Invalid response from server." (generated by
mw.Api#getErrorMessage) instead of the actual error message.
Change-Id: I1c347202f2c2d0a141ba09e6ad136f5d5dc2dc65
The required MediaWiki version in extension.json is 1.43 and does not
support php7.4,
remove the outdated version constraint from composer.json
Change-Id: Ia29e84f0662a07a9f95829be674ec13e97d5a6e5
Instead of checking section->exists() everywhere we have to call
getTruncatedSectionTitle(), override the method inside
PlaintextEchoPresentationModelSection class to make it always
return string for our case.
Call to getTruncatedSectionTitle() in the following classes now use
the method override:
* RemovedTopicPresentationModel
* SubscribedNewCommentPresentationModel
* AddedTopicPresentationModel
The call to getTruncatedSectionTitle() in CommentThanksPresentationModel
does not need nor use the override.
Bug: T378261
Change-Id: Ibe985da5c1a79c5a1853d9c4896f8769cce6ddfd
If the subject page/user doesn't exist it usually makes sense
not to show the "Start a discussion about X" message, but when
the talk page itself exists but without any discussions
(e.g. after a Flow archiving), then we _should_ show message to
start a new discussion.
Bug: T378392
Change-Id: I20dab0089691ba7a429c9a50f23b9e3afe61aaaf
EchoPresentationModelSection::getTruncatedSectionTitle() has a note that
it should not be called if ::exists() returned false. Among the reason
the section may not exist includes suppressing the revision where the
topic title was added or edited.
Add placeholder message text "(topic removed)", to be used in place of
the unavailable topic title. This is analogous to "(user removed)" which
would be shown along if the username is also suppressed.
Bug: T378261
Change-Id: I6db0872b8724323a5e15eb6a262c2c3d0bdd630d
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.
Bug: T376276
Change-Id: I40b301271ea0ae5d9123b06841eb8d3e4f9fbf86