toolkit
toolkit copied to clipboard
Deprecation
Expected Behaviour
Alert the consumer with helpful deprecation messages with information to upgrade.
The alerts should be configurable to turn off once steps are completed.
Current Behaviour
N/A
Attempted Fixes
A @warn
that outputs something similar to this:
WARNING: Deprecation Warning: `.u-margin-all` and `.u-padding-all` utilities have been deprecated and in 3.0 will be replaced.
For details to upgrade and mute this warning, see [some link].
Backtrace:
packages/sky-toolkit-core/utilities/_spacing.scss:13
With a sass-map to mute the warning (and other potential changes)
in settings/deprecation
:
$deprecation-warning: (
utilities/spacing: true // this is then overriden by the consumer to `false` once complete
) !default;
Context
Currently working on https://github.com/sky-uk/toolkit/pull/426 which introduces a new padding syntax, we need to be able to warn users about this and ease the upgrade process.
Did we use this before? https://github.com/salesforce-ux/sass-deprecate
I know we had issues previously but if I remember correctly that was pre v1 of Toolkit so it wasn't really compatible.
Yeah I think we did!