Git Product home page Git Product logo

Comments (7)

chrissainty avatar chrissainty commented on May 19, 2024

Hi @Delpire, why do you feel overriding the CSS is a bad idea?

from toast.

Delpire avatar Delpire commented on May 19, 2024

@chrissainty Hello! Perhaps just my lack of css experience. I can give it a try. I like how bootstrap often provides different classes I can pass to an html element to specify the size, I just thought it would be nice to provide this to the Blazored Toast element.

from toast.

chrissainty avatar chrissainty commented on May 19, 2024

I understand where you’re coming from. The problem is what sizes do we provide? Small, medium, large? What’s small? What’s large? One persons small is another persons medium or vice versa.

I’m open to ideas.

from toast.

Delpire avatar Delpire commented on May 19, 2024

Well right off the bat, having an option to remove the header would reduce the height. That being said, it probably isn't a good idea to depend purely on color.

I could see maybe providing a "compact" option where the padding is reduced, the font size is reduced, and perhaps the header and text could be on the same line. Kind of like how Slack provides Clean vs Compact messages:

image

image

I think you are right though. It is a difficult thing to decide as far as fixed values.

An alternative would be to provide some levers that a user could customize. I just overrode the css by reducing the font-size and the width of the blazored-toast class. If these were parameters to the BlazoredToast component then a user could customize it. I'm not sure how well the support for this is in Blazor. It might have to be applied directly to the html, which with my limited understanding might be a bad decision.

image

Overall, I'm pretty new to Web UI design, so I am not very familiar with best practices, and Blazor is so new a lot of best practices probably haven't been determined yet. 😅

from toast.

chrissainty avatar chrissainty commented on May 19, 2024

We could definitely expose some levers for people to tweak but if I’m honest, CSS does all of this. I’m reluctant to adds loads of options into the component and make the code far more complex when everything is infinitely customisable with CSS.

from toast.

Delpire avatar Delpire commented on May 19, 2024

That's fair. I am okay with this simply being closed.

One last option that I am also not sure about the feasibility of, would be to provide some kind of empty toast type that we could pass a render fragment to.

<Blazored.EmptyToast>
content...
</Blazored.EmptyToast>

Regardless, thank you for taking the time to discuss this!

from toast.

chrissainty avatar chrissainty commented on May 19, 2024

@Delpire We have added a custom toast option now that might be of interest to you

from toast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.