idno / known

A social publishing platform.
https://withknown.com/opensource
Other
1.03k stars 194 forks source link

Remove dependence on Bootstrap #2617

Open benwerd opened 4 years ago

benwerd commented 4 years ago

No official Known template should use Bootstrap on any level. Instead, we should use CSS grids and a simple, sensible base CSS stylesheet.

mapkyca commented 4 years ago

I'd also like to remove the dependence on jquery

benwerd commented 4 years ago

@mapkyca +1 - adding that to the roadmap too

benwerd commented 4 years ago

See #2622

johanbove commented 4 years ago

Even-though I agree with removing Bootstrap and jQuery dependencies, I would still advocate in keeping a CSS system, so all themes and core templates speak the same "CSS language". Would you consider TailWindCSS? https://tailwindcss.com/

mapkyca commented 4 years ago

We'll use sass, and whatever framework makes sense to give us a leg up.

I have a strong view that we actually make the front end skin a separate repo, that way the dependency management between core and plugins can be offloaded to composer.

Themes would build against a specific front end skin, meaning we can run multiple skins concurrently without breaking things for people. Gives people a lot more freedom to innovate.

mapkyca commented 4 years ago

I will also add that, where practical, we should move templating over to twig at this time. It's mature, widely used, more secure, and cross platform (so we could use the same template tools for e.g. react)

benwerd commented 4 years ago

I’ll do some reading on Twig and React. It wasn’t in a place where expressive development was possible with it when I started work on Known, but I’d love it if it had evolved to work well with modern development practices. The thing I’m looking for is cascading templates: the ability to supersede just the templates you need to in order to create a new theme. Otherwise we have a ton of duplicated code in each new theme, which is impractical and messy (and potentially, in the worst case, a security issue).

mapkyca commented 4 years ago

Yep yep. Totally possible right now with the hybrid template class right now in known (if there's a twig template, it'll be used, just like a standard bonita template).

It's a fairly simplistic approach, and there's lots that twig can do that we might not be able to use with this approach (like twig native inserts and overrides), but as I look into it more we can do more.

My point is that we should be consistent with templating and not reinvent the wheel - twig is mature and supported both in javascript and for classic back end generated dom.

ipranjal commented 4 years ago

+1 for twig I am up for that