Purge PrimeNG and migrate to Tailwind CSS#1815
Conversation
|
Tailwind establishes theme, base, components, utilities, after which layout is declared. Consequently, layout declarations such as .card { margin-bottom: 1rem } override utilities such as mb-0 despite equal specificity. Several Home and Swarm cards rely on those utilities. Define the complete layer order before importing Tailwind, with utilities last. |
|
Classes constructed as 'text-' + swarmColor + '-500' are invisible to Tailwind’s scanner. The generated CSS lacks text-purple-500, text-cyan-500, and text-gray-500, so several device models lose their intended color. Return complete literal class names or safelist all possible values. |
|
HomeComponent uses app-dropdown without importing DropdownComponent; SwarmComponent similarly omits SliderComponent. Their fixtures should fail template creation once the browser executes the tests. |
Added layer config, which made some margin classes work like they should. Good observation!
Should be fixed now. No more compound class names in use.
Improved test harnass, some cases were not tested so missing imports didn't break the tests. Also, tests now fail on any console error. |
* Shared SelectOption model * Add keyboard handler for dropdown * Subscription cleanup on dialog list
This PR purges PrimeNG and migrates to Tailwind CSS. PrimeNG stopped being open source and requires a license from version 22. We could get a license but are not allowed to ship the firmware with a license embedded, so this makes it impossible to move forward with PrimeNG.
To resolve this predicament, the following changes were made:
As Tailwind CSS is much more efficient in what to pack, the size of the packages has reduced by ~25%:
Before:
After:
Follow-up of #1651.
Supersedes #1800 and mutatrum#10
To keep the scope slightly smaller ahem, this PR does not upgrade Angular,, does not replace toastr with a native component nor replaces moment.js with
Intl. As always with these changes,package-lock.jsoncauses a big chunk of the diff with+657/-313, so the net diff of this PR is+1703/-1289. Biggest impact is all.htmlfiles are changed a lot.