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

tech: add vkui-nextjs-ts example #8404

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

EldarMuhamethanov
Copy link
Contributor

  • Release notes

Описание

Необходимо добавить шаблон для приложения с использованием Next js + VKUI + TypeScript, чтобы пользователям было удобнее начинать использовать VKUI

Изменения

  • Добавил шаблон для приложения Next js + VKUI + TypeScript с небольшой версткой и возможностью изменения цветовой схемы приложения
  • Добавил Readme с документацией по шаблону

Проект можно глянуть через CodeSandbox

Release notes

Документация

  • Добавлен шаблон приложения на Next js + VKUI + TypeScript

Copy link

codesandbox-ci bot commented Mar 27, 2025

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 Mar 27, 2025

size-limit report 📦

Path Size
JS 403.17 KB (0%)
JS (gzip) 119.85 KB (0%)
JS (brotli) 98.5 KB (0%)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.95 KB (0%)
CSS (gzip) 43.23 KB (0%)
CSS (brotli) 34.49 KB (0%)

Copy link
Contributor

github-actions bot commented Mar 27, 2025

👀 Docs deployed

Commit d12705e

Copy link
Contributor

github-actions bot commented Mar 27, 2025

e2e tests

⚠️ Some screenshots were failed. See Playwright Report.

Playwright Report

@EldarMuhamethanov EldarMuhamethanov moved this to 👀 In Review in VKUI Mar 27, 2025
Copy link
Contributor

@inomdzhon inomdzhon left a comment

Choose a reason for hiding this comment

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

Комменты см. #8402 (review)

inomdzhon
inomdzhon previously approved these changes Mar 31, 2025
Copy link
Contributor

@inomdzhon inomdzhon left a comment

Choose a reason for hiding this comment

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

интересно, почему в папке vkui-nextjs-ts corepack добавляет packageManager при yarn install, а в vkui-vite-ts не выставляет 🤔

@vkcom-publisher vkcom-publisher added the pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности label Apr 9, 2025
@BlackySoul BlackySoul added no-stale Добавляет PR в исключения для автоматического закрытия and removed pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности labels Apr 9, 2025
<html lang="ru" suppressHydrationWarning>
<head>
<title>NextJS + VKUI + TS</title>
<meta
Copy link
Contributor

Choose a reason for hiding this comment

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

nextjs форсит задавать метатэги через объект, иначе дубли будут, в данном случае вот это лучше заюзать?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Заюзал

<Flex direction="column" justify="center" className={styles.layout}>
<FixedLayout vertical="top">
<Flex justify="end" className={styles.header}>
<Flex.Item>{colorSchemeSwitcher}</Flex.Item>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Flex.Item>{colorSchemeSwitcher}</Flex.Item>
{colorSchemeSwitcher}

};

export const useColorSchemeSwitcher = (): [ColorSchemeType, React.ReactNode] => {
const defaultColorScheme = useColorScheme();
Copy link
Contributor

Choose a reason for hiding this comment

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

А зачем этот хук тут юзать? Сейчас в шаблоне получается сломано автоопределение темы (потому что мы всегда будем форсить светлую)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Да, ошибся здесь. Поправил - добавил отдельную обертку с ColorSchemeProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-stale Добавляет PR в исключения для автоматического закрытия technical task
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

4 participants