snehilvj / dash-mantine-components

Plotly Dash components based on Mantine React Components
https://www.dash-mantine-components.com
MIT License
535 stars 54 forks source link

What to contribute? #29

Closed jlfsjunior closed 2 years ago

jlfsjunior commented 2 years ago

Hey @snehilvj,

Very nice work on the components!

I came across mantine a few times since you first publish your post in the Dash Community, so I took a deeper look and I am 100% sold on the idea of having its components available in Dash.

As I mentioned in the post, I was working in Dash Chakra UI Components, which I ended up losing the enthusiasm around it after I switched jobs... So I would like to join forces with you and Emil to make dmc great for the community.

The question is what can I help you with? I imagine there are many components to implement and I can help with that. But I can also take the testing part that is in the TODO list as first issue, as I have done it for Chakra for unit (Jest) and integration (pytest) tests...

Let me know your thoughts.

sylvoslee commented 2 years ago

What are the advantages of dash mantine components over dash bootstrap components

jlfsjunior commented 2 years ago

@sylvoslee My perspective on this is that Mantine, as Chakra UI and modern component libraries, are closer in React to styled-components ("inline styling" if you prefer) than styling via CSS and classes. This has two big advantages in my opinion when we think about Dash:

  1. Because theming is done via React Context, one can very quickly tweak the default theme in a consistent way. For example, if you have branding colors or palettes, you can just pass a dictionary with them and they will be propagated to the entire app (of course, depending on how this is implemented for the Dash components). In Bootstrap, the same thing would require to make the changes in sass and compile it to generate a CSS file.

  2. A related point is how styles conflict in Bootstrap and how to fix them. There are some css selections that are borderline impossible to target using an external stylesheet in dbc.

TL;DR: To me, Mantime requires way less css (arguably none) compared to BS, which is much more Dash-esque in my view (style via props, not stylesheets).

snehilvj commented 2 years ago

I agree with @jlfsjunior. I rarely concern myself with classnames and inline styles when using dmc. More on my motivations for using dmc:

  1. The look and feel of Mantine library. My colleagues use dbc a lot, but I have always found its look and feel a bit outdated. Mantine is refreshingly new.
  2. A complete suite of components. dbc lack some major components for my use case such as a datepicker, select/multiselect, notifications, etc.
  3. Thanks to @emilhe, ability to pass components other than children. This is not documented yet, but I'll have it in the docs soon.
  4. Theming. Mantine supports dark theme natively.