-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Save Button component #7515
Comments
Do we want to have the spinner displayed for a certain period or can the switch to the |
This idea would definitely be welcome, The current save button is rather basic and it would be good to update it to a more responsive design. |
refs TryGhost/Ghost#7515 - changes to `gh-task-button`: - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params - positional param for `buttonText` - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion: ``` {{#gh-task-button task=myTask as |task|}} {{if task.isIdle "Save me"}} {{if task.isRunning "Saving"}} {{if task.isSuccess "Thank you!"}} {{if task.isFailure "Nooooooo!"}} {{/gh-task-button}} ``` - update existing uses of `gh-task-button` to match new component signature
refs TryGhost/Ghost#7515 - changes to `gh-task-button`: - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params - positional param for `buttonText` - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion: ``` {{#gh-task-button task=myTask as |task|}} {{if task.isIdle "Save me"}} {{if task.isRunning "Saving"}} {{if task.isSuccess "Thank you!"}} {{if task.isFailure "Nooooooo!"}} {{/gh-task-button}} ``` - update existing uses of `gh-task-button` to match new component signature
refs TryGhost/Ghost#7515 - changes to `gh-task-button`: - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params - positional param for `buttonText` - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion: ``` {{#gh-task-button task=myTask as |task|}} {{if task.isIdle "Save me"}} {{if task.isRunning "Saving"}} {{if task.isSuccess "Thank you!"}} {{if task.isFailure "Nooooooo!"}} {{/gh-task-button}} ``` - update existing uses of `gh-task-button` to match new component signature
refs TryGhost/Ghost#7515 - changes to `gh-task-button`: - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params - positional param for `buttonText` - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion: ``` {{#gh-task-button task=myTask as |task|}} {{if task.isIdle "Save me"}} {{if task.isRunning "Saving"}} {{if task.isSuccess "Thank you!"}} {{if task.isFailure "Nooooooo!"}} {{/gh-task-button}} ``` - update existing uses of `gh-task-button` to match new component signature
The functionality for this has been added via TryGhost/Admin#566. We still have some design work left, namely the animated icons and a review of how the fixed-width should work if the success/failure message is longer than the default message. There are still a few places where we are not yet using the save-state button, these are being tracked in #7865 |
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed - fixes broken spinner in `gh-spin-button` components
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed - fixes broken spinner in `gh-spin-button` components
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed - fixes broken spinner in `gh-spin-button` components
refs TryGhost/Ghost#7515 - adds animated spinner and check SVG icons - improves SVG sizing/alignment in buttons - disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed - fixes broken spinner in `gh-spin-button` components
refs TryGhost/Ghost#7515 - add a `retry` icon that better matches button text dimensions - add a spin animation for the retry icon - use the new retry icon in the default `gh-task-button` template - add a "restart animation" method to `gh-task-button` so that repeated clicks on a button appear to register the action when local validation means that there's no transition from failed->running->failed
Closing as complete. The fixed-width requirement still needs some work/discussion so I've opened a new issue for that #8341 |
Updated design for save button component, with 4 states:
1. Default
saving
2. Saving
success
orfail
3. Success
saving
4. Fail
saving
Notes
The text was updated successfully, but these errors were encountered: