Open
Description
Feature
Let's add native support for resources banner that should look similar to the tutorial custom implementation from https://ticketing.avodemo.com/
Must have
- Option to define title
- Option to define body, with html_safe support
- Option to define icon
- Option to define type: :info, :warning, :error, :success, which will set the color of the banner
- Option to define visibility
- Option to define URL to redirect to when clicked
- A way to use custom component where all the options are passed as attributes
Nice to have
- Option to define position: :top, :bottom
- Option to define timeout (how long the banner should be visible)
- Option to define custom color instead of using the type color
Exploratory DSL
self.callouts = [
{
type: :info, # :warning, :error, :success;
visible: -> { true },
icon: "",
title: -> {
"Warning sir"
},
body: -> {
"alert(#{params[:id]})"
"<span>hey</span>".html_safe
render partial: "avo/callouts/user_callout"
render Avo::Callouts::UserCallout.new(record: record)
},
# or
renderable: -> { render partial: "avo/callouts/user_callout" },
renderable: -> { Avo::Callouts::UserCallout.new(record: record) },
},
]