Skip to content

Commit

Permalink
Fix(web, web-react, e2e): Flex reverse dictionary changes
Browse files Browse the repository at this point in the history
- `horizontal-reverse` changed to `horizontal-reversed`
  • Loading branch information
pavelklibani committed Jan 16, 2025
1 parent 1c6439e commit fd239fd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions docs/DICTIONARIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ This project uses `dictionaries` to unify props between different components.

### Direction

| Dictionary | Values | Code name |
| ----------------- | ------------------------------------------- | ----------------- |
| Direction | `horizontal`, `vertical` | Direction |
| DirectionAxis | `x`, `y` | DirectionAxis |
| DirectionExtended | Direction Dictionary + `horizontal-reverse` | DirectionExtended |
| Dictionary | Values | Code name |
| ----------------- | -------------------------------------------- | ----------------- |
| Direction | `horizontal`, `vertical` | Direction |
| DirectionAxis | `x`, `y` | DirectionAxis |
| DirectionExtended | Direction Dictionary + `horizontal-reversed` | DirectionExtended |

### Emphasis

Expand Down
4 changes: 2 additions & 2 deletions packages/web-react/src/components/Flex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Horizontal layout:
</Flex>
```

Horizontal reverse layout:
Horizontal reversed layout:

```jsx
<Flex direction="horizontal-reverse">
<Flex direction="horizontal-reversed">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react';
import DocsBox from '../../../../docs/DocsBox';
import Flex from '../Flex';

const FlexHorizontalReverseLayout = () => (
<Flex direction="horizontal-reverse">
const FlexHorizontalReversedLayout = () => (
<Flex direction="horizontal-reversed">
<DocsBox size="small">Item 1</DocsBox>
<DocsBox size="small">Item 2</DocsBox>
<DocsBox size="small">Item 3</DocsBox>
</Flex>
);

export default FlexHorizontalReverseLayout;
export default FlexHorizontalReversedLayout;
6 changes: 3 additions & 3 deletions packages/web-react/src/components/Flex/demo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DocsSection from '../../../../docs/DocsSections';
import FlexCustomSpacing from './FlexCustomSpacing';
import FlexHorizontalAlignment from './FlexHorizontalAlignment';
import FlexHorizontalLayout from './FlexHorizontalLayout';
import FlexHorizontalReverseLayout from './FlexHorizontalReverseLayout';
import FlexHorizontalReversedLayout from './FlexHorizontalReversedLayout';
import FlexResponsiveAlignment from './FlexResponsiveAlignment';
import FlexResponsiveCustomHorizontalSpacing from './FlexResponsiveCustomHorizontalSpacing';
import FlexResponsiveCustomVerticalSpacing from './FlexResponsiveCustomVerticalSpacing';
Expand All @@ -19,8 +19,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<DocsSection title="Horizontal Layout">
<FlexHorizontalLayout />
</DocsSection>
<DocsSection title="Horizontal Reverse Layout">
<FlexHorizontalReverseLayout />
<DocsSection title="Horizontal Reversed Layout">
<FlexHorizontalReversedLayout />
</DocsSection>
<DocsSection title="Vertical Layout">
<FlexVerticalLayout />
Expand Down
2 changes: 1 addition & 1 deletion packages/web-react/src/constants/direction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const Direction = {

export const DirectionExtended = {
...Direction,
HORIZONTAL_REVERSE: 'horizontal-reverse',
HORIZONTAL_REVERSED: 'horizontal-reversed',
} as const;

export enum DirectionAxis {
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/scss/components/Flex/_Flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// @see https://jira.almacareer.tech/browse/DS-1629 - Remove 'row' selector
.Flex--#{$infix}row,
.Flex--#{$infix}horizontal,
.Flex--#{$infix}horizontalReverse {
.Flex--#{$infix}horizontalReversed {
display: flex;
}

Expand All @@ -49,14 +49,14 @@
flex-direction: row;
}

.Flex--#{$infix}horizontalReverse {
.Flex--#{$infix}horizontalReversed {
flex-direction: row-reverse;
}

// @deprecated The 'column' direction will be removed in the next major version.
// Migration: delete 'column' selector
// @see https://jira.almacareer.tech/browse/DS-1629 - Remove 'column' selector
// @see https://jira.almacareer.tech/browse/DS-1630 - Add 'verticalReverse' selector
// @see https://jira.almacareer.tech/browse/DS-1630 - Add 'verticalReversed' selector
.Flex--#{$infix}column,
.Flex--#{$infix}vertical {
display: grid; // 2.
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/scss/components/Flex/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ <h2 class="docs-Heading">Horizontal Layout</h2>

<div class="Container">

<h2 class="docs-Heading">Horizontal Reverse Layout</h2>
<h2 class="docs-Heading">Horizontal Reversed Layout</h2>

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

<div class="Flex Flex--horizontalReverse Flex--noWrap Flex--alignmentXStretch Flex--alignmentYStretch">
<div class="Flex Flex--horizontalReversed Flex--noWrap Flex--alignmentXStretch Flex--alignmentYStretch">
<div class="docs-Box docs-Box--small">Item 1</div>
<div class="docs-Box docs-Box--small">Item 2</div>
<div class="docs-Box docs-Box--small">Item 3</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd239fd

Please sign in to comment.