Page MenuHomePhabricator

No right margin is needed for the last child of the save dialog's checkboxes block
Closed, ResolvedPublic1 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:

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

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.)

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 4 2018, 3:02 PM
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
stjn added a subscriber: stjn.Jun 4 2018, 3:11 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:

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:

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

Thank you, @matmarex. Sorry, had to time.

Deskana closed this task as Resolved.Jun 11 2018, 3:05 PM
Deskana triaged this task as Normal priority.
Jdforrester-WMF set the point value for this task to 1.Jun 13 2018, 6:26 PM
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 Normal 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 Normal.
CommunityTechBot set the point value for this task to 1.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.