Skip to content

Streamline utils#5697

Open
Juveniel wants to merge 2 commits intodevelopfrom
streamline-utils
Open

Streamline utils#5697
Juveniel wants to merge 2 commits intodevelopfrom
streamline-utils

Conversation

@Juveniel
Copy link
Copy Markdown
Contributor

No description provided.

@Juveniel Juveniel added this to the 2026 Q1 (Feb) milestone Dec 12, 2025
@Juveniel Juveniel self-assigned this Dec 12, 2025
@Juveniel Juveniel requested a review from a team as a code owner December 12, 2025 15:23
@Juveniel Juveniel added Enhancement New feature of an existing functionality or an improvement of an existing functionality. C: Utils labels Dec 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 12, 2025

Packages Report

core default classic bootstrap material fluent utils html
Size 33.61 KB (0.0%) 799.90 KB (2.3%🔼) 798.64 KB (2.3%🔼) 813.16 KB (2.2%🔼) 947.44 KB (1.9%🔼) 1213.14 KB (1.5%🔼) 702.03 KB (12.3%🔼) 77.77 MB (0.0%)
Gzip Size 5.43 KB (0.0%) 103.56 KB (2.8%🔼) 103.64 KB (2.7%🔼) 105.70 KB (3.1%🔼) 116.57 KB (2.2%🔼) 140.86 KB (1.8%🔼) 58.76 KB (12.7%🔼) 15.95 MB (0.0%)
Compile Time 0.8 s (0.0%) 4.3 s (38.7%🔼) 4.4 s (46.7%🔼) 4.4 s (46.7%🔼) 4.8 s (50.0%🔼) 5.3 s (47.2%🔼) 2.9 s (20.8%🔼) 9.0 s (0.0%)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the utils package to consolidate utility class generation through a centralized configuration system, replacing repetitive boilerplate code with a declarative approach that improves maintainability and consistency.

Key Changes:

  • Introduced a unified configuration-driven utility generator (generate-utils-from-config)
  • Migrated 80+ utility files from manual generate-utils calls to config-based generation
  • Restructured $kendo-utils map with nested property/prefix/values format
  • Added comprehensive helper functions for config validation and processing

Reviewed changes

Copilot reviewed 93 out of 93 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/utils/scss/_variables.scss Restructured $kendo-utils from flat value maps to nested configs with property/prefix/values/aliases metadata
packages/utils/scss/_mixins.scss Added config-driven generation system with generate-utils-from-config and helper mixins
packages/utils/scss/_functions.scss Added config validation, normalization, and alias resolution functions
packages/utils/scss/_globals.scss Added import-once mixin to global exports
packages/utils/scss/typography/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/transform/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/layout/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/flex-grid/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/spacing/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/sizing/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/border/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/background/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/interactivity/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/effects/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/filter/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/svg/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/scss/table/*.scss Replaced manual generate-utils calls with generate-utils-from-config
packages/utils/docs/*.md Added documentation for new config system functions and mixins

$kendo-utils-grid-template-columns: map.get( $kendo-utils, "grid-template-columns" ) !default;
@include generate-utils( grid-cols-#{$key}, grid-template-columns, $kendo-utils-grid-template-columns, $important: false );

@include generate-utils-from-config("grid-template-columns", $responsive-key: $key);
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect mixin call syntax. The $responsive-key parameter should be passed as the second positional argument to generate-utils-from-config-responsive, not as a named parameter. Based on the mixin signature at line 263 of _mixins.scss, the correct call should be @include generate-utils-from-config-responsive('grid-template-columns', $key);

Suggested change
@include generate-utils-from-config("grid-template-columns", $responsive-key: $key);
@include generate-utils-from-config("grid-template-columns", $key);

Copilot uses AI. Check for mistakes.

// Screen readers utility classes
$kendo-utils-accessibility: map.get( $kendo-utils, "accessibility" ) !default;
$kendo-utils-accessibility: map.get( $kendo-utils, "screen-readers" ) !default;
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config key has been changed from 'accessibility' to 'screen-readers', but there's no corresponding 'screen-readers' key visible in the $kendo-utils map in _variables.scss. This will cause the utility classes to not be generated. Either add a 'screen-readers' entry to $kendo-utils or revert this change to use 'accessibility'.

Suggested change
$kendo-utils-accessibility: map.get( $kendo-utils, "screen-readers" ) !default;
$kendo-utils-accessibility: map.get( $kendo-utils, "accessibility" ) !default;

Copilot uses AI. Check for mistakes.
@zhpenkov
Copy link
Copy Markdown
Contributor

Overall looks good, in addition we might decouple the utils package from the core package to fix this issue:
#5662

@zhpenkov
Copy link
Copy Markdown
Contributor

We should also investigate the compile time increase in all themes packages, except the utils package.

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

Labels

C: Utils Enhancement New feature of an existing functionality or an improvement of an existing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants