-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавляем новое свойство `mode` для `Panel`, по аналогии с [Group](https://github.com/VKCOM/VKUI/blob/f7f6dea253a241610b1036bb4f9fb9655d8b0e10/packages/vkui/src/components/Group/Group.tsx#L69-L75). Подразумевается использование вместе с Group, чтобы точечно задавать стиль card для Group с верным фоном, а не только для всего макета, как можно делать сейчас со свойством [layout](https://github.com/VKCOM/VKUI/blob/f7f6dea253a241610b1036bb4f9fb9655d8b0e10/packages/vkui/src/components/AppRoot/AppRoot.tsx#L49-L53) из `AppRoot`. Изменения - убрали прозрачность фона у Panel в режиме адаптивности `regular`. Не очень понятна причина по которой это раньше было добавлено. Судя по 71e1293, это связано со многоколоночным режимом, но что именно пытались решить не понятно, точнее не понятно актуально ли это сейчас или нет. Пока же, судя по коду, с прозрачностью фон становится идентичным тому, который задаёт `AppRoot` по стилям из common.css. https://github.com/VKCOM/VKUI/blob/f7f6dea253a241610b1036bb4f9fb9655d8b0e10/packages/vkui/src/styles/common.css#L28-L36 То есть замена прозрачности на явные токены, которые идентичны AppRoot, визуально для приложений ничего не меняет, но у прощает css.
- Loading branch information
Showing
28 changed files
with
151 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
import * as React from 'react'; | ||
import { test } from '@vkui-e2e/test'; | ||
import { PanelPlayground } from './Panel.e2e-playground'; | ||
import { PanelModePlayground, PanelPlayground } from './Panel.e2e-playground'; | ||
|
||
test.use({ | ||
adaptivityProviderProps: { | ||
sizeX: 'regular', | ||
}, | ||
test.describe('Panel', () => { | ||
test.use({ | ||
adaptivityProviderProps: { | ||
sizeX: 'regular', | ||
}, | ||
}); | ||
test('default', async ({ mount, expectScreenshotClippedToContent, componentPlaygroundProps }) => { | ||
await mount(<PanelPlayground {...componentPlaygroundProps} />); | ||
await expectScreenshotClippedToContent(); | ||
}); | ||
}); | ||
|
||
test('Panel', async ({ mount, expectScreenshotClippedToContent, componentPlaygroundProps }) => { | ||
await mount(<PanelPlayground {...componentPlaygroundProps} />); | ||
await expectScreenshotClippedToContent(); | ||
test.describe('Panel', () => { | ||
test.use({ | ||
onlyForBrowsers: ['webkit'], | ||
onlyForPlatforms: ['ios'], | ||
}); | ||
|
||
test('mode', async ({ mount, expectScreenshotClippedToContent, componentPlaygroundProps }) => { | ||
await mount(<PanelModePlayground {...componentPlaygroundProps} />); | ||
await expectScreenshotClippedToContent(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...src/components/Panel/__image_snapshots__/panel-android-chromium-dark-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...rc/components/Panel/__image_snapshots__/panel-android-chromium-light-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...onents/Panel/__image_snapshots__/panel-default-android-chromium-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...nents/Panel/__image_snapshots__/panel-default-android-chromium-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...c/components/Panel/__image_snapshots__/panel-default-ios-webkit-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
.../components/Panel/__image_snapshots__/panel-default-ios-webkit-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...mponents/Panel/__image_snapshots__/panel-default-vkcom-chromium-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ponents/Panel/__image_snapshots__/panel-default-vkcom-chromium-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...omponents/Panel/__image_snapshots__/panel-default-vkcom-firefox-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...mponents/Panel/__image_snapshots__/panel-default-vkcom-firefox-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...components/Panel/__image_snapshots__/panel-default-vkcom-webkit-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...omponents/Panel/__image_snapshots__/panel-default-vkcom-webkit-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions
3
.../vkui/src/components/Panel/__image_snapshots__/panel-ios-webkit-dark-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...vkui/src/components/Panel/__image_snapshots__/panel-ios-webkit-light-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
.../src/components/Panel/__image_snapshots__/panel-mode-ios-webkit-dark-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...src/components/Panel/__image_snapshots__/panel-mode-ios-webkit-light-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions
3
...i/src/components/Panel/__image_snapshots__/panel-vkcom-chromium-dark-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
.../src/components/Panel/__image_snapshots__/panel-vkcom-chromium-light-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ui/src/components/Panel/__image_snapshots__/panel-vkcom-firefox-dark-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...i/src/components/Panel/__image_snapshots__/panel-vkcom-firefox-light-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...kui/src/components/Panel/__image_snapshots__/panel-vkcom-webkit-dark-1-snap.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ui/src/components/Panel/__image_snapshots__/panel-vkcom-webkit-light-1-snap.png
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters