question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toast on demand without title/templating?

See original GitHub issue

Ok, the following is “opinionated” so I’m rising this… accordingly… more to get an official stance that to rant… 😉

I’ve dropped the previous toast library I was using when toasts got into bootstrap-vue and I know that the styles are inherited by bootstrap. But I’m now leaning to rethink this.

When you use <b-toast>, you control it all, but focus here is when using toast on demand. I issue attention catching quick messages to my users and, as such, they do not really need a title but they need to be “catchy”. When I issue a toast on demand without title, the heading is actually included, empty, and actually with more color relevance than the actual content.

Now question is: should toast on demand skip the header when there’s no title? And backup question is: should toast on demand render the toast content as header in order to get more impact (based on the fact that there’s no header)?

Is there a way to control this kind of stuff with bootstrap-vue (aka: controlling the template of a toast on demand)?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
tmorehousecommented, May 1, 2019

@EPinci The header is retained for the close button. But if you don’t specify a title, and set noCloseButton: true, then the title/header bar will not be rendered, just the body… and adding the option solid: true will turn off transparency (actually it switches to a non-transparent color) to make them stand out a bit more.

You can also pass a class (or classes) to be added to the toast, which can be used to override the coloring.

1reaction
tmorehousecommented, May 1, 2019

If you need HTML content in the toast body when using this.$bvToast.toast(), you can pass VNodes as the message (instead of a string).

use this.$createElement(...) to return Vue vNodes.

An example can be found here https://jsfiddle.net/rd8pqb74/ and https://jsfiddle.net/e9txmdv8/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toast Mobile Order & Pay™ On-Demand Training
This Toast classroom on-demand training prepares your restaurant for setup, configuration, and guest experience with Toast Mobile Order and Pay™.
Read more >
Toast Takeout & Delivery 4+ - App Store
Food you love without the wait. Order ahead from your favorite restaurants. Customize your order, pay in seconds, and pick it up in-store....
Read more >
Introducing Toast Delivery Services™: a Flat ... - Business Wire
Toast Delivery Services™ is an on-demand solution that does not require a Toast Point of Sale or Toast Hardware purchase.
Read more >
S-1/A - SEC.gov
We started Toast to make restaurant work a little easier. ... If the demand for restaurant management platforms by SMBs does not continue...
Read more >
Get the Most Out of Toast - Spark Feature Session - YouTube
Toast is raising the bar in restaurant success through a revolutionary suite of Customer Support, On- Demand Trainings, and Professional ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found