Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JointsWP 6: Supporting Multiple Frameworks #367

Open
JeremyEnglert opened this issue Oct 15, 2018 · 5 comments
Open

JointsWP 6: Supporting Multiple Frameworks #367

JeremyEnglert opened this issue Oct 15, 2018 · 5 comments

Comments

@JeremyEnglert
Copy link
Owner

JointsWP has always included Foundation baked into its core, however, with the shift towards Flexbox & CSS Grid, many users are left wanting something a bit more "bare bones". Also, requirements vary from project to project and users shouldn't have to use a different workflow/theme just because requirements dictate a specific framework. That's why JointsWP 6 will allow users to use Foundation, Bootstrap or no framework at all.

However, we need to discuss the best way to handle this. When a user runs npm install the first time, they will be asked which framework they want to use. If a user selects a framework, we need to figure the best way to install those framework specific files.

Other themes use Composer for this, however, I think Node is our best bet as users will already be installing it to use the theme. However, there are two (maybe more) ways we can handle adding the framework specific files.

Option 1 - Separate Repos for Framework Specific Files

How it Works: when a user selects a specific framework, we make another call to Github to grab framework specific files. We also run an npm install to grab the actual framework and install it as a dependency.

This option is probably the most logical but comes with additional overhead of having separate repos to house framework specific files.

You can see how this would work here: https://github.com/JeremyEnglert/JointsWP/blob/6.0-dev/build/build.js#L59

Option 2 - Single Repo for All Files, Automatically Remove Unnecessary Files During Theme Setup

How it Works: the initial download will include all files for all of the frameworks we support. When a user selects a framework, we remove all of the files that are not specific to that framework.

I'm not a huge fan of this route. But it is nice because it keeps all of the files in a single repo.

Really looking forward to hearing what other people think or other potential routes we can take.

@JeremyEnglert
Copy link
Owner Author

@garrett-eclipse would love your feedback here.

@garretthyder
Copy link
Collaborator

Hi @JeremyEnglert

Taking some thought on this I agree the longterm goal is separate repositories for framework-specific files as it opens the opportunity for third-party to create their own framework package to support additional frameworks or to be replacements of the JWP core framework components.

With that being said I can see the simplicity for the initial development to house all components in a single repo to ease development.

As you already have an example of how the first option would work and because it's the long-term goal it makes sense to continue that route regardless of option #2's simplicity for initial development.

I'll look into this further but feel the initial direction into modulated framework components makes the most sense.

Cheers

@JeremyEnglert
Copy link
Owner Author

So my original idea was that even if Foundation/Bootstrap was included, the grid classes wouldn't be automatically added. The main reason for this is it allows us to support multiple frameworks and most people change these classes anyway.

But is that too big of a change? Will people expect those classes to be in place or will they be okay adding them on their own?

@mlangone
Copy link

mlangone commented Nov 21, 2018 via email

@garretthyder
Copy link
Collaborator

I can foresee that resulting in alot of support of people not understanding why it's not working out of the box as they expect.
I would suggest we build the wrappers which hold those structural classes as partials and have a bootstrap-partials and foundation-partials, etc folders which get moved into the project overwriting the existing skeletal partials on selection of a framework. This way each framework gets their own set of wrapper partials holding the expected classes. These can of course be replaced by the developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants