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

update toast styles to fit latest official styles #763

Merged
merged 9 commits into from
Jun 2, 2023

Conversation

RyanZhiNie
Copy link
Contributor

@RyanZhiNie RyanZhiNie commented May 15, 2023

πŸ“‘ Description

Update the styles of the toast component to fit the latest official styles

Status

  • Not Completed
  • Completed

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • I have checked the page with https://validator.unl.edu/
  • All the tests have passed
  • My pull request is based on the latest commit (not the npm version).

β„Ή Additional Information

@stackblitz
Copy link

stackblitz bot commented May 15, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
flowbite-svelte βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 2, 2023 6:17am
flowbite-svelte-update βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 2, 2023 6:17am

@shinokada
Copy link
Collaborator

@jjagielka Are you happy with this PR?

@jjagielka
Copy link
Contributor

Not at all. This PR introduce the new colors: info, danger and disables normal color management i.e. 'primary', 'red', 'blue', ...
More over those new colors are now called levels.

However, I must admit that something went wrong with Toast component and currently it doesn't look in accordance with Flowbite.com.

@RyanZhiNie
Copy link
Contributor Author

RyanZhiNie commented May 16, 2023

My understanding of Colors of the Toast component in Flowbite is not just for colors but for practical meaning, they are used to make the toasts somewhat like alerts.

image

That's the reason why I remove the color prop and introduce the more practical level prop. However, users can still use their desired colors by setting the level prop none and use explicit tailwind classes.

What's more, the primary, red, blue ... are difficult to define FOR THE TOAST COMPONENT because they are NOT defined by Flowbite.com. For me, I'd rather leave it to users to decide.

@shinokada
Copy link
Collaborator

@RyanZhiNie Thank you for your PR and contribution.

The following is the comparison of two versions.

Current Version:

  • Simplicity: Fewer props and a simpler structure for easier understanding and use by developers unfamiliar with complex configurations.

PR Version:

  • Level Colors: Additional styling options like color levels and customizable classes for versatile design adaptation. Different color levels convey message types or importance levels through visual cues.

@RyanZhiNie RyanZhiNie marked this pull request as draft May 17, 2023 02:24
@RyanZhiNie
Copy link
Contributor Author

I have updated this PR to reintroduce the color prop. Users can now easily change the colors either by setting the level prop for practical usage or setting the color prop just for changing colors : )

@jjagielka
Copy link
Contributor

I still don't get why to introduce level. What's the difference between color="red" and level="danger"? They both produce identical code. Why not to stay with color only? Because we lack the orange color? We can add it.

@RyanZhiNie
Copy link
Contributor Author

Remove the level prop.

@shinokada
Copy link
Collaborator

colorPalette should have none with ''.

@RyanZhiNie
Copy link
Contributor Author

colorPalette should have none with ''.

Done.

@jjagielka
Copy link
Contributor

jjagielka commented May 29, 2023

I have just two comments left for that PR:

  • color gray needs dark:bg-gray-700 otherwise it's the same as background
  • extraIconClass is an excess, please leave just defaultIconClass, we should not make the API grow too much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants