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

fix(Header, SimpleCell): fix icons position with multiline #8144

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 11 additions & 3 deletions packages/vkui/src/components/Header/Header.e2e-playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const HeaderPlayground = (props: ComponentPlaygroundProps) => {
size: ['m'],
children: ['Кто может оставлять записи на моей странице'],
afterTitle: [<Icon16UnlockOutline key="afterTitle" />],
multiline: [undefined, true],
},
{
size: ['m'],
Expand All @@ -79,7 +78,6 @@ export const HeaderPlayground = (props: ComponentPlaygroundProps) => {
children: ['Кто может оставлять записи на моей странице'],
subtitle: ['SOHN — Conrad'],
afterSubtitle: [<Icon12Fire key="afterSubtitle" />],
multiline: [undefined, true],
},
{
size: ['s', 'm', 'l', 'xl'],
Expand All @@ -90,7 +88,17 @@ export const HeaderPlayground = (props: ComponentPlaygroundProps) => {
beforeSubtitle: [<Icon12Tag key="beforeSubtitle" />],
afterSubtitle: [<Icon12Fire key="afterSubtitle" />],
subtitle: ['SOHN — Conrad'],
multiline: [undefined, true],
},
{
children: [
'Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children',
],
subtitle: [
'Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle',
],
afterSubtitle: [<Icon12Fire key="afterSubtitle" />],
afterTitle: [<Icon16UnlockOutline key="afterTitle" />],
multiline: [false, true],
},
]}
>
Expand Down
1 change: 0 additions & 1 deletion packages/vkui/src/components/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
.contentMultiline {
white-space: initial;
word-break: break-word;
flex-grow: 1;
}

.subtitle {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,19 @@ export const SimpleCellPlayground = (props: ComponentPlaygroundProps) => {
],
badgeBeforeTitle: [<Icon20AddCircleFillBlue key="leftBadge" />],
badgeAfterTitle: [<Icon12Verified key="rightBadge" />],
multiline: [true, false],
},
{
children: [
'Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children Very long children',
],
subtitle: [
'Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long children Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle Very long subtitle',
],
badgeAfterTitle: [<Icon12Verified key="rightBadge" />],
badgeAfterSubtitle: [
<Icon12Fire key="iconFire" fill="var(--vkui--color_icon_negative)" />,
],
multiline: [false, true],
},
{
children: ['Title'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@
display: flex;
align-content: flex-start;
align-items: center;
justify-content: space-between;
max-inline-size: 100%;
}

.host:not(.mult) .content {
justify-content: flex-start;
}

Expand All @@ -95,7 +91,7 @@

.mult .children,
.mult .subtitle {
flex: 1 1 auto;
flex: 0 1 auto;
}

.badge {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading