Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Updated redwood theme's default density to 'comfortable' (#366)
Browse files Browse the repository at this point in the history
* Updated default density of redwood to comfortable

* Updated changelogs

* Swapped condition order
  • Loading branch information
artpark authored Jan 24, 2024
1 parent aef9e83 commit 2327a39
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/terra-application/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Added
* Added the default density of the redwood theme to be 'comfortable'.

## 1.57.0 - (January 17, 2024)

* Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,17 @@ const ApplicationBase = ({

const { localeOverride, themeOverride } = useTestOverrides(); // Allows us to test deployed applications in different locales.

let density = themeDensity || themeConfig?.density;
if (themeName === 'redwood-theme' && !density) {
density = 'comfortable';
}

const theme = useMemo(() => ({
// If the theme class name is undefined or an empty string, that indicates we have the root theme and should apply the root theme name.
name: themeOverride || themeName || rootThemeName,
className: themeOverride || themeName,
density: themeDensity || themeConfig?.density,
}), [themeOverride, themeName, themeDensity]);
density,
}), [themeOverride, themeName, density]);

return (
<div data-terra-application-base className={cx('application-base', { fill: !fitToParentIsDisabled })}>
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-dev-site/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Added
* Added the default density of the redwood theme to be 'comfortable'.

## 7.12.0 - (January 17, 2024)

* Changed
Expand Down
1 change: 1 addition & 0 deletions packages/terra-dev-site/src/modals/_SettingsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const SettingsModal = () => {
});
}}
options={[{ value: 'compact', display: 'compact' }, { value: 'comfortable', display: 'comfortable' }, { value: 'spacious', display: 'spacious' }]}
defaultValue="comfortable"
/>
</Field>
{directions.length > 1 ? (
Expand Down
1 change: 1 addition & 0 deletions terra-theme.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const themeConfig = {
scoped: [
'clinical-lowlight-theme',
'orion-fusion-theme',
'redwood-theme',
],
};

Expand Down

0 comments on commit 2327a39

Please sign in to comment.