Page MenuHomePhabricator

WikiEditor Help text not horizontally aligned, confusing for new users
Closed, ResolvedPublic

Description

mis-aligned wikitext and rendered results

In MediaWiki 1.17.0 and its associated WikiEditor extension, click "Help" in the WikiEditor toolbar, and click Links. If the browser window is a certain size, the information in "What You Type" and "What You Get" does not line up, producing confusion for the new user.

In the attached screenshot, see that "[http://www.example.org]" lines up with "http://www.example.org", which is wrong.


Version: unspecified
Severity: enhancement

Attached:

wikieditor-display-bug.png (220×861 px, 20 KB)

Details

Reference
bz31649
TitleReferenceAuthorSource BranchDest Branch
Update function-schemata sub-module to HEAD (5f40813)repos/abstract-wiki/wikifunctions/function-evaluator!29jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (5f40813)repos/abstract-wiki/wikifunctions/wikilambda-cli!12jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (4927eba) (BREAKING - changes some test outputs)repos/abstract-wiki/wikifunctions/function-orchestrator!39apinesync-function-schematamain
Support degenerate quoted objects in the mixed validator, normalization, and canonicalization.repos/abstract-wiki/wikifunctions/function-schemata!22apineapine-norms-canonsmain
Draft: Produce a Z22K2 error when the input to canonicalize() or normalize() is very obviously wrong.repos/abstract-wiki/wikifunctions/function-schemata!7apineapine-fix-canonnormmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:54 PM
bzimport added a project: WikiEditor.
bzimport set Reference to bz31649.
bzimport added a subscriber: Unknown Object (MLST).

Multiple lines of help text are being placed in a single TD element, and several of these are being placed side by side. As a result, there is no horizontal alignment possible. Perhaps the Help section should be a real table with one row per line of text.

Confirmed: the more you shrink the browser window, the more likely examples in the center column will no longer line up 1:1 to their respective results in the right column.

We can probably get away with preventing the center column cells from wrapping their content and that should keep the examples in alignment with the results. The .css entry for td.description (first column of help window) is in error anyway in that the same attribute is repeated 2x so we can kill 2 birds at once here.

Lines 255 thru 268 of jquery.wikiEditor.toolbar.css could be replaced with....

mock jquery.wikiEditor.toolbar.css
.wikiEditor-ui-toolbar .section-help .page-table td.cell-description,
.wikiEditor-ui-toolbar .section-help .page-table td.description {
	width: 20%;
}
.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
.wikiEditor-ui-toolbar .section-help .page-table td.syntax {
	font-family: monospace, "Courier New";
	width: 40%;
	white-space: pre;
}
.wikiEditor-ui-toolbar .section-help .page-table td.cell-result,
.wikiEditor-ui-toolbar .section-help .page-table td.result {
	width: 40%;
}

... for example.

.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax
  white-space: pre;
}

is not suitable for the reference help, because there is a very long text in the syntax column.

The following CSS definition matches only to the link syntax help column:

/* T33649 */
.wikiEditor-ui-toolbar .section-help .page-table .table-link td.cell-syntax {
	white-space: pre;
}

Change 184860 had a related patch set uploaded (by Gerrit Patch Uploader):
Prevent line wrapping for link syntax help column

https://gerrit.wikimedia.org/r/184860

Patch-For-Review

An other solution would be using a non-breaking space in all languages.

Change 184860 merged by jenkins-bot:
Prevent line wrapping for link syntax help column

https://gerrit.wikimedia.org/r/184860

matmarex removed a project: Patch-For-Review.
matmarex set Security to None.
matmarex removed subscribers: gerritbot, Unknown Object (MLST).