Page MenuHomePhabricator

No right margin is needed for the last child of the save dialog's checkboxes block
Closed, ResolvedPublic1 Estimated Story Points

Description

In the save dialog's checkboxes block, .oo-ui-fieldLayouts have margin-right equal to 1.5em. But the last child doesn't need it since the checkboxes block has padding already:

image.png (433×526 px, 47 KB)

After the change, the checkboxes in ruwiki won't be split into two lines anymore:

image.png (428×518 px, 43 KB)

Existing code:

.ve-ui-mwSaveDialog-checkboxes .oo-ui-fieldLayout {
    display: inline-block;
    margin: 0 1.5em 0 0;
}

Proposed addition:

.ve-ui-mwSaveDialog-checkboxes .oo-ui-fieldLayout:last-child {
    margin-right: 0;
}

(Also, if the checkboxes are split into two lines, the bottom margin is bigger than the top, but I guess a separate task is needed for this.)

Event Timeline

Jack_who_built_the_house renamed this task from No right margin is needed for the last child in the save dialog's checkboxes block to No right margin is needed for the last child of the save dialog's checkboxes block.Jun 4 2018, 3:04 PM

Sounds reasonable. Do you want to submit a patch? You can find this code in the mediawiki/extensions/VisualEditor Git repository, in
modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css.

That space is reserved for the "remaining characters" counter. We recently changed it to only show when there are <100(?) chars remaining, hence the confusion:

image.png (205×515 px, 23 KB)

We could change it to only add the margin when the counter is show (which is very rarely), but also having the dialog reflow would also be sub-optimal (you may enough need to recalculate the whole height of the modal).

This margin is unnecessary though, and I think that's what we're proposing to remove:

image.png (980×1 px, 336 KB)

Ok, I was going off the margin shown in the first screenshot in the description.

Change 438131 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.ui.MWSaveDialog: Remove unnecessary margin after last checkbox

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

Change 438131 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.ui.MWSaveDialog: Remove unnecessary margin after last checkbox

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

Deskana triaged this task as Medium priority.
Vvjjkkii renamed this task from No right margin is needed for the last child of the save dialog's checkboxes block to gobaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed matmarex as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from gobaaaaaaa to No right margin is needed for the last child of the save dialog's checkboxes block.Jul 2 2018, 4:43 AM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to matmarex.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot set the point value for this task to 1.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.