nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
369 stars 52 forks source link

[Question] Transition to @nativescript/theme? #240

Open wSedlacek opened 3 years ago

wSedlacek commented 3 years ago

I am a bit new to NativeScript in general, but from what I can tell xplat is using the older nativescript-theme-core which appears to have a much different surface area than the newer @nativescript/theme

I understand that creating an automated migration for every possible class that was used in nativescript-theme-core to the new classes of @nativescript/theme is a bit of an ask which is why I presume this change hasn't happened yet, but it would be nice if for new projects they could specify, or even default to, the newer @nativescript/theme which in my experience more closely matches the documentation in NativeScript 7.

NathanWalker commented 3 years ago

@wSedlacek good question - we actually were not fans of @nativescript/theme 2.0 at all 😬 - we didn't like that it took the path of attaching itself to Element/Component names - that's just a poor practice in our opinion. It was a decision that was made prior to our influence on {N}'s direction.

So we've always intentionally built off nativescript-theme-core cause it's pure utility class styling handling.

@nativescript/theme 4.0 is in the works which will be based off tailwindcss and at that point we will switch to that as default here. Until then... hopefully that helps provide some clarifications.

wSedlacek commented 3 years ago

Absolutely! Thank you! Where should I look to for documentation on nativescript-theme-core? When looking through the documentation for NativeScript 7 there seem to be an exception that you are using @nativescript/theme 2.0 without any clear indication of this dependency.

Example: https://docs.nativescript.org/angular/ui/ng-components/button#styling

NathanWalker commented 3 years ago

Best reference is probably the source sass here: https://github.com/NativeScript/theme/tree/c1f8b50cd53f611c58b526cf14955a972d35c787/app/scss That's the latest of the 1.x series that we still use to this day.