Page MenuHomePhabricator

Process and Message dialogs don't really support having actions with no labels (only icons)
Closed, ResolvedPublic

Description

Process and Message dialogs don't really support having actions with no labels (only icons). Found when working on T75677.

5gOjqz0.png (137×518 px, 5 KB)

Zvc6RTy.png (157×320 px, 5 KB)

To test, try this patch:

1diff --git a/demos/pages/dialogs.js b/demos/pages/dialogs.js
2index 689bf6d..a10ceee 100644
3--- a/demos/pages/dialogs.js
4+++ b/demos/pages/dialogs.js
5@@ -42,8 +42,8 @@ OO.ui.Demo.static.pages.dialogs = function ( demo ) {
6 OO.inheritClass( ProcessDialog, OO.ui.ProcessDialog );
7 ProcessDialog.static.title = 'Process dialog';
8 ProcessDialog.static.actions = [
9- { action: 'save', label: 'Done', flags: 'primary' },
10- { action: 'cancel', label: 'Cancel', flags: 'safe' }
11+ { action: 'save', icon: 'check', flags: 'primary' },
12+ { action: 'cancel', icon: 'clear', flags: 'safe' }
13 ];
14 ProcessDialog.prototype.initialize = function () {
15 ProcessDialog.super.prototype.initialize.apply( this, arguments );
16@@ -333,11 +333,11 @@ OO.ui.Demo.static.pages.dialogs = function ( demo ) {
17 title: 'Delete file?',
18 message: 'The file will be irreversably obliterated. Proceed with caution.',
19 actions: [
20- { action: 'reject', label: 'Cancel', flags: 'safe' },
21- { action: 'reject', label: 'Move file to trash' },
22+ { action: 'reject', icon: 'clear', flags: 'safe' },
23+ { action: 'reject', icon: 'delete' },
24 {
25 action: 'accept',
26- label: 'Obliterate',
27+ icon: 'alert',
28 flags: [ 'primary', 'destructive' ]
29 }
30 ]

Event Timeline

matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex changed Security from none to None.
matmarex added a project: OOUI.
matmarex subscribed.
Jdforrester-WMF moved this task from Backlog to Next-up on the OOUI board.

Change 175576 had a related patch set uploaded (by Bartosz Dziewo?ski):
ProcessDialog, MessageDialog: Support iconed actions

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

Patch-For-Review

Change 175576 merged by jenkins-bot:
ProcessDialog, MessageDialog: Support iconed actions

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