Skip to content

Commit 6511e6a

Browse files
committed
style(FR-1736): responsive ui is needed for branding theme colors. (#4769)
Resolves #4727 ([FR-1736](https://lablup.atlassian.net/browse/FR-1736)) # Improve responsive design of ThemeColorPicker component This PR enhances the responsive layout of the ThemeColorPicker component by: - Adding responsive column sizing that adapts to different screen sizes - Adding wrap capability to the color picker flex containers - Setting minimum width for color pickers to prevent them from becoming too small - Adjusting gutter spacing to provide better vertical spacing on smaller screens These changes ensure the theme color picker displays properly across different device sizes, particularly on mobile and tablet screens. ![image.png](https://app.graphite.com/user-attachments/assets/da5e90c2-332b-47fe-8e0b-a33b1d05bd1d.png) ![image.png](https://app.graphite.com/user-attachments/assets/2e3acb71-c4f1-4c9d-b664-988ac0b10a0e.png) ![image.png](https://app.graphite.com/user-attachments/assets/3538b631-1dc0-4443-97a4-7c06004b4c72.png) **Checklist:** - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after [FR-1736]: https://lablup.atlassian.net/browse/FR-1736?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 50a7d6f commit 6511e6a

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

react/src/components/BrandingSettingItems/ThemeColorPicker.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ const ThemeColorPicker: React.FC<ThemeColorPickerSettingItemProps> = ({
4545
direction="column"
4646
style={{ alignSelf: 'stretch' }}
4747
>
48-
<Row gutter={16}>
49-
<Col span={6}>
50-
<BAIFlex gap="sm" style={{ color: token.colorTextTertiary }}>
48+
<Row gutter={[16, 4]}>
49+
<Col xl={6} lg={24}>
50+
<BAIFlex
51+
gap="sm"
52+
style={{ color: token.colorTextTertiary }}
53+
wrap="wrap"
54+
>
5155
{t('userSettings.LightMode')}:
5256
<ColorPicker
5357
format="hex"
@@ -62,11 +66,16 @@ const ThemeColorPicker: React.FC<ThemeColorPickerSettingItemProps> = ({
6266
_.set(newCustomThemeConfig, `light.${tokenName}`, newColor);
6367
setUserCustomThemeConfig(newCustomThemeConfig);
6468
}}
69+
style={{ minWidth: 110 }}
6570
/>
6671
</BAIFlex>
6772
</Col>
68-
<Col span={6}>
69-
<BAIFlex gap="sm" style={{ color: token.colorTextTertiary }}>
73+
<Col xl={6} lg={24}>
74+
<BAIFlex
75+
gap="sm"
76+
style={{ color: token.colorTextTertiary }}
77+
wrap="wrap"
78+
>
7079
{t('userSettings.DarkMode')}:
7180
<ColorPicker
7281
format="hex"
@@ -81,6 +90,7 @@ const ThemeColorPicker: React.FC<ThemeColorPickerSettingItemProps> = ({
8190
_.set(newCustomThemeConfig, `dark.${tokenName}`, newColor);
8291
setUserCustomThemeConfig(newCustomThemeConfig);
8392
}}
93+
style={{ minWidth: 110 }}
8494
/>
8595
</BAIFlex>
8696
</Col>

0 commit comments

Comments
 (0)