Skip to content

Commit

Permalink
docs: Release blog 25.10 (#4231)
Browse files Browse the repository at this point in the history
* docs: Release blog 25.10

* breaking changes

* update post

* add thanks message

* update

* save

* updated blog post

* update
  • Loading branch information
sarahgm authored Oct 25, 2024
1 parent 6687af7 commit e01e21d
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 88 deletions.
12 changes: 11 additions & 1 deletion docs/app/releases/blog/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import { Inline } from '@/ui';
import { PropsWithChildren } from 'react';
import { Logo } from '@/ui/Logo';
import { DefaultLayout } from '@/ui/layout/DefaultLayout';

// Layout
// ---------------
const Layout = ({ children }: PropsWithChildren) => (
<DefaultLayout>{children}</DefaultLayout>
<DefaultLayout>
{children}
<p className="prose mt-5">
<Inline alignY="center" space={2}>
<span>Yours, DST</span>
<Logo className="inline-block size-4" />
</Inline>
</p>
</DefaultLayout>
);

export default Layout;
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
import {
Button,
Dialog,
Headline,
Inline,
Stack,
Text,
} from '@marigold/components';
import { Button, Dialog, Headline, Inline } from '@marigold/components';
import { Exclamation } from '@marigold/icons';

export default () => (
<Dialog>
<Stack space={2}>
<Dialog.Title>
<Inline alignY="center" space={2}>
<Exclamation color="text-warning" />
<Headline level={3}>This page has unsaved changes</Headline>
</Inline>
<Text>
If you leave this page now, your changes will be lost. Would you like to
save your changes first?
</Text>
<Inline alignX="right">
<Button variant="text">Leave without saving</Button>
<Button variant="primary">Save and leave page</Button>
</Inline>
</Stack>
</Dialog.Title>
<Dialog.Content>
If you leave this page now, your changes will be lost. Would you like to
save your changes first?
</Dialog.Content>
<Dialog.Actions>
<Button variant="text">Leave without saving</Button>
<Button variant="primary">Save and leave page</Button>
</Dialog.Actions>
</Dialog>
);
66 changes: 0 additions & 66 deletions docs/content/releases/blog/release-2024-09-26.mdx

This file was deleted.

166 changes: 166 additions & 0 deletions docs/content/releases/blog/release-2024-10-25.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
---
title: Marigold v10.0.0
date: 2024-10-25
type: Blog
changed:
- components/overlay/dialog
- component/form/select
- component/form/combobox
- component/form/autocomplete
- component/content/sectionmessage
- component/form/datepicker
---

Hi Marigold users! Following our recent heads-up about Marigold Version 10.0, we're excited to share the details of this major release. With this update, we're introducing some breaking changes alongside new features and improvements.

Previously, we informed you that this release is crucial for enhancing flexibility and accessibility within Marigold. Now, let's dive deeper into what you can expect.

## Breaking Change

### Dialog

We've restructured the `<Dialog>` component for greater customization and usability. These updates allow the dialog to be more customizable and compatible with existing styles from the core system. It simplifies the component structure, making it easier for you to implement.

- Renamed: `<Dialog.Headline>` is now `<Dialog.Title>`.
- New Subcomponents: Introduced `<Dialog.Content>` and `<Dialog.Actions>` for better organization and flexibility.
- Grid Layout: The internal dialog layout now uses grid areas to ensure consistent ordering and alignment.

#### What you have to do:

Update existing `<Dialog>` component implementations to adopt the new structure.

**Before v10:**

```tsx
<Dialog>
<Stack space={2}>
<Inline alignY="center" space={2}>
<Exclamation color="text-warning" />
<Headline level={3}>This page has unsaved changes</Headline>
</Inline>
<Text>
If you leave this page now, your changes will be lost. Would you like to
save your changes first?
</Text>
<Inline alignX="right">
<Button variant="text">Leave without saving</Button>
<Button variant="primary">Save and leave page</Button>
</Inline>
</Stack>
</Dialog>
```

**With v10:**

```tsx
<Dialog>
<Dialog.Title>
<Inline alignY="center" space={2}>
<Exclamation color="text-warning" />
<Headline level={3}>This page has unsaved changes</Headline>
</Inline>
</Dialog.Title>
<Dialog.Content>
If you leave this page now, your changes will be lost. Would you like to
save your changes first?
</Dialog.Content>
<Dialog.Actions>
<Button variant="text">Leave without saving</Button>
<Button variant="primary">Save and leave page</Button>
</Dialog.Actions>
</Dialog>
```

### Select

We've streamlined the usage of the `Section` component, removing the need for a generic reusable `<Header>` and simplifying it into a prop for better clarity and ease of use. No need for the extra Header anymore. Instead you can do `<Select.Section header="My header">`.

Hint `<Autocomplete>` and `<ComboBox>` share the same API!

**Before v10:**

```tsx
<Select>
<Select.Section>
<Header>Fantasy</Header>
<Select.Option id="harry-potter">Harry Potter</Select.Option>
<Select.Option id="lord-of-the-rings">Lord of the Rings</Select.Option>
</Select.Section>
<Select.Section>
<Header>Sci-Fi</Header>
<Select.Option id="star-wars">Start Wars</Select.Option>
<Select.Option id="star-trek">Star Trek</Select.Option>
</Select.Section>
</Select>
```

**With v10:**

```tsx
<Select>
<Select.Section header="Fantasy">
<Select.Option id="harry-potter">Harry Potter</Select.Option>
<Select.Option id="lord-of-the-rings">Lord of the Rings</Select.Option>
</Select.Section>
<Select.Section header="Sci-Fi">
<Select.Option id="star-wars">Start Wars</Select.Option>
<Select.Option id="star-trek">Star Trek</Select.Option>
</Select.Section>
</Select>
```

### Autocomplete and ComboBox

We wanted to align the naming between select, autocomplete and combobox. All selectable options are called options instead of items. Update all `<Autocomplete.Item>` and `<ComboBox.Item>` to `<Autocomplete.Option>` and `<ComboBox.Option>`.

### DatePicker

Renamed the `isDateUnavailable` prop to `dateUnavailable` to align with our code guidelines. Variables starting with "is" usually indicate a boolean value, which isn't true for this prop.

## Improvements

### Components

- **Autocomplete and Combobox**: Based on the feedback from DSTSUP-89 these components now support sections like the `<Select>` does. The API is the same for every component. Thanks Rahul!
- **Dialog**: The size can now be defined via the `size` prop, instead of being defined by the content of the dialog.
- **Checkbox Group:** The `<Checkbox.Group>` can now be used as a compound component, aligning it with the structure of other components.
- **DatePicker:** Based on the feedback from DSTSUP-94, added styles for unavailable dates to both b2b and core theme. Thanks Daniel!
- **SectionMessage**: Based on the feedback, added posibility to dimiss a `<SectionMessage>`. This is now aligned with our feedback message pattern. Thanks Laura for the suggestion!
- **XLoader**: The loader now supports to be displayed as a full-screen overlay or as inline loading indicator. Thanks Robert and Indre for the suggestions!

### Types

- **Selection**: We now expose `Selection` type for easy usage with `<Table>` and other components.

```tsx
const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set());

<Table onSelectionChange={setSelectedKeys}>{/* ... */}</Table>;
```

### Accessibility

- **Accessibility page:** Added a [dedicated page](/foundations/accessibility) about Accessibility in our documentation.
- **ARIA Role for Layout Components:** Layout components can now be marked as regions, improving accessibility by helping assistive technologies identify key sections of the page. Read more about this on our [accessibility page](/foundations/accessibility#dynamic-content).
- **Accessible ARIA Labelling:** `<Text>` and `<Headline>` components now support ARIA labeling props (aria-label, id, etc.) without causing type errors.

### Documentation

We've introduced several updates to enhance the usability and structure of our documentation:

- **Release Blog:** We now have a release blog, you are currently reading, to keep users informed about recent changes, new features, and important announcements, ensuring they are always up-to-date with the latest information.
- **New Landing Page:** As you may already saw, we provided a new landing page for our documentation. With this user-friendly landing page, we can effectively helps visitors orient themselves, understand the purpose of the design system, and the user can easily navigate to relevant sections.
- **Streamlined Structure:** We also cleaned up the documentation structure, we reduced old content, structured the navigation and tidy up related pages according the new structure.
- **Component Pages:** Of course we also provided more updated guidelines for component pages, like `<SectionMessag>` or `<MarigoldProvider>`.
- **Guidelines:** Added a new page about form fields with some general usage guidelines.
- **Patterns:** Added a new pattern for how to use loading states.

## Bug fixes

- **Focus Fixes:** We've addressed an issue where the focus ring wasn't displaying correctly for `<Checkbox>`, ensuring that it now shows up properly when used in a table context.
- **Menu Accessibility:** Fixed the issue of passing the aria-label to the menu button, instead its now passed to the menu itself.
- **Label:** Fixed the disabled color for label in b2b theme, now the label uses the regular text color. Thanks Daniel!

---

Thanks for reading, and we hope you enjoy the new features in Marigold 10.0! Be sure to check out the updated documentation for more details, and as always, we're here if you need help.
6 changes: 5 additions & 1 deletion docs/ui/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Card,
Columns,
Headline,
Inline,
Link,
List,
Scrollable,
Expand All @@ -29,6 +30,7 @@ import { CopyButton } from './CopyButton';
import { Do, Dont, GuidelineTiles } from './DosAndDonts';
import { FullsizeView } from './FullsizeViewDemo';
import { Image } from './Image';
import { Logo } from './Logo';
import { PropsTable } from './PropsTable';
import { StorybookHintMessage } from './StorybookHintMessage';
import { TeaserCard, TeaserList } from './TeaserCard';
Expand Down Expand Up @@ -156,6 +158,7 @@ const components = {
FontWeights,
Headlines,
IconList,
Logo,
PropsTable,
Spacing,
StorybookHintMessage,
Expand All @@ -169,8 +172,9 @@ const components = {
// Marigold Components
Card,
Columns,
Headline,
DateFormat,
Headline,
Inline,
List,
Scrollable,
SectionMessage,
Expand Down
5 changes: 3 additions & 2 deletions packages/components/src/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import React, { useEffect } from 'react';
import { SortDescriptor } from '@react-types/shared';
import { TextArea } from '@marigold/components';
import type { Selection } from '@marigold/components';
import { Button } from '../Button';
import { Center } from '../Center';
import { Checkbox } from '../Checkbox';
Expand Down Expand Up @@ -149,15 +150,15 @@ export const ControlledTable: Story = {
year: '1981',
},
];
const [selectedKeys, setSelectedKeys] = useState(new Set());
const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set());
const selected = Array.from(selectedKeys);
return (
<Stack space={3}>
<Table
aria-label="Example dynamic collection table"
selectionMode="multiple"
{...args}
onSelectionChange={key => setSelectedKeys(new Set(key))}
onSelectionChange={setSelectedKeys}
>
<Table.Header columns={columns}>
{column => <Table.Column>{column.name}</Table.Column>}
Expand Down

0 comments on commit e01e21d

Please sign in to comment.