toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Deprecation

Open joe-bell opened this issue 6 years ago • 2 comments

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.

joe-bell avatar May 29 '18 08:05 joe-bell

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.

MrDinsdale avatar Jun 26 '18 13:06 MrDinsdale

Yeah I think we did!

joe-bell avatar Jun 26 '18 15:06 joe-bell