Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(web, web-twig, web-react): Deprecate UNSTABLE_ActionLayout #1872

Merged
merged 4 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ ActionLayout component is a container component that is used to position action
</ButtonLink>
</UNSTABLE_ActionLayout>
```

### ⚠️ DEPRECATION NOTICE

The component will be deleted in the next major version.
pavelklibani marked this conversation as resolved.
Show resolved Hide resolved
Use [ActionGroup][action-group-component] component instead.

[What are deprecations?][readme-deprecations]

[action-group-component]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/src/components/ActionGroup/README.md
[readme-deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#deprecations
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import classNames from 'classnames';
import React, { ReactElement } from 'react';
import { useStyleProps } from '../../hooks';
import { useDeprecationMessage, useStyleProps } from '../../hooks';
import { SpiritActionLayoutProps } from '../../types/actionLayout';
import { useActionLayoutStyleProps } from './useActionLayoutStyleProps';

Expand All @@ -11,6 +11,15 @@ const UNSTABLE_ActionLayout = (props: SpiritActionLayoutProps): ReactElement =>
const { classProps, props: modifiedProps } = useActionLayoutStyleProps(restProps);
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);

useDeprecationMessage({
method: 'component',
trigger: true,
componentProps: {
delete: true,
},
componentName: 'UNSTABLE_ActionLayout',
});

return (
<div {...otherProps} className={classNames(classProps.root, styleProps.className)} style={styleProps.style}>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ ActionLayout component is a container component that is used to position action
<ButtonLink href="#" color="secondary">Secondary Action</ButtonLink>
</UNSTABLE_ActionLayout>
```

### ⚠️ DEPRECATION NOTICE

The component will be deleted in the next major version.
Use [Flex][flex-component] CSS classes instead.

[What are deprecations?][readme-deprecations]

[flex-component]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web/src/scss/components/Flex/README.md
[readme-deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/README.md#deprecations
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ 'UNSTABLE_ActionLayout' -%}

{# Deprecations #}
{% deprecated 'UNSTABLE_ActionLayout: The component will be deleted in the next major version.' %}

<div class="{{ _rootClassName }}">
{% block content %}{% endblock %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ The component is based on the [Stack][stack] component and accepts all its prope
<Text>Description</Text>
</UNSTABLE_EmptyStateSection>
<UNSTABLE_EmptyStateSection>
<UNSTABLE_ActionLayout>
<div class="Flex Flex--noWrap Flex--alignmentXStretch Flex--tablet--alignmentXCenter Flex--alignmentYStretch Flex--vertical Flex--tablet--horizontalReversed">
<ButtonLink href="#" color="primary">Primary Action</ButtonLink>
<ButtonLink href="#" color="secondary">Secondary Action</ButtonLink>
</UNSTABLE_ActionLayout>
</div>
</UNSTABLE_EmptyStateSection>
<UNSTABLE_EmptyStateSection>
<Link href="#">Link to something</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ ActionLayout component is a container component that is used to position action
<a href="#" role="button" class="Button Button--secondary Button--medium">Secondary Action</a>
</div>
```

### ⚠️ DEPRECATION NOTICE

The component will be deleted in the next major version.
Use [Flex][flex-component] component instead.

[What are deprecations?][readme-deprecations]

[flex-component]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web/src/scss/components/Flex/README.md
[readme-deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#deprecations
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@use 'theme' as theme;
@use '../../tools/breakpoint';

// @deprecated Will be removed in the next major version.
.UNSTABLE_ActionLayout {
display: flex;
flex-direction: column;
Expand Down
Loading