Skip to content

menubar: стилизация, сторисы#160

Open
khaliulin wants to merge 11 commits intostorybook-updatefrom
menu.Menubar
Open

menubar: стилизация, сторисы#160
khaliulin wants to merge 11 commits intostorybook-updatefrom
menu.Menubar

Conversation

@khaliulin
Copy link
Copy Markdown
Collaborator

No description provided.

@khaliulin khaliulin requested a review from Skosov March 20, 2026 11:53
Danil Khaliulin and others added 2 commits March 20, 2026 22:56
@Skosov
Copy link
Copy Markdown
Member

Skosov commented Mar 25, 2026

image Обрезается пример

@khaliulin
Copy link
Copy Markdown
Collaborator Author

@Skosov фикс высоты превью: 825acdd

Comment thread src/plugins/prime/theme3.0/css.ts Outdated
import buttonCss from './components/css/button';
import cardCss from './components/css/card';
import checkboxCss from './components/css/checkbox';
import listboxCss from './components/css/listbox';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

почему это тут удаляется?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov фикс dc58c16

Comment thread .storybook/preview-head.html Outdated
}

/* Specific height for MenuBar component previews in Docs */
.docs-story.css-kdwx3d:has(.p-menubar),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

плохая идея завязываться на такие селекторы

Copy link
Copy Markdown
Collaborator Author

@khaliulin khaliulin Apr 19, 2026

Choose a reason for hiding this comment

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

@Skosov убраны — больше нет привязки к emotion-классам. menubar: обёртка для слота, стабильные селекторы, дубль drawerCss 79490a9

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov убраны — привязки к emotion-классам нет. 816eb41

Comment thread .storybook/preview-head.html Outdated
/* Specific height for MenuBar component previews in Docs */
.docs-story.css-kdwx3d:has(.p-menubar),
.css-1cvjpgl:has(.p-menubar) {
min-height: 300px;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

прям на стоориз можно закинуть высоту

Copy link
Copy Markdown
Collaborator Author

@khaliulin khaliulin Apr 19, 2026

Choose a reason for hiding this comment

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

@Skosov перенесено в parameters.docs.story.height: '300px' в MenuBar.stories.js. menubar: обёртка для слота, стабильные селекторы, дубль drawerCss 79490a9

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov перенесено в parameters.docs.story.height: '300px' в MenuBar.stories.js. 816eb41

<Menubar :model="items" v-bind="args">
<template #item="{ item, props }">
<a v-bind="props.action" class="p-menubar-item-link">
<span v-if="item.icon" :class="['p-menubar-item-icon', item.icon]" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

это кастомный класс? Или прайм такой отдаёт?

Copy link
Copy Markdown
Collaborator Author

@khaliulin khaliulin Apr 19, 2026

Choose a reason for hiding this comment

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

@Skosov класс PrimeVue, стилизован в menubar.ts. Теперь скрыт внутри MenubarItem.vue. menubar: обёртка для слота, стабильные селекторы, дубль drawerCss 79490a9

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov класс PrimeVue. Теперь скрыт внутри MenubarItem.vue. 816eb41

template: `
<Menubar :model="items" v-bind="args">
<template #item="{ item, props }">
<a v-bind="props.action" class="p-menubar-item-link">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

наверное не очень правильно в сторике именно такие классы заставлять писать, нужна обертка

Copy link
Copy Markdown
Collaborator Author

@khaliulin khaliulin Apr 19, 2026

Choose a reason for hiding this comment

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

@Skosov создан MenubarItem.vue — внутренние классы PrimeVue убраны из шаблона сторис. menubar: обёртка для слота, стабильные селекторы, дубль drawerCss 79490a9

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov шаблон использует <MenubarItem :item="item" :action-props="props.action" /> — внутренние классы PrimeVue убраны из сторис. 816eb41

Comment thread src/plugins/prime/theme3.0/css.ts Outdated
import cardCss from './components/css/card';
import checkboxCss from './components/css/checkbox';
import listboxCss from './components/css/listbox';
import menubarCss from './components/css/menubar';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

это откуда? Мы очистили css.ts файл

Copy link
Copy Markdown
Collaborator Author

@khaliulin khaliulin Apr 19, 2026

Choose a reason for hiding this comment

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

@Skosov добавлен в этом PR для подключения стилей menubar. Также убран дублирующий drawerCss (строка 46). menubar: обёртка для слота, стабильные селекторы, дубль drawerCss 79490a9

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Skosov в текущем PR импортов в css.ts нет — menubar.ts подключается автоматически через import.meta.glob в CdekPreset.ts

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.

2 participants