-
Notifications
You must be signed in to change notification settings - Fork 5
Longer text that ends up on multiple lines looks ugly #54
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
Comments
Forgot to mention, using the latest version (^1.0.7) |
@andreiP4 I'll look into this for you - I'm kind of surprised the toast doesn't grow according with its content already. |
Hi @andreiP4 I've pushed version 1.0.8 which should address larger toast bodies. Can you check if this works for you? 2024-09-26.08-56-36.mp4 |
As for altering width: I see that the width is set to the width of the toast container. You could try overriding the CSS class |
Hi @Lerke I updated to the latest version, but the issue persists.
I also tested this on the demo website, and the issue is the same. This time I don't even see the scrollbar. I don't think this is browser-dependant, as I am using Chrome, and I also tested using Edge, with the same exact results.. I'll try overriding the css classes for width, maybe I can also find a fix for heigtht. I'll keep you informed if I succeed. |
@andreiP4 Ah, unfortunate. I don't think the demo page has been updated since 2021, so that's probably correct. I have tested in Firefox, but I'll do so again using Chrome. |
I can give some suggestions, if you don't mind, as I've worked a bit before with css (only with inline tailwind though), although I'm not sure that they would provide the fix. In the _toast.scss file, you could try to set |
@andreiP4 Suggestions are always welcome, thanks! I'll try them out when I can. |
@andreiP4 Do you happen to use any css framework in your project? The scrollbar being present is a mistake I made by making use of I'm working on a 2.0 release that prefixes all our css classes with |
@andreiP4 I've pushed a development version to our npm: I've also updated our pipeline to keep our Github pages demo up to date @ https://scenius-software.github.io/angular-toastify/ |
@Lerke I'm using bootstrap as part of a dashboard library that I'm using, so that may be the cause. I'll check tomorrow morning and update you with results. Thank you for your efforts! |
@Lerke just checked it and tested with a very long message, and it works just fine! Thank you for updating it! |
@andreiP4 Great to hear. I guess this issue can be closed then? I've republished the |
@Lerke yeah I think it can be closed |
Hi,
I am using the toasts to display some error messages from an API response, and sometimes the error message is longer than one line, causing the text to be very close to the bottom border of the toast. I tested other cases with some very long messages, and the toast would just slice the text to a certain amount of characters, while the rest don't get displayed.
Here's some examples:


Actual message:
this.toastServ.error('dhagsoiudshadoijuhasoiduahoisudbsaiudbasodnoiuansdoasndasopdaiudyaospfasjnfasipfjasojfoasjfiaiosfnjaosjfoiaspfapsiofhaoshfiuoaofpasfoasfa dhagsoiudshadoijuhasoiduahoisudbsaiudbasodnoiuansdoasndasopdaiudyaospfasjnfasipfjasojfoasjfiaiosfnjaosjfoiaspfapsiofhaoshfiuoaofpasfoasfa');
My question is, is it possible to change the toast styling ourselves to accommodate for longer texts? In this case I would only need a bit more height, but width could also be nice for some people or use cases.
Also, forgive me if this option was there already, but I couldn't find it documented anywhere.
Thank you!
The text was updated successfully, but these errors were encountered: