Skip to content

Commit

Permalink
fix: logo display change (#5380)
Browse files Browse the repository at this point in the history
- revert change on tokens: the logo is the one of qlik-light theme
- fix: ThemeProvider useLayoutEffect instead of useEffect
- fix: remove animation from the button
- remove link to bootstrap in storybook to be able to use the current version from the code and not the released one.

While fixing thoses I have also seen the blue background of the headerbar
  • Loading branch information
jmfrancois authored Jul 23, 2024
1 parent df93acc commit fcba736
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 94 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-grapes-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/bootstrap-theme': patch
---

fix: remove animation on all button for all change
5 changes: 5 additions & 0 deletions .changeset/modern-waves-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-tokens': patch
---

fix: revert logo change
5 changes: 5 additions & 0 deletions .changeset/silly-hats-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-system': patch
---

fix: useLayoutEffect to set the data-theme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, useContext, useEffect, useState } from 'react';
import { PropsWithChildren, useContext, useLayoutEffect, useState } from 'react';

import 'modern-css-reset/dist/reset.min.css';
import 'typeface-inconsolata/index.css';
Expand All @@ -25,15 +25,15 @@ export const ThemeProvider = ({
// Handle nested Providers: parent Provider doesn't have context, child does
const context = useContext(ThemeContext);

useEffect(() => {
useLayoutEffect(() => {
document.body.dataset.theme = selectedTheme;
}, [selectedTheme]);

useEffect(() => {
useLayoutEffect(() => {
setSelectedTheme(theme);
}, [theme]);

useEffect(() => {
useLayoutEffect(() => {
if (tokensOverride) {
Object.keys(tokensOverride).forEach(key => {
document.body.style.setProperty(key, tokensOverride[key].toString());
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/src/_tokens.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/design-tokens/src/light/_index.scss

Large diffs are not rendered by default.

Loading

0 comments on commit fcba736

Please sign in to comment.