Server: Confirm modal: Exclamation mark out of place

Created on 28 May 2019  路  7Comments  路  Source: nextcloud/server

From: https://github.com/nextcloud/server/pull/15774#issuecomment-496557238

Looks a bit blurry to me, and ! is out of place?

@ChristophWurst

yes, but that is an issue with the confirm modal in general. mind opening a ticket for that and pinging our designers? thx

@nextcloud/designers

1. to develop bug design papercut

Most helpful comment

The icon itself is out of place here, it does not need to be there.

Additionally the buttons should not say "Yes" and "No" but be more descriptive like "Wipe data from this device" and "Keep data".

All 7 comments

Looks a bit blurry to me, and ! is out of place?

Your window screen have an impair height. So the translate is antialiasing on the subpixel :)
We should indeed try to center vertically the popup differently :)

The icon itself is out of place here, it does not need to be there.

Additionally the buttons should not say "Yes" and "No" but be more descriptive like "Wipe data from this device" and "Keep data".

This is actually not that trivial. Definitely no good first issue.

OC.Dialogs.confirm, etc. only allows you either an OK button or YES/NO. It doesn't allow custom labels.
cc @ChristophWurst Something we should do when porting it to vue.

OC.Dialogs.confirm is a wrapper for OC.Dialogs.message, so calling OC.Dialogs.message with the custom buttons could be a workaround for now.

@pierlon Please check the code :)
You can only set an OK button or YES/NO. Even when using OC.Dialogs.message directly

Yep you're right, overlooked that. Perhaps you could try changing the text after its created:

```js
OC.dialogs.confirm('Text', 'Title', null, true).done(() => {
const buttons = $('.oc-dialog-buttonrow button')

buttons.eq(0).text('Keep data')
buttons.eq(1).text('Wipe data')

})

Possible yes, but quite hacky and definitely nothing we should teach new contributors 馃槈
There are plans to have a clean, no-jquery implementation in our vue-components. We should just make sure to allow custom button labels there and migrate all usages of OC.Dialogs to our vue component.

Was this page helpful?
0 / 5 - 0 ratings