simolus3 / zap

Zap is a fast web framework built on Dart
https://simonbinder.eu/zap/
MIT License
233 stars 12 forks source link

Discussions / Good first issues / Default Components #4

Open TimWhiting opened 2 years ago

TimWhiting commented 2 years ago

A few friendly suggestions:

simolus3 commented 2 years ago

Thanks for your feedback!

It would be great to enable Discussions on this repo so that questions could be asked that aren't really issues with the framework.

Good point, thanks! I've enabled discussions.

Additionally it would be helpful to know what issues you feel someone could work on to get started contributing.

Also a really good point. The current issues are mostly notes to myself and not necessarily great starting points for working on this project... They mostly resolve around the generator which is still a bit hacky at the moment. But of course some incremental issues to refactor the generator could be good first issues, I'll create them as I see fit. I have also opened two issues around the docs / more general ideas that are a better starting point and would really help the project.

Finally I'm wondering if it would make sense to contribute a default set of components in a separate package such as material_zap for material components, and if that could be an official package hosted in this repo rather than some 3rd party solution.

Yes, I think this would be great! Are you interested in helping out here? I can scaffold a material_zap or a zap_components package, and I agree that this is a good point to start contributing :)

TimWhiting commented 2 years ago

Yeah, I'd be happy to start contributing to a material_zap or zap_components package. As far as design for these components, I'd like to provide some styling options as a theme like in flutter (possibly exposed via a riverpod provider), in addition for allowing customization. I'm not super familiar however with sass, so I'm wondering if you have suggestions on how to allow for properties / themes for styling, but also allowing for custom css.

simolus3 commented 2 years ago

As far as design for these components, I'd like to provide some styling options as a theme like in flutter (possibly exposed via a riverpod provider)

For styling options, the easy solutions I know about are Sass variables (evaluated at compile-time) or CSS custom properties. I'm slightly leaning towards custom CSS properties because they can be assigned with CSS selectors (so we could assign a different set of variables for different components in an app, or have different values for night mode etc.).

Entirely custom CSS will be a bit harder to do I imagine. We could pass it down as a @prop and set it on the relevant elements with an inline style attribute, or maybe let users write global CSS that matches some component elements to add the additional styles.