Skip to content

Commit c69eb85

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 4ecbdce + 88190f0 commit c69eb85

File tree

166 files changed

+1715
-955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1715
-955
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Changelog
22

3+
## [7.24.0](https://github.com/gravity-ui/page-constructor/compare/v7.23.0...v7.24.0) (2025-12-22)
4+
5+
6+
### Features
7+
8+
* **FoldableList:** add yfm support for list prop ([#1342](https://github.com/gravity-ui/page-constructor/issues/1342)) ([7e36ea8](https://github.com/gravity-ui/page-constructor/commit/7e36ea85582ba47483ae9dbac1480560708efb8c))
9+
* **questions:** update storybook and add yfm support ([#1341](https://github.com/gravity-ui/page-constructor/issues/1341)) ([67414dd](https://github.com/gravity-ui/page-constructor/commit/67414dd15d551e272e07dd9b3c49201091633cbd))
10+
11+
12+
### Bug Fixes
13+
14+
* **BasicCard:** mark property hoverBackgroundColor as deprecated ([#1356](https://github.com/gravity-ui/page-constructor/issues/1356)) ([18d71f8](https://github.com/gravity-ui/page-constructor/commit/18d71f848ed99a3789a5568b295f9e9f25adfe69))
15+
* **Questions:** use sanitaze for faq miqrodata ([#1358](https://github.com/gravity-ui/page-constructor/issues/1358)) ([38a50ed](https://github.com/gravity-ui/page-constructor/commit/38a50ed77b410fddf124196dc7889b28d6adbebb))
16+
17+
## [7.23.0](https://github.com/gravity-ui/page-constructor/compare/v7.22.0...v7.23.0) (2025-12-03)
18+
19+
20+
### Features
21+
22+
* add ability to centered title in cardLayoutBlock ([#1337](https://github.com/gravity-ui/page-constructor/issues/1337)) ([bb51c0e](https://github.com/gravity-ui/page-constructor/commit/bb51c0e3d7acd326baa6b32a99a2243a2718aaff))
23+
24+
## [7.22.0](https://github.com/gravity-ui/page-constructor/compare/v7.21.1...v7.22.0) (2025-11-26)
25+
26+
27+
### Features
28+
29+
* **FormBlock:** add content labels, stub, update background ([#1314](https://github.com/gravity-ui/page-constructor/issues/1314)) ([044ced8](https://github.com/gravity-ui/page-constructor/commit/044ced812937014597307a8b056fbfef4ad3a295))
30+
31+
## [7.21.1](https://github.com/gravity-ui/page-constructor/compare/v7.21.0...v7.21.1) (2025-11-26)
32+
33+
34+
### Bug Fixes
35+
36+
* **BasicCard:** add animation for hover background color ([#1334](https://github.com/gravity-ui/page-constructor/issues/1334)) ([7ebabde](https://github.com/gravity-ui/page-constructor/commit/7ebabde30b5fb1030814bd0c05e910a2350a2a23))
37+
338
## [7.21.0](https://github.com/gravity-ui/page-constructor/compare/v7.20.0...v7.21.0) (2025-11-18)
439

540

memory-bank/activeContext.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,23 @@ Recent development has focused on:
6767

6868
10. **Hover Background Color Enhancement**: Added support for customizable hover background colors in BasicCard component:
6969

70-
- **Schema Support**: Added `hoverBackgroundColor` property to BasicCard schema as optional string field
71-
- **Component Implementation**: BasicCard component now accepts `hoverBackgroundColor` prop and applies it as CSS custom property `--hover-background-color`
70+
- **Schema Support**: Added `hoverBackgroundColor` property to BasicCard schema as optional string field (**deprecated**)
71+
- **Component Implementation**: BasicCard component now accepts `hoverBackgroundColor` prop and applies it as CSS custom property `--hover-background-color` (**deprecated**)
7272
- **CSS Integration**: Uses existing `background-hover()` mixin in CardBase component that applies the custom property on hover
7373
- **Flexible Styling**: Allows any valid CSS color value (hex, rgb, rgba, named colors, etc.)
7474
- **Backward Compatibility**: Optional property that doesn't affect existing implementations
7575

76+
11. **CardLayout Title Centering Enhancement**: Added title centering support for CardLayout block:
77+
78+
- **New Prop**: Added `centered?: boolean` prop to `CardLayoutBlockProps` for centering title and subtitle
79+
- **Default Behavior**: Default value is `false`, maintaining backward compatibility (left-aligned by default)
80+
- **Title Component Enhancement**: Extended `Title` component with `colJustifyContent?: GridJustifyContent` prop for controlling title and subtitle alignment
81+
- **Responsive Behavior**: Dynamic `colSizes` based on `centered` prop:
82+
- When `centered === false`: `sm: 8` (allows left-aligned title with narrower column)
83+
- When `centered === true`: `sm: 12` (full width for centered title)
84+
- **Implementation Logic**: Uses conditional check `centered ? GridJustifyContent.Center : GridJustifyContent.Start` for alignment and `centered ? 12 : 8` for column size
85+
- **No Breaking Changes**: All changes are backward compatible with default `centered: false` value
86+
7687
## Active Decisions and Considerations
7788

7889
### Architecture

memory-bank/progress.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ Recently updated sub-block components with enhanced consistency:
4949
- **ContentList**: Enhanced with Gravity icons support for list items
5050
- **IconWrapper**: Updated to support both traditional image icons and Gravity UI icons
5151

52+
### Layout Blocks Enhancement
53+
54+
- **CardLayout Block**: Enhanced with title centering support:
55+
- **Title Centering Control**: New `centered?: boolean` prop allows centering title and subtitle
56+
- **Title Component**: Extended with `colJustifyContent` prop for alignment control
57+
- **Responsive Layout**: Dynamic column sizes adapt based on `centered` prop:
58+
- When `centered === false`: uses `sm: 8` for narrower left-aligned title column
59+
- When `centered === true`: uses `sm: 12` for full-width centered title
60+
- **Implementation**: Conditional logic `centered ? GridJustifyContent.Center : GridJustifyContent.Start` for alignment and `centered ? 12 : 8` for column size
61+
- **Backward Compatible**: Default `centered: false` maintains existing left-aligned behavior
62+
5263
### Icon System
5364

5465
Enhanced icon capabilities with Gravity UI integration:

memory-bank/usage/content.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,11 @@ The Content component is composed of several key parts:
444444

445445
1. **Title**: Displays the content title using the Title component
446446
2. **Text**: Displays the main text content using the YFMWrapper component
447-
3. **Content List**: Displays a list of content items using the ContentList component
448-
4. **Additional Info**: Displays additional information using the YFMWrapper component
449-
5. **Links**: Displays links using the Links component
450-
6. **Buttons**: Displays buttons using the Buttons component
447+
3. **Labels**: Displays labels using the ContentLabels component
448+
4. **Content List**: Displays a list of content items using the ContentList component
449+
5. **Additional Info**: Displays additional information using the YFMWrapper component
450+
6. **Links**: Displays links using the Links component
451+
7. **Buttons**: Displays buttons using the Buttons component
451452

452453
### Internal Structure
453454

@@ -469,6 +470,11 @@ The Content component is composed of several key parts:
469470
/>
470471
</div>
471472
)}
473+
{labels?.length ? (
474+
<div className={b('labels')}>
475+
<ContentLabels labels={labels} theme={theme} />
476+
</div>
477+
) : null}
472478
{list?.length ? (
473479
<div className={b('list')}>
474480
<ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gravity-ui/page-constructor",
3-
"version": "7.21.0",
3+
"version": "7.24.0",
44
"description": "Gravity UI Page Constructor",
55
"license": "MIT",
66
"type": "commonjs",

src/blocks/CardLayout/CardLayout.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ $largeBorderRadius: 32px;
1919
}
2020
}
2121

22+
&__title {
23+
&_centered {
24+
display: flex;
25+
flex-direction: column;
26+
align-items: center;
27+
text-align: center;
28+
}
29+
}
30+
2231
&__image {
2332
position: absolute;
2433
top: 0;

src/blocks/CardLayout/CardLayout.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import isEmpty from 'lodash/isEmpty';
44

55
import {AnimateBlock, BackgroundImage, Title} from '../../components';
66
import {useTheme} from '../../context/theme';
7-
import {Col, GridColumnSizesType, Row} from '../../grid';
7+
import {Col, GridColumnSizesType, GridJustifyContent, Row} from '../../grid';
88
import {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';
99
import {block, getThemedValue} from '../../utils';
1010

@@ -15,6 +15,7 @@ const DEFAULT_SIZES: GridColumnSizesType = {
1515
sm: 6,
1616
md: 4,
1717
};
18+
1819
export type CardLayoutBlockProps = React.PropsWithChildren<
1920
Omit<CardLayoutBlockParams, 'children'>
2021
> &
@@ -31,13 +32,21 @@ const CardLayout = ({
3132
className,
3233
titleClassName,
3334
background,
35+
centered = false,
3436
}: CardLayoutBlockProps) => {
3537
const theme = useTheme();
3638
const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);
3739
return (
3840
<AnimateBlock className={b(null, className)} animate={animated}>
3941
{(title || description) && (
40-
<Title title={title} subtitle={description} className={titleClassName} />
42+
<Title
43+
title={title}
44+
subtitle={description}
45+
className={b('title', {centered}, titleClassName)}
46+
colJustifyContent={
47+
centered ? GridJustifyContent.Center : GridJustifyContent.Start
48+
}
49+
/>
4150
)}
4251
<div
4352
className={b('content', {

src/blocks/CardLayout/__stories__/data.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
"content": {
111111
"type": "card-layout-block",
112112
"title": "Card layout with basic cards",
113-
"description": "Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone."
113+
"description": "Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone.",
114+
"centered": false
114115
}
115116
},
116117
"colSizes": {
@@ -172,6 +173,7 @@
172173
"type": "card-layout-block",
173174
"title": "Card layout with background image (basic cards)",
174175
"description": "Four cards in a row on the desktop, three cards in a row on the mini-desktop, two cards in a row on a tablet, one card in a row on a mobile phone.",
176+
"centered": false,
175177
"colSizes": {
176178
"all": 12,
177179
"sm": 6,
Loading

0 commit comments

Comments
 (0)