Skip to content
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

Custom Alert Notification Popup action #7371

Closed
pbrink231 opened this issue Aug 19, 2022 · 6 comments
Closed

Custom Alert Notification Popup action #7371

pbrink231 opened this issue Aug 19, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@pbrink231
Copy link

pbrink231 commented Aug 19, 2022

Describe the feature request
I would like to either have an action that can create an alert popup.
Currently this already exists but built into the actions with predefined alerts.

I think a simple action with a bindings text box would be amazing and give very simple and easy custom feedback.
could maybe add an icon field to pick one of the icons already in the system.

With this I would also like to have an option to turn off the alert for an action that gives an alert.
Some examples are like "Row Updated" or like in the photo "Automation triggered". In most cases I would not want these if I can give my own alert once the automation or all other triggers finish with my own custom message.

Details for request

New action called "Show Notification" under the category "Application" (picture 2)
3 fields (picture 3)

  • Message
  • Type (select element) (default is "Success")
  • Use default icon (checkbox, default checked)
  • Auto Dismiss (checkbox, default checked)
  • Icon (Icon picker) (if use default is false)

type choices

  • Success
  • Error
  • Info
  • Warning

Will use the default icon unless use default is unchecked.
when unchecked, icon choice will show to pick an icon. Can pick none.

initial code update without testing. Anyone is welcome to take and finish this.
https://github.com/pbrink231/budibase/tree/feature/toast-action

Screenshots
image

image

image

@pbrink231 pbrink231 added the enhancement New feature or request label Aug 19, 2022
@JayP718
Copy link

JayP718 commented Aug 19, 2022

Yes please! I think multiple folks have requested a similar feature, it would be a great enhancement

@pbrink231
Copy link
Author

I saw one but I think they were thinking about modals. I have been searching hard for other issues and was surprised I could not find one.

@pbrink231 pbrink231 changed the title Custom Alert Notification action Custom Alert Notification Popup action Aug 19, 2022
@JayP718
Copy link

JayP718 commented Aug 19, 2022

I think they are posted in discussions.

#3396
#5234

And a comment here
#1176

Here
#3670
#7315

I think there's more but that's all I quickly found.

@pbrink231
Copy link
Author

Updated answer based on adobe spectrum toast element

@pbrink231
Copy link
Author

Took a stab at the edits needed. Did not test these updates anyone is welcome to pickup where I left off. I dont have a dev system setup yet.
https://github.com/pbrink231/budibase/tree/feature/toast-action

Updating main comment with updated description of what I am looking for

@aptkingston
Copy link
Member

@pbrink231 I added this over the weekend when I had some free time, and I had to do a double take when I saw your code! I was sure I must have pushed up the code already and you had copied me - but I hadn't pushed it up yet.

Your implementation is pretty much perfect - really impressive stuff.

I've opened a PR there to add this action 👍 The only thing I didn't add was a custom icon, because we don't actually have a nice spectrum icon picker at the moment and I felt it was the least important setting anyway.

@aptkingston aptkingston self-assigned this Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants