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 dark mode in portaled floating liveblocks elements #4691

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

gbalint
Copy link
Contributor

@gbalint gbalint commented Jan 4, 2024

Problem:
Portaled floating liveblocks elements (e.g. emoji menu, "More" menu to edit/delete comment, etc) are always shown in light mode:
image

Fix:
The problem is that we only set the data-theme attribute on the Comment component, and these floating elements are portaled to the end of the documen. The solution is to add the data-theme attribute to the document body (and update when necessary).

image

Copy link
Contributor

github-actions bot commented Jan 4, 2024

Try me

Copy link

relativeci bot commented Jan 4, 2024

Job #9723: Bundle Size — 62.19MiB (~+0.01%).

53b6857(current) vs df0030c master#9721(baseline)

Warning

Bundle contains 66 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #9723
     Baseline
Job #9721
Regression  Initial JS 45.4MiB(~+0.01%) 45.4MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 19.86% 0%
No change  Chunks 26 26
No change  Assets 30 30
No change  Modules 4361 4361
No change  Duplicate Modules 470 470
No change  Duplicate Code 30.75% 30.75%
No change  Packages 462 462
No change  Duplicate Packages 65 65
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #9723
     Baseline
Job #9721
Regression  JS 62.18MiB (~+0.01%) 62.18MiB
Not changed  HTML 11.54KiB 11.54KiB

View job #9723 reportView fix/dark-mode-dropdown branch activity

Copy link
Contributor

github-actions bot commented Jan 4, 2024

Performance test results:
(Chart1)
(Chart2)

@gbalint gbalint merged commit 992aa1e into master Jan 5, 2024
12 checks passed
@gbalint gbalint deleted the fix/dark-mode-dropdown branch January 5, 2024 11:40
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.

3 participants