Skip to content

Conversation

@yuberdysheva
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@yuberdysheva yuberdysheva requested a review from niktverd January 10, 2023 08:54
CHANGELOG.md Outdated
## 0.18.4

- Fixed the `BlockHeader` margins.
- Fixed the `HeaderComponent` margins.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not necessary to fix old changelog records

import {CardLayoutBlockProps as CardLayoutBlockParams} from '../../models';
import {Row, Col} from '../../grid';
import {BlockHeader, AnimateBlock} from '../../components';
import {HeaderComponent, AnimateBlock} from '../../components';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this renaming? BlockHeader tells more about it's purpose than HeaderComponent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it is confusing that we have HeaderBlock and BlockHeader. I thought that HeaderBlock and HeaderComponent more understandable. How BlockHeader tells about purpose?

Copy link
Contributor

@gorgeousvlad gorgeousvlad Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BlockHeader tells that it is using for heading in blocks, HeaderComponent not, but raises questions - why do we have both component and block headers?
And HeaderComponent has extra info in its name - we import it form components dir and it is clear that it is a component. And in this case should we add Component prefix to any component?

For me to make things clear with this renaming we could exclude 'header' and use BlockTitle or something like that.

Anyway, we can leave this renaming for major update - it doesn't worth major with itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like BlockTitle, let's leave this for major update. Thanks

transformer: typografTransformer,
parser: parseSlider,
},
[BlockType.PromoFeaturesBlock]: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const blockHeaderTransfomer =  [
       {
            fields: ['title'],
            transformer: typografTransformer,
            parser: parseTitle,
        },
        {
            fields: ['description'],
            transformer: yfmTransformer,
        }
];

@yuberdysheva yuberdysheva force-pushed the yuberdysheva/fix-block-header branch from 52d0193 to 04639b9 Compare January 11, 2023 11:53
@yuberdysheva yuberdysheva merged commit f77fc5e into main Jan 11, 2023
@yuberdysheva yuberdysheva deleted the yuberdysheva/fix-block-header branch January 11, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants