Conversation
|
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. Latest deployment of this branch, based on commit 2d5f635:
|
stoope
reviewed
Aug 24, 2022
58f3a67 to
991a2b8
Compare
Contributor
size-limit report 📦
|
Contributor
👀 Styleguide deployedSee the styleguide for this PR at https://vkcom.github.io/VKUI/pull/3062/ |
Contributor
Changed screenshotsCode coverage
|
stoope
reviewed
Aug 25, 2022
stoope
reviewed
Aug 25, 2022
stoope
reviewed
Aug 25, 2022
stoope
suggested changes
Aug 25, 2022
e97966c to
38fac0d
Compare
Contributor
|
Скриншоты actionsheet сломались |
c37963f to
88705e3
Compare
Additional: - create `useMediaQueries()` - create `MEDIA_QUERIES` const - create utilities for detect adaptivity params
- Fix e2e of `ActionSheet`
88705e3 to
3ef6a94
Compare
stoope
approved these changes
Aug 26, 2022
3ef6a94 to
2d5f635
Compare
inomdzhon
added a commit
that referenced
this pull request
Jul 10, 2024
Т.к. `/src/shared/breakpoints.js` нужен только для `/scripts/generateCSSCustomMedias.js` внёс следующие изменения: 1. `/src/shared/breakpoints.js` -> `/src/lib/adaptivity/breakpoints.ts`; 2. `/scripts/generateCSSCustomMedias.js` -> `/scripts/generateCSSCustomMedias.mjs`; 3. перенёс `getCustomMedias()` из `shared.config.js` в `/scripts/generateCSSCustomMedias.mjs`; 4. `/src/lib/adaptivity/breakpoints.ts` в `/scripts/generateCSSCustomMedias.mjs` мы импортируем через `fs.readFileSync()` и последующий [ts.transpileModule()](https://github.com/Microsoft/TypeScript-wiki/blob/main/Using-the-Compiler-API.md#a-simple-transform-function). Выполняем код через [import()](https://2ality.com/2019/10/eval-via-import.html#evaluating-simple-code-via-import()). 5. в `/src/lib/adaptivity/types.ts` создал тип `CSSCustomMedias` и применяю его через JSDoc в `getCustomMedias()` – теперь `yarn workspace @vkontakte/vkui run lint:generated-files` будет падать с ошибкой если поменяли брейкпоинты, а в `getCustomMedias()` поправить забыли; 6. в `/styleguide/Components/Preview` заменил импорт `@vkui/shared/breakpoints` на `@vkui/lib/adaptivity`; 7. поправил `docs/ADAPTIVITY_GUIDE.md` --- - related to #7085 - caused by #3062
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




















































































































































































Создал хук
useAdaptivityWithMediaQueries(), который слушает изменения вьюпорта, в отличии отuseAdaptivity().подробности см. в #3031
Дополнительно
adaptivity.ts.DESKTOP_SIZE,TABLET_SIZEи т.п.) вenum Breakpoints.Чеклист
Нюанс
Alert,ActionSheet,ActionSheetItem,ModalDisimissButtonсравнивал сmaster