Commit graph

15 commits

Author SHA1 Message Date
Kunal Mehta
ec0be22116 Update Legoktm's email address
Change-Id: Icd58c93bb0cff5b0a4e7b7f02873a271bab8964f
2021-05-02 05:39:37 +00:00
jenkins-bot
219469d873 Merge "editpage: Fix misplaced return value in TextConflictHelper" 2020-05-25 11:07:56 +00:00
Volker E
14fb921e67 TextConflictHelper: Add ARIA label to wpTextbox1
Add `aria-label` attribute with explanatory description as value to the
`wpTextbox1` to allow screen reader read the purpose of the textbox for
visually impaired contributors.

Bug: T245863
Bug: T252355
Depends-On: I0628486e2201975464a77a55053a8d74ddfc57fb
Change-Id: Ib6fe49ade878757594fd28dac2bfd0ef8a7a5e8f
2020-05-11 06:36:55 +00:00
Thiemo Kreuz
8a40367a40 editpage: Fix misplaced return value in TextConflictHelper
Luckily this was not really broken. The old and the new code do the
exact same. The old code was just side-stepping the documented way
this method should be used.

Change-Id: I3f25ba159df5dbfc67eb7ade3fe29a017e601162
2020-05-06 18:01:35 +02:00
Peter Ovchyn
7d57b967b5 deprecation: Remove DeprecationHelper::newArgumentWithDeprecation and change callers accordingly
Bug: T245075
Change-Id: I0714b1c5d5a379cfe3ca473b72244d4d6bd1b7b8
2020-04-27 20:23:58 +03:00
ArtBaltai
0ef09103df TextConflictHelper: deprecate old constructor signature
A deprecation warning will be triggered if the constructor is called without providing a ContentHandlerFactory

Bug: T235165
Depends-On: I5996f0f01e28edf50d3caf2ca4557d64271d8545
Change-Id: Ie552b33a5644fa2aefd826df8fd18184434677b7
2020-02-12 14:02:38 +11:00
ArtBaltai
30e54b3962 Introduce ContentHandlerFactory
Added:
- ContentHandlerFactory
Tests:
- PHPUnit
Changed
- Calls of changed and deprecated
- DI for some service/api
Deprecated:
- ContentHandler::* then similar to ContentHandlerFactory
- ContentHandler::getForTitle
- ContentHandler::$handlers

Bug: T235165
Change-Id: I59246938c7ad7b3e70e46c9e698708ef9bc672c6
2020-02-07 00:53:51 +03:00
Adam Wight
630bd7c5e1 Simplify user bucket cases
Moving the repeated code out makes this slightly more readable.

Bug: T236886
Change-Id: I87ddba6901f901048fad18c3827316c260fe3ec3
2019-11-04 13:47:18 +01:00
WMDE-Fisch
5eef5a6654 Count edit conflicts combined with user edits
Bug: T236886
Change-Id: I275de8e806b9b29329c7757c4bb96ecd7ba0ea1f
2019-11-01 13:28:12 +01:00
Thiemo Kreuz
81fee5a5e9 editpage: Make TextConflictHelper::toEditContent private
The method is not used anywhere:
https://codesearch.wmflabs.org/search/?q=toEditContent&i=1
There is another method with the same name in the EditPage class. But
this is unrelated. As far as I can see the method I'm touching in this
patch was copied from the EditPage class.

Change-Id: I51d167723bd70220adbf4ac36f15f3290b7eb653
2019-04-24 10:34:01 +02:00
Kunal Mehta
4ef179e335 Fix/suppress misc phan errors (#5)
Add lots of missing return statements, or remove incorrect doc blocks.

Change-Id: I0881e98fbb9d0d4cf79ecc824064d24538055d3f
2019-04-05 15:53:37 -07:00
WMDE-Fisch
60e396da44 Set getEditConflictMainTextBox parameter type to array
This is only called at one place in core and used in the TwoColConf
extention. The passed argument is always an array.

Change-Id: I4ca94442b79dc8871ed72943be733d100e093e44
2018-08-16 11:03:48 +02:00
WMDE-Fisch
fb9a36c049 Moved textbox1 building into TextConflictHelper on edit conflicts
Factored out some minor parts about building editor CSS classes.

getEditConflictMainTextBox() mainly mirrors showTextbox1 parts not
included were moved to the EditPage.

Change-Id: I671e095acc08382dd0a1c3d167fdaaa623ec5499
2018-01-04 18:21:13 +00:00
addshore
6f2924af67 Track which namespaces edit conflicts are resolved in
This is similar to the tracking of the occourance of
edit conflicts but tracks the resolution of the conflicts.

Bug: T182011
Change-Id: I9a0c05dc921946fb6e0580b56b663783ca0b1b6e
2017-12-07 16:39:18 +01:00
Kunal Mehta
3f88e0c7bf EditPage: Extract some edit conflict code into EditConflictHelper
Extensions with custom content models (e.g. ProofreadPage) will extend
EditPage to provide a customized editing experience. However when
another extension like TwoColConflict wants to change just how edit
conflicts look, this causes problems since only one class can take the
place of EditPage.

So instead, split most of the frontend code for edit conflicts into
TextConflictHelper, and call it from edit page. Extensions can override
with the instance created by calling
EditPage::setEditConflictHelperFactory().

And to make that split possible also move EditPage::addNewLineAtEnd()
and ::buildTextboxAttribs() into a separate TextboxBuilder class that
both EditPage and TextConflictHelper can use.

Bug: T176393
Change-Id: Ie415edd84329c02d5762477f8a171fced85b01a2
2017-10-26 10:32:29 +02:00