Skip to content

Commit

Permalink
Merge branch 'master' into e.muhamethanov/7733/calendar-hide-done-button
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/vkui/src/components/CalendarTime/CalendarTime.tsx
  • Loading branch information
EldarMuhamethanov committed Nov 5, 2024
2 parents 49d7f6d + f198947 commit c1056a4
Show file tree
Hide file tree
Showing 134 changed files with 2,265 additions and 1,483 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Example = () => {
<View activePanel="main">
<Panel id="main">
<PanelHeader>VKUI</PanelHeader>
<Group header={<Header mode="secondary">Items</Header>}>
<Group header={<Header size="s">Items</Header>}>
<SimpleCell>Hello</SimpleCell>
<SimpleCell>World</SimpleCell>
</Group>
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},
"dependencies": {
"@playwright/test": "1.48.2",
"@swc/core": "^1.7.40",
"@swc/core": "^1.8.0",
"@vkontakte/vkui": "workspace:packages/vkui",
"cli-table3": "^0.6.1",
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.4.5",
"finalhandler": "1.3.1",
"html-webpack-plugin": "^5.6.3",
"mini-css-extract-plugin": "^2.9.1",
"mini-css-extract-plugin": "^2.9.2",
"playwright": "1.48.2",
"postcss": "^8.4.47",
"postcss-modules": "^6.0.0",
Expand All @@ -27,6 +27,6 @@
"serve-static": "1.16.2",
"swc-loader": "^0.2.6",
"terser-webpack-plugin": "^5.3.10",
"webpack": "^5.95.0"
"webpack": "^5.96.1"
}
}
5 changes: 2 additions & 3 deletions docs/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@
> ⚠️ Обратите внимание
>
> Несмотря на то, что черновой список изменений создаётся и обновляется автоматически при слиянии `Pull Request`, бывают случае,
> когда нужно вручную добавить или отредактировать изменение. Тогда нужно учитывать, что ссылка на черновик меняется после каждого
> его сохранения. Поэтому если вносить изменения одновременно с кем-то, то последний сохранивший документ получит ошибку, что он уже
> неактуален. В этом случае, нужно будет открыть черновик по новой ссылке и снова внести свои изменения.
> когда нужно вручную добавить или отредактировать изменение. Тогда нужно учитывать, что кто-то параллельно тоже может начать
> редактировать черновик и тот, кто последний сохранит, затрёт изменение другого.
>
> Чтобы избежать таких неудобств, лучше всего сообщить коллегам в чате, что вы собираетесь вносить изменения, а после отписаться,
> что вы закончили работы.
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"@size-limit/file": "^11.1.6",
"@size-limit/webpack": "^11.1.6",
"@size-limit/webpack-css": "^11.1.6",
"@swc/cli": "^0.4.0",
"@swc/core": "1.7.40",
"@swc/jest": "^0.2.36",
"@swc/cli": "^0.5.0",
"@swc/core": "1.8.0",
"@swc/jest": "^0.2.37",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.14",
"@types/jest-axe": "^3.5.9",
"@types/node": "^22.8.1",
"@types/node": "^22.8.7",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/webpack": "^5.28.5",
Expand Down Expand Up @@ -64,10 +64,10 @@
"jest-environment-node": "^29.7.0",
"jest-preset-stylelint": "^7.1.0",
"lint-staged": "^15.2.10",
"mini-css-extract-plugin": "^2.9.1",
"mini-css-extract-plugin": "^2.9.2",
"postcss": "^8.4.47",
"postcss-cli": "^11.0.0",
"postcss-custom-media": "^11.0.4",
"postcss-custom-media": "^11.0.5",
"postcss-gap-properties": "^6.0.0",
"postcss-import": "^16.1.0",
"postcss-loader": "^8.1.1",
Expand All @@ -94,7 +94,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.6.3",
"typescript-plugin-css-modules": "^5.1.0",
"webpack": "^5.95.0",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
"webpack-merge": "^6.0.1",
"yargs": "^17.7.2"
Expand Down
8 changes: 4 additions & 4 deletions packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
"chalk": "^4.1.2",
"commander": "^12.1.0",
"cross-spawn": "^7.0.3",
"jscodeshift": "^17.0.0",
"jscodeshift": "^17.1.1",
"prompts": "^2.4.2",
"typescript": "^5.6.3"
},
"devDependencies": {
"@swc/core": "^1.7.40",
"@swc/jest": "^0.2.36",
"@swc/core": "^1.8.0",
"@swc/jest": "^0.2.37",
"@types/cross-spawn": "^6.0.6",
"@types/jest": "^29.5.14",
"@types/jscodeshift": "^0.12.0",
"@types/node": "^22.8.1",
"@types/node": "^22.8.7",
"@types/prompts": "^2.4.9",
"jest": "^29.7.0",
"ts-node": "^10.9.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Calendar } from '@vkontakte/vkui';
import React from 'react';

const App = () => {
const callback = () => {}
return (
<React.Fragment>
<Calendar
onChange={() => {}}
enableTime={true}
disablePast={true}
disableFuture={true}
onClose={() => {}}
/>

<Calendar
onChange={() => {}}
enableTime={true}
disablePast={true}
disableFuture={true}
onClose={callback}
/>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const App = () => {
<CellButton centered>
Создать что-нибудь
</CellButton>

{/* rename subhead -> overtitle */}
<CellButton centered subhead={"Subhead"}>
Создать что-нибудь
</CellButton>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ const App = () => {
>
Геолокация
</Cell>

{/* rename subhead -> overtitle */}
<Cell
subhead={"Subhead"}
onClick={() => {}}
indicator="При использовании"
>
Геолокация
</Cell>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ const App = () => {
return (
<React.Fragment>
{/* Проверка изменения size */}
<Header mode="primary" multiline size="large">
<Header multiline size="large">
Кто может писать мне личные сообщения
</Header>
<Header mode="secondary" multiline size="regular">
<Header multiline size="regular">
Кто может писать мне личные сообщения
</Header>

{/* Проверка замены aside на after */}
<Header
mode="primary"
subtitle="SOHN — Conrad"
subtitleComponent="h3"
aside={
Expand All @@ -32,11 +31,49 @@ const App = () => {
}
/>
<Header
mode="primary"
subtitle="SOHN — Conrad"
subtitleComponent="h3"
aside={aside}
/>

{/* Проверка удаления mode */}
{/* замена Large Primary на xl */}
<Header
mode="primary"
size="large"
subtitle="SOHN — Conrad"
/>

{/* замена Large tertiary на m */}
<Header
mode="tertiary"
size="large"
subtitle="SOHN — Conrad"
/>
{/* замена Regular tertiary на m */}
<Header
mode="tertiary"
size="regular"
subtitle="SOHN — Conrad"
/>
{/* замена Regular primary на m */}
<Header
mode="primary"
size="regular"
subtitle="SOHN — Conrad"
/>
{/* замена Large secondary на m */}
<Header
mode="secondary"
size="large"
subtitle="SOHN — Conrad"
/>
{/* замена Regular secondary на s */}
<Header
mode="secondary"
size="regular"
subtitle="SOHN — Conrad"
/>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ const App = () => {
>
Геолокация
</SimpleCell>


{/* rename subhead -> overtitle */}
<SimpleCell
onClick={() => {}}
subhead={"Subhead"}
indicator="При использовании"
>
Геолокация
</SimpleCell>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`calendar transforms correctly 1`] = `
"import { Calendar } from '@vkontakte/vkui';
import React from 'react';
const App = () => {
const callback = () => {}
return (
(<React.Fragment>
<Calendar
onChange={() => {}}
enableTime={true}
disablePast={true}
disableFuture={true}
onDoneButtonClick={() => {}}
/>
<Calendar
onChange={() => {}}
enableTime={true}
disablePast={true}
disableFuture={true}
onDoneButtonClick={callback}
/>
</React.Fragment>)
);
};"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const App = () => {
<CellButton centered>
Создать что-нибудь
</CellButton>
{/* rename subhead -> overtitle */}
<CellButton centered overTitle={"Subhead"}>
Создать что-нибудь
</CellButton>
</React.Fragment>)
);
};"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ const App = () => {
>
Геолокация
</Cell>
{/* rename subhead -> overtitle */}
<Cell
overTitle={"Subhead"}
onClick={() => {}}
indicator="При использовании"
>
Геолокация
</Cell>
</React.Fragment>)
);
};"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ const App = () => {
return (
(<React.Fragment>
{/* Проверка изменения size */}
<Header mode="primary" multiline size="l">
<Header multiline size="l">
Кто может писать мне личные сообщения
</Header>
<Header mode="secondary" multiline size="m">
<Header multiline size="m">
Кто может писать мне личные сообщения
</Header>
{/* Проверка замены aside на after */}
<Header
mode="primary"
subtitle="SOHN — Conrad"
subtitleComponent="h3"
after={
Expand All @@ -34,11 +33,23 @@ const App = () => {
}
/>
<Header
mode="primary"
subtitle="SOHN — Conrad"
subtitleComponent="h3"
after={aside}
/>
{/* Проверка удаления mode */}
{/* замена Large Primary на xl */}
<Header size="xl" subtitle="SOHN — Conrad" />
{/* замена Large tertiary на m */}
<Header size="m" subtitle="SOHN — Conrad" />
{/* замена Regular tertiary на m */}
<Header size="m" subtitle="SOHN — Conrad" />
{/* замена Regular primary на m */}
<Header size="m" subtitle="SOHN — Conrad" />
{/* замена Large secondary на m */}
<Header size="s" subtitle="SOHN — Conrad" />
{/* замена Regular secondary на s */}
<Header size="s" subtitle="SOHN — Conrad" />
</React.Fragment>)
);
};"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ const App = () => {
>
Геолокация
</SimpleCell>
{/* rename subhead -> overtitle */}
<SimpleCell
onClick={() => {}}
overTitle={"Subhead"}
indicator="При использовании"
>
Геолокация
</SimpleCell>
</React.Fragment>)
);
};"
Expand Down
12 changes: 12 additions & 0 deletions packages/codemods/src/transforms/v7/__tests__/calendar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jest.autoMockOff();

import { defineSnapshotTestFromFixture } from '../../../testHelpers/testHelper';

const name = 'calendar';
const fixtures = ['basic'] as const;

describe(name, () => {
fixtures.forEach((test) =>
defineSnapshotTestFromFixture(__dirname, name, global.TRANSFORM_OPTIONS, `${name}/${test}`),
);
});
Loading

0 comments on commit c1056a4

Please sign in to comment.