known icon indicating copy to clipboard operation
known copied to clipboard

Remove dependence on Bootstrap

Open benwerd opened this issue 6 years ago • 9 comments

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

benwerd avatar Dec 05 '19 21:12 benwerd

I'd also like to remove the dependence on jquery

mapkyca avatar Dec 05 '19 21:12 mapkyca

@mapkyca +1 - adding that to the roadmap too

benwerd avatar Dec 05 '19 21:12 benwerd

See #2622

benwerd avatar Dec 05 '19 21:12 benwerd

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/

johanbove avatar Dec 06 '19 07:12 johanbove

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 avatar Dec 06 '19 09:12 mapkyca

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)

mapkyca avatar Dec 07 '19 09:12 mapkyca

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).

benwerd avatar Dec 07 '19 17:12 benwerd

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.

mapkyca avatar Dec 07 '19 17:12 mapkyca

+1 for twig I am up for that

ipranjal avatar Dec 11 '19 17:12 ipranjal