tjikko-studio / components

Component library for Tjikko Studio apps
0 stars 0 forks source link

Extract components to component library #3

Closed shawninder closed 3 years ago

shawninder commented 3 years ago

Library will need to expose components as vanilla javascript packages which can be imported both by the app (and used in a React context) and by the Kirby panel (and used in a Vue context).

This might look like a separate repo organized with Storybook methodology in mind, but I need to research exactly how to package the components (or the entire library)

miherb commented 3 years ago

@highshot-rk we are thinking this might be a better configuration. We are thinking to create a different repo as the Tjikko Component library following the Storybook methodology which would be with React components to be used by both the Front-End app and by Kirby panel. The challenge is that the Kirby panel uses vue.js, but we can export the components with vanilla javascript to reuse them in Vue. From the Tjikko Component library, we will be able to publish packages allowing the use of these components without however requiring to be in a JSX context. However, Kirby deploys the Vue panel without giving us access to the webpack config, so we can't use JSX. This additional constraint must be taken into account in our component packaging strategy. What do you think?

highshot-rk commented 3 years ago
  1. I think we can combine Kirby and Next.JS too (reference: https://github.com/jeremien/kirbyReactBoilerplate)
  2. If we have to use VueJS in Kirby, as you said we can export the components with vanilla javascript and use it in Kirby as using static files.
shawninder commented 3 years ago

Interesting, let me see if that would work for us!

shawninder commented 3 years ago

That just looks like a fork of Kirby. How are we going to get the updates? Is this even up to date with the latest Kirby release? How will we get help from the Kirby team using this fork? I don't think this is what we're looking for…

highshot-rk commented 3 years ago

I will try to test with latest NextJS and latest Kirby(version installed in our backend)

shawninder commented 3 years ago

Just remember that we need to be absolutely sure that we can still get updates, support and help from the Kirby team and the community before we switch to a fork. And what about plugins? Will all the existing plugins work perfectly with this fork?

miherb commented 3 years ago

@shawninder is this solved or we are still figuring it out?

shawninder commented 3 years ago

Solved but not done? There are still components (like the Date picker) that exist in SMPX-Website that haven't been moved to components and storybook…

miherb commented 3 years ago

Shouldn't the Date picker comes from the Calendly API? I did not see this as a component from @ktryndchrs...also, I listed here everything that is necessary for the website. Any components that exist in SMPX-Website that isn't here might well be useless components...

shawninder commented 3 years ago

ok, bad example, just replace "Date picker" with "phone number input"

miherb commented 3 years ago

I focused on all the components needed to build the blocks template that constitutes the Home page.

miherb commented 3 years ago

@ktryndchrs and I were also not sure if these were from us or from the calendly API...

Screen Shot 2021-07-05 at 6 22 17 PM

shawninder commented 3 years ago

Don't know, but I think they are ours…

miherb commented 3 years ago

Then only the phone number would be needed as the other cases are all done...we'll get back to it whenever we will be at this stage.