Skip to content

Commit

Permalink
BREAKING CHANGE(web): Remove feature class for bordered Alert #DS-1230
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Apr 29, 2024
1 parent 0813dcb commit 1781b68
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 86 deletions.
11 changes: 1 addition & 10 deletions packages/web/DEPRECATIONS-v2.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# Deprecations List

Following deprecations and feature flags will be removed in version 2 of the _spirit-web_ package.
Following deprecations will be removed in version 2 of the _spirit-web_ package.

> Please follow these steps to safely upgrade your design system to Spirit Design System v2 components.
[What are deprecations?][readme-deprecations]

[What are feature flags?][readme-feature-flags]

## Feature Flags

### Alert Bordered

The feature flag enabling the bordered variant of alert will be removed and the bordered variant will
be enabled by default.

## Deprecations

### Tooltip and Dropdown Placements
Expand Down
17 changes: 0 additions & 17 deletions packages/web/src/scss/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,3 @@ Variants:
<div>Data update failed due to missing internet connection</div>
</div>
```

## Feature Flag: Bordered Alert

The Alert border feature flag is not disabled by default. To enable it, either set the
`$alert-enable-bordered` Sass feature flag to `true` or use the `spirit-feature-alert-enable-bordered`
CSS class on any parent of the Alert.

For more info, see main [README][readme-feature-flags].

### ⚠️ DEPRECATION NOTICE

The Alert will be bordered by default in the next major release.

[What are deprecations?][readme-deprecations]

[readme-deprecations]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/README.md#deprecations
[readme-feature-flags]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/README.md#feature-flags
12 changes: 0 additions & 12 deletions packages/web/src/scss/components/Alert/_Alert.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use 'theme';
@use '../../settings/feature-flags';
@use '../../tools/dictionaries';
@use '../../tools/typography';

Expand All @@ -13,17 +12,6 @@
width: 100%;
padding: theme.$padding;
border-radius: theme.$border-radius;

// @deprecated The feature flag will be removed in the next major version.
// Migration: delete this feature flag and make the bordered version the default.
@if feature-flags.$alert-enable-bordered {
border: theme.$border-width theme.$border-style var(--alert-color);
}
}

// @deprecated The feature flag will be removed in the next major version.
// Migration: delete this feature flag and make the bordered version the default.
.spirit-feature-alert-enable-bordered .Alert {
border: theme.$border-width theme.$border-style var(--alert-color);
}

Expand Down
43 changes: 0 additions & 43 deletions packages/web/src/scss/components/Alert/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,47 +123,4 @@ <h2 class="docs-Heading">Alert Icons</h2>

</section>

<div class="spirit-feature-alert-enable-bordered">
<section class="docs-Section">
<h2 class="docs-Heading">Feature Flag: Bordered Alert</h2>

<div class="docs-Stack docs-Stack--stretch">

<div class="Alert Alert--success" role="alert">
<svg width="24" height="24">
<use xlink:href="/assets/icons/svg/sprite.svg#check-plain" />
</svg>
<div>We sent you an activation link to email <strong>[email protected]</strong>. See <a href="./" class="link-underlined">FAQ</a> for more info.</div>
</div>

<div class="Alert Alert--informative" role="alert">
<svg width="24" height="24">
<use xlink:href="/assets/icons/svg/sprite.svg#info" />
</svg>
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam at excepturi laudantium magnam mollitia
perferendis reprehenderit, voluptate. Cum delectus dicta ducimus eligendi excepturi natus perferendis
provident unde. Eveniet, iste, molestiae? See <a href="./" class="link-underlined">FAQ</a> for more info.
</div>
</div>

<div class="Alert Alert--warning" role="alert">
<svg width="24" height="24">
<use xlink:href="/assets/icons/svg/sprite.svg#warning" />
</svg>
<div><strong>Warning!</strong> Data update failed due to missing internet connection. See <a href="./" class="link-underlined">FAQ</a> for more info.</div>
</div>

<div class="Alert Alert--danger" role="alert">
<svg width="24" height="24">
<use xlink:href="/assets/icons/svg/sprite.svg#danger" />
</svg>
<div>Data update failed due to missing internet connection. See <a href="./" class="link-underlined">FAQ</a> for more info.</div>
</div>

</div>

</section>
</div>

{{/layout/web-plain }}
1 change: 0 additions & 1 deletion packages/web/src/scss/components/Dropdown/_Dropdown.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use 'sass:map';
@use '../../settings/feature-flags';
@use '../../tools/breakpoint';
@use '../../tools/dictionaries';
@use '../../tools/placement';
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/scss/components/Modal/_ModalDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// 4. Override bottom padding of parent `.Modal` in the docked variant.

@use 'sass:map';
@use '../../settings/feature-flags';
@use '../../tools/breakpoint';
@use '../../tools/typography';
@use 'theme';
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/scss/components/Tooltip/_Tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// 2. Reuse already generated custom properties to allow overriding the arrow appearance live in the browser.

@use 'sass:math';
@use '../../settings/feature-flags';
@use '../../tools/dictionaries';
@use '../../tools/placement';
@use '../../tools/reset';
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/scss/settings/_feature-flags.scss

This file was deleted.

0 comments on commit 1781b68

Please sign in to comment.