kendo-themes icon indicating copy to clipboard operation
kendo-themes copied to clipboard

fix: utils import

Open kspeyanski opened this issue 1 year ago • 6 comments

Related to https://github.com/telerik/kendo-themes/issues/4502

Seems like utils package should be self-contained, no need to import it into each individual component - actually used mixins are coming from the core package. Otherwise the import order does not allow overriding specific component styles when an utility is used.

IMO, if we are to distribute the utils together with the theme, their styles should always be loaded at the bottom of the stylesheet. If we're to face inability to style something due to specificities, it would be a different story, but simple-selectors should be easily be styled with any utility class.

cc, @kikostadinov — I think https://github.com/telerik/kendo-react-private/pull/2463 would be unnecessary after this fix. Thoughts?

kspeyanski avatar May 29 '23 07:05 kspeyanski

@kspeyanski hey, yeah this should be enough.

kikostadinov avatar May 29 '23 15:05 kikostadinov

@kspeyanski can we go forward with moving the import to the end of the dist, but extract the component imports removal for the major release ( R3 ), as we need to also alter docs in docs-seed, katana and DS, and also mark this as an important change for users?

Juveniel avatar Jun 29 '23 05:06 Juveniel

Let me try keeping the imports while still forcing the output to have the utils at the end of the file.

Will follow up once I try it!

kspeyanski avatar Jun 29 '23 05:06 kspeyanski

@Juveniel — does not seem to be possible due to how the compiler works. When it sees that more than one file depends on the same module (in our case the utils module) it always puts it first in the output as it's treated as a dependency.

Maybe scrap this PR until we have readiness to detach the utils from the themes?

kspeyanski avatar Jun 29 '23 07:06 kspeyanski

Should we proceed with some fixes or temporary fixes in the ui suites regarding this issue?

zdravkov avatar Jul 04 '23 05:07 zdravkov

@zdravkov I'm afraid the proposed fixes in the UI suites (using the !k- important prefix) would only introduce another problems, so I cannot advise further. If a workaround for the specific issues has been found, we should probably take no actions at this point.

kspeyanski avatar Jul 04 '23 07:07 kspeyanski