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

feat: Added DLS v7 to v8 migration guide #381

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
76 changes: 76 additions & 0 deletions docs/MIGRATION_7_TO_8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Migrating from DLS7 to DLS8

## Breaking Changes

**None!** Technically, there are no breaking changes in this release. However,
out of an abundance of caution, we are shipping DLS8 as a new major release
since it contains lots of new components (and therefore, new dependencies)!

DLS8 should not increase your bundle size until you import / use the new
components. But if your bundle analyzer is telling you otherwise, please reach
out!

## New Features

* Added a new `ENCOURA` theme, which represents Encoura's primary look and feel
* Added new chart molecules, which are built using
[Recharts](https://recharts.org/):
* `AreaChart`
* `BarChart`
* `LineChart`
* `PieChart`
* `OverlappedBarChart`
* `ScatterPlot`
* `StackedBarChart`
* Added a new `DEFAULT_CHART_COLORS` constant, which contains fallback chart
colors that are used when a chart component is not provided with sufficient
color information (either through the theme or through props)
* Added new map molecules, which are built using
[Mapbox GL](https://docs.mapbox.com/mapbox-gl-js/guides):
* `Map`
* `CountyMap`
* `GeomarketMap`
* `HeatMap`
* `SCFMap`
* `StateMap`
* Bumped all dependencies to their latest releases, including MUI to `v5.15.14`
* Bumped the DLS's Node version to `v20`

## Customizing Charts & Maps

If you add a chart or map to your project and find that the default color scheme
is grey, this means that the colors have not been customized (yet)
on your theme.

In order to customize these colors, e.g. for the `BarChart` component, you can
augment your `theme.components` section as follows:

```json
{
...
components: {
...
DlsBarChart: {
defaultProps: {
colors: ['red', 'green', '#FF00FF', 'orange', '#00FF00'],
},
},
...
},
...
}
```

Now, any time `BarChart` is used within your theme, it will have the above
color scheme pre-configured by default.

Like any other Material UI component, you can override the theme defaults in
order to handle one-off scenarios:

```tsx
<BarChart
...
colors={['black', 'orange', 'pink']}
...
/>
```
10 changes: 0 additions & 10 deletions src/_docs/4.MIGRATION.mdx

This file was deleted.

10 changes: 10 additions & 0 deletions src/_docs/4.MIGRATION_6_TO_7.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{/* @prettier */}

import { Meta } from '@storybook/addon-docs';
import { Markdown } from '@storybook/blocks';

import MIGRATION_6_TO_7 from '~/../docs/MIGRATION_6_TO_7.md?raw';

<Meta title="DLS/Migration Guide (v.7)" />

<Markdown>{MIGRATION_6_TO_7}</Markdown>
10 changes: 10 additions & 0 deletions src/_docs/5.MIGRATION_7_TO_8.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{/* @prettier */}

import { Meta } from '@storybook/addon-docs';
import { Markdown } from '@storybook/blocks';

import MIGRATION_7_TO_8 from '~/../docs/MIGRATION_7_TO_8.md?raw';

<Meta title="DLS/Migration Guide (v.8)" />

<Markdown>{MIGRATION_7_TO_8}</Markdown>
Loading