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

fix(ConfigProvider) Allow duplicated classes in the body created by ConfigProvider #5633

Conversation

mendrew
Copy link
Contributor

@mendrew mendrew commented Aug 16, 2023

resolves: #5518

Для того чтобы независимые приложения не удаляли класс главного приложений из body при размонтировании мы позволяем каждому приложению на странице добавить свой класс в body с помощью ConfigProvider, даже если такой класс уже есть.
Работа с классами body ведётся с помощь className а не classList (который не допускает дубликатов).

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 16, 2023

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 f47870a:

Sandbox Source
VKUI TypeScript Configuration

To make sure embedded apps do not remove body class name of the
main app which is required for tokens.
Each app will add it's own class and remove it whenever they need.
@mendrew mendrew force-pushed the mendrew/fix/5518/ConfigProvider/allow-to-duplicate-classname-in-body-class-attribute branch from e09338c to 8c27b61 Compare August 17, 2023 08:21
@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

size-limit report 📦

Path Size
JS 317.01 KB (+0.08% 🔺)
JS (gzip) 92.99 KB (+0.11% 🔺)
JS (brotli) 76.88 KB (+0.07% 🔺)
JS import Div (tree shaking) 2.97 KB (0%)
CSS 276.3 KB (0%)
CSS (gzip) 36.05 KB (0%)
CSS (brotli) 28.59 KB (0%)

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 95.00% and project coverage change: +0.01% 🎉

Comparison is base (df540cb) 81.76% compared to head (f47870a) 81.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5633      +/-   ##
==========================================
+ Coverage   81.76%   81.78%   +0.01%     
==========================================
  Files         290      290              
  Lines        9731     9746      +15     
  Branches     3108     3113       +5     
==========================================
+ Hits         7957     7971      +14     
- Misses       1774     1775       +1     
Flag Coverage Δ
unittests 81.78% <95.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
...i/src/components/ConfigProvider/ConfigProvider.tsx 81.57% <88.88%> (-0.78%) ⬇️
packages/vkui/src/lib/utils.ts 89.47% <100.00%> (+4.28%) ⬆️

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

👀 Docs deployed

Commit f47870a

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

e2e tests

Playwright Report

@mendrew mendrew marked this pull request as ready for review August 17, 2023 09:04
@mendrew mendrew requested a review from a team as a code owner August 17, 2023 09:04
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.

🔥

@mendrew mendrew requested a review from inomdzhon August 17, 2023 14:17
inomdzhon
inomdzhon previously approved these changes Aug 17, 2023
@mendrew mendrew dismissed stale reviews from SevereCloud and inomdzhon via 87a3e67 August 17, 2023 15:03
SevereCloud
SevereCloud previously approved these changes Aug 17, 2023
@mendrew mendrew merged commit 65c57da into master Aug 18, 2023
22 checks passed
@mendrew mendrew deleted the mendrew/fix/5518/ConfigProvider/allow-to-duplicate-classname-in-body-class-attribute branch August 18, 2023 07:12
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.

[Bug]: ConfigProvider удаляет класс на body при анмаунте
3 participants