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

New module system #2826

Merged
merged 13 commits into from
Sep 27, 2021
Merged

New module system #2826

merged 13 commits into from
Sep 27, 2021

Conversation

joneff
Copy link
Contributor

@joneff joneff commented Sep 27, 2021

Note: this introduces backwards incompatible behaviour for nouvelle, but the theme hasn't had its "v1" release yet (which will be v5...)

Two major changes: :where styles and new modules system

:where styles

We began using the selector for component styles. Considering this is a selector that doesn't increase specificity, any selector would override it. That means utility classnames, both from our themes or third parties, should, in theory, work by overriding our styles. A highly-enough requested feature to be able to apply third party classnames to kendo components.

Note: each and every developer is responsible for what third party class names do to Kendo UI components! Bootstrap's form-component will, in all certainty, break the layout of every Kendo UI form component.

new module system (WIP)

That's the more important bit: our current module system employs some very unsavoury practices, like loading all required components. It may sound like a good idea, but at the end, the button styles get loaded like a gazillion of themes, which leads to exponential build times in the magnitude of ... well a lot. We also employ some other practices to plugin to node-sass / dart-sass and speed up our build process and bring time down to just over a second for a theme.

That being said, not everyone uses those (even though our "shortcuts" are available as @progress/kendo-theme-tasks) and build time is generally slow.

The new module system, which, I cannot stress enough, is still work in progress, should solve those issues. Build time should be as linear as it gets.

Where as previously, if somebody wants a custom build of Kendo UI themes, they would have to import all components they need (which leads to the aforementioned exponentially slow build time), this time around, everything is imported once and a single configuration is provided. When we are done, it should something like:

// For all components
@import "~@progress/kendo-theme-NAME/dist/all.scss"; 

// For some components
$kendo-theme-config: (
    components: (
        "grid",
        "scheduler",
    )
);
@import "~@progress/kendo-theme-NAME/dist/all.scss";

@joneff joneff added this to the 2022.1 milestone Sep 27, 2021
@joneff joneff merged commit 136cfde into develop Sep 27, 2021
@joneff joneff deleted the new-module-system branch September 27, 2021 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants