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

feat(Card): add mode plain #7824

Merged
merged 8 commits into from
Nov 5, 2024

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Oct 24, 2024


  • e2e-тесты
  • Дизайн-ревью
  • Release notes

Описание

Нужно добавить mode="plain" для компонента Card.

Release notes

Улучшения

  • Card: добавлен mode "plain"

# Conflicts:
#	packages/vkui/src/components/Card/Card.module.css
#	packages/vkui/src/components/Card/Card.tsx
#	packages/vkui/src/components/Card/__image_snapshots__/card-ios-webkit-dark-1-snap.png
#	packages/vkui/src/components/Card/__image_snapshots__/card-ios-webkit-light-1-snap.png
#	packages/vkui/src/components/Card/__image_snapshots__/card-vkcom-webkit-dark-1-snap.png
#	packages/vkui/src/components/Card/__image_snapshots__/card-vkcom-webkit-light-1-snap.png
@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner October 24, 2024 08:32
Copy link
Contributor

github-actions bot commented Oct 24, 2024

size-limit report 📦

Path Size
JS 382.63 KB (+0.01% 🔺)
JS (gzip) 122.43 KB (+0.02% 🔺)
JS (brotli) 101.41 KB (+0.05% 🔺)
JS import Div (tree shaking) 1.47 KB (0%)
CSS 342.22 KB (+0.01% 🔺)
CSS (gzip) 49.33 KB (+0.02% 🔺)
CSS (brotli) 39.98 KB (+0.08% 🔺)

Copy link

codesandbox-ci bot commented Oct 24, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Oct 24, 2024

👀 Docs deployed

Commit 660a5c0

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.36%. Comparing base (47187e8) to head (660a5c0).
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7824   +/-   ##
=======================================
  Coverage   95.36%   95.36%           
=======================================
  Files         376      376           
  Lines       11043    11044    +1     
  Branches     3664     3665    +1     
=======================================
+ Hits        10531    10532    +1     
  Misses        512      512           
Flag Coverage Δ
unittests 95.36% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vkcom-publisher vkcom-publisher added the pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности label Oct 31, 2024
@EldarMuhamethanov EldarMuhamethanov removed the pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности label Oct 31, 2024
inomdzhon
inomdzhon previously approved these changes Nov 1, 2024
@EldarMuhamethanov EldarMuhamethanov requested a review from a team November 1, 2024 07:04
@qurle
Copy link
Contributor

qurle commented Nov 1, 2024

Добавим в стайлгайд?

@EldarMuhamethanov
Copy link
Contributor Author

Добавим в стайлгайд?

Поскольку у карточки нет ни бордеров ни теней, то ее просто видно не будет на обычном фоне. Только разве под нее добавлять какой-то фон особенный, а если добавлять то какой?

@qurle
Copy link
Contributor

qurle commented Nov 1, 2024

Можно так
image

или как в дизайне через шахматы

image

@EldarMuhamethanov
Copy link
Contributor Author

@qurle Добавил пример в styleguide

@qurle
Copy link
Contributor

qurle commented Nov 2, 2024

Там очепятка в инлайновом стиле и шапка другая...
Давайте вот так, если вам оки

<View activePanel="card">
  <Panel id="card">
    <PanelHeader>Card</PanelHeader>
    <Group>
      <Group mode="plain" header={<Header size="s">Стандартный стиль</Header>}>
        <CardGrid size="l">
          <Card>
            <div style={{ height: 96 }} />
          </Card>
        </CardGrid>
      </Group>
      <Group mode="plain" header={<Header size="s">Стандартный фон с обводкой</Header>}>
        <CardGrid size="l">
          <Card mode="outline-tint">
            <div style={{ height: 96 }} />
          </Card>
        </CardGrid>
      </Group>
      
    </Group>
    <Group style={{ background: 'var(--vkui--color_background_secondary)' }}>
      <Group mode="plain" header={<Header  size="s">Светлый фон без обводки и тени</Header>}>
        <CardGrid size="l">
          <Card mode="plain">
            <div style={{ height: 96 }} />
          </Card>
        </CardGrid>
      </Group>
      <Group mode="plain" header={<Header size="s">Светлый фон с обводкой</Header>}>
        <CardGrid size="l">
          <Card mode="outline">
            <div style={{ height: 96 }} />
          </Card>
        </CardGrid>
      </Group>
      <Group mode="plain" header={<Header size="s">Светлый фон с тенью</Header>}>
        <CardGrid size="l">
          <Card mode="shadow">
            <div style={{ height: 96 }} />
          </Card>
        </CardGrid>
      </Group>
    </Group>
  </Panel>
</View>

qurle
qurle previously approved these changes Nov 2, 2024
Copy link
Contributor

@qurle qurle left a comment

Choose a reason for hiding this comment

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

У меня не обновилось по ссылке сверху, но в общем-то доверяю

@EldarMuhamethanov
Copy link
Contributor Author

У меня не обновилось по ссылке сверху, но в общем-то доверяю

Странно, что не обновилось по ссылке, но локально обновилось)

@EldarMuhamethanov EldarMuhamethanov merged commit 701d6b8 into master Nov 5, 2024
29 checks passed
@EldarMuhamethanov EldarMuhamethanov deleted the e.muhamethanov/7513/card-plain-mode branch November 5, 2024 13:46
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.

[Feature][Card]: plain режим отображения компонента
5 participants