-
Notifications
You must be signed in to change notification settings - Fork 16
Feature/165 improve ux for alerts #139
Conversation
| message, | ||
| detail: `This includes: \n\n${elementsDetails}\n\nYou can't undo this action.`, | ||
| type: 'warning', | ||
| buttons: ['Cancel', 'Delete'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find Cancel and Delete confusing a little.
What do you think about Cancel and Ok?
| cancelId: 0 | ||
| title, | ||
| message, | ||
| detail: `This includes: \n\n${elementsDetails}\n\nYou can't undo this action.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about Once done, You can't restore the files instead of You can't undo this action. (as if it already happened?)
What do you say?
|
Do we have other places/alerts where we show hashes? |
|
Added to It looks like these are the only places we show a hash in a dialog. |
| publishToIPNS(el.hash) | ||
| .then(result => { | ||
| const message = `IPNS ${result.name} has been successfully updated to ${result.value}!` | ||
| const newHash = `${el.hash} - ${el.stat.CumulativeSize.value} ${el.stat.CumulativeSize.unit}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that the hash is enough in the IPNS case, but if we can get the file names it would be helping a lot to understand what they have published! (maybe remove the size).
Think what the use would find useful here.
| const buttons = ['Close', 'Open in the browser'] | ||
| const elementsDetails = results | ||
| .map(el => { | ||
| return `${el.Hash} - ${el.CumulativeSize.value} ${el.CumulativeSize.unit}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add file name next to the hash, short the hash to few chars as length
| const message = `Are you sure you want to delete the selected ${isOneFile ? 'file?' : `${elements.length} files?`}` | ||
| const elementsDetails = elements | ||
| .map(el => { | ||
| return `${el.hash} - ${el.stat.CumulativeSize.value} ${el.stat.CumulativeSize.unit}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: show the file names, and a short hash
|
Updated to show |
What changed?
The confirmation dialog for removing files.