Commit graph

3 commits

Author SHA1 Message Date
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