Skip to content

Commit

Permalink
docs([DST-570]): Added "Whats new" pages to our docs (#4186)
Browse files Browse the repository at this point in the history
* try things out

* trying stuff out - chaos

* generate folder structure for changesets

* add comments

* improved structure of generated folders

* save all the changelogs

* having changelog navigatuon

* save all changes

* changed heading

* update changelogs correctly

* update to have frontmatter structure

* fix layout

* add caption

* split the heading

* save changes

* save

* update the script

* days difference

* have badges in frontmatter

* have badges

* clean up

* rename function

* add externallinks

* try stuff

* change function

* change function

* have nav

* update

* remove everything with changelogpage

* save

* save

* fix dates

* add docs changelog

* rename to whats new

* change order

* overview page

* make it easier

* add slug page for blog posts

* adjusted the pages

* update in package json

* save pages

* save

* fix navigation

* fix command menu

* update

* padding

* update date format

* Fix code scanning alert no. 77: Incomplete string escaping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* update

* mybe better

* Create modern-dancers-knock.md

* try

* hä

* try out stuff with blog posts

* try out stuff

* test

* last test

* change back

* update

* maybe this helps

* change back

* update structure of how to generate routes for bllog dir

* rename to releases

* contentlayer

* update release dir

* Create friendly-plants-check.md

* add metadata

* Delete .changeset/modern-dancers-knock.md

* hmmm revert

* update padding for last update

* update

* change to ssr

* metadata

* add read more links

* fix links in teaser cards

* improve withh stacks

* make changes on build script

* update release files

* update latestpost

* update changeset

* change back

* update link buttons

* add caption before post

* update read more links

* update link

* rename to releases

* update link

* fix layout

* change caption

* add heading for changelog teaser cards

* change caption in teaser list

* remove github link from changelogs

* Update overview.mdx

* update

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Sebald <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent d5386e4 commit 4818227
Show file tree
Hide file tree
Showing 44 changed files with 8,267 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"baseBranch": "main",
"access": "public",
"changelog": [
"@changesets/changelog-github",
"@changesets/changelog-git",
{ "repo": "marigold-ui/marigold" }
],
"fixed": [["@marigold/system", "@marigold/components", "@marigold/docs"]]
Expand Down
8 changes: 8 additions & 0 deletions .changeset/friendly-plants-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@marigold/docs": patch
---

docs([DST-570]): Added "Release" pages to our documentation

We now create for each changelog a page on our documentation, it is also possible to create release blog posts.
With these pages we improve communication, enhance user experience, and ensure all users have easy access to the latest updates in one central location.
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

### Patch Changes

- [#3939](https://github.com/marigold-ui/marigold/pull/3939) [`2cde433`](https://github.com/marigold-ui/marigold/commit/2cde433e21bc49e378b96c9d812baf21914cf382) Thanks [@sarahgm](https://github.com/sarahgm)! - feat[DST-481]: rename <Message> in <SectionMessage>
- [#3939](https://github.com/marigold-ui/marigold/pull/3939) [`2cde433`](https://github.com/marigold-ui/marigold/commit/2cde433e21bc49e378b96c9d812baf21914cf382) Thanks [@sarahgm](https://github.com/sarahgm)! - feat[DST-481]: rename `<Message>` in `<SectionMessage>`

- [#3967](https://github.com/marigold-ui/marigold/pull/3967) [`0773aa8`](https://github.com/marigold-ui/marigold/commit/0773aa8cd6ee71faf4f0d04f80f33cbe7fc56202) Thanks [@sebald](https://github.com/sebald)! - refa: Update TypeScript and adjust `<NumericFormat>` props

Expand Down
29 changes: 2 additions & 27 deletions docs/app/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
import type { PropsWithChildren } from 'react';
import { Footer } from './_components/Footer';
import { SectionNavigation } from './_components/SectionNavigation';
import { DefaultLayout } from '@/ui/layout/DefaultLayout';

// Layout
// ---------------
const Layout = ({ children }: PropsWithChildren) => (
<>
<aside
className={[
'top-[--page-header-height]',
'py-[--page-sub-nav-padding] xl:py-[--page-sub-nav-padding-xl]',
'pl-[--page-padding-md] xl:pl-[--page-padding-xl]',
'h-[calc(100vh-var(--page-header-height))] w-[--page-sub-nav-width] xl:w-[--page-sub-nav-width-xl]',
'fixed z-10 hidden overflow-hidden hover:overflow-y-auto md:block',
'scrollbar-thin scrollbar-thumb-secondary-400 scrollbar-thumb-rounded-full scrollbar-track-transparent',
'border-secondary-200 border-r',
].join(' ')}
>
<SectionNavigation />
</aside>
<main
className={[
'pt-[--page-main-padding] xl:pt-[--page-main-padding-xl]',
'px-[--page-padding] md:px-[--page-padding-md] xl:pr-[--page-padding-xl]',
'md:pl-[calc(var(--page-sub-nav-width)+var(--page-main-padding))] xl:pl-[calc(var(--page-sub-nav-width-xl)+var(--page-main-padding-xl))]',
].join(' ')}
>
{children}
<Footer />
</main>
</>
<DefaultLayout>{children}</DefaultLayout>
);

export default Layout;
19 changes: 11 additions & 8 deletions docs/app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ interface ContentPageProps {
async function getPageFromParams(params: ContentPageProps['params']) {
const slug = params?.slug?.join('/');
const page = allContentPages.find(page => page.slug === slug);

return page || null;
}

export async function generateMetadata({
params,
}: ContentPageProps): Promise<Metadata> {
const page = await getPageFromParams(params);

return page
? {
title: page.title,
Expand Down Expand Up @@ -57,7 +59,6 @@ export async function generateStaticParams(): Promise<

export default async function ContentPage({ params }: ContentPageProps) {
const page = await getPageFromParams(params);

if (!page) {
notFound();
}
Expand All @@ -69,14 +70,16 @@ export default async function ContentPage({ params }: ContentPageProps) {
<div className="text-secondary-400 pt-1">{page.caption}</div>
</div>
<div className="prose max-w-[70ch]">
<Mdx className="" title={page.title} code={page.body.code} />
</div>
<div className="col-start-2 hidden min-[1400px]:block">
<TocContainer />
</div>
<div className="text-text-primary-muted text-xs italic">
Last update: <RelativeTime date={new Date(page.modified)} />
<Mdx title={page.title} code={page.body.code} />
<div className="text-text-primary-muted pt-8 text-xs italic">
Last update: <RelativeTime date={new Date(page.modified)} />
</div>
</div>
{page.toc === false ? null : (
<div className="col-start-2 hidden min-[1400px]:block">
<TocContainer />
</div>
)}
</article>
);
}
2 changes: 2 additions & 0 deletions docs/app/_components/CommandItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export const PagesItem = ({
setPages,
}: PagesItemProps) => {
const goto = useGoto(setOpen, setPages);

return (
<CommandGroup heading={name} key={name} className={classNames.section}>
{items.map(page => (
Expand All @@ -233,6 +234,7 @@ export const PagesItem = ({
className={cn(classNames.item, 'group')}
key={page.slug}
value={page.slug}
keywords={[page.title]}
onSelect={() => goto({ slug: page.slug })}
>
<Inline space={4} alignY="center">
Expand Down
4 changes: 2 additions & 2 deletions docs/app/_components/SiteNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const SiteNavigation = () => {
variant="main"
className="text-sm font-medium lg:px-1"
key={index}
current={pathname.includes(slug)}
href={link?.href ?? '/'}
current={pathname.startsWith(`/${slug}`)}
href={link?.href ?? `/${slug}`}
>
{name}
</NavLink>
Expand Down
10 changes: 10 additions & 0 deletions docs/app/releases/blog/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { PropsWithChildren } from 'react';
import { DefaultLayout } from '@/ui/layout/DefaultLayout';

// Layout
// ---------------
const Layout = ({ children }: PropsWithChildren) => (
<DefaultLayout>{children}</DefaultLayout>
);

export default Layout;
78 changes: 78 additions & 0 deletions docs/app/releases/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { baseUrl } from '@/lib/config';
import { DateFormat, Headline } from '@/ui';
import { allBlogs } from 'contentlayer/generated';
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { TocContainer } from '@/ui/Toc';
import { Mdx } from '@/ui/mdx';

interface BlogPostProps {
params: {
slug: string[];
};
}
async function getPostFromParams(params: BlogPostProps['params']) {
const fullPath = `releases/blog/${params.slug}`;
const currentPost = allBlogs.find(post => post.slug === fullPath);

return currentPost || null;
}

export async function generateMetadata({
params,
}: BlogPostProps): Promise<Metadata> {
const post = await getPostFromParams(params);

return post
? {
title: post.title,
description: post.date,
applicationName: 'Marigold Design System',
appleWebApp: {
title: 'Marigold Design System',
},
metadataBase: new URL(baseUrl),
openGraph: {
siteName: 'Marigold Design System',
title: post.title,
description: post.date,
images: `${baseUrl}/api/og.png?title=${encodeURIComponent(post.title)}`,
type: 'website',
},
twitter: {
card: 'summary_large_image',
creator: '@reservix',
},
}
: {};
}

const BlogPost = async ({ params }: BlogPostProps) => {
const currentPost = await getPostFromParams(params);

if (!currentPost) {
notFound();
}

return (
<article
key={currentPost.title}
className="grid grid-cols-1 gap-x-24 gap-y-14 min-[1400px]:grid-cols-[minmax(min-content,70ch)_1fr]"
>
<div className="col-span-full">
<Headline level={1}>{currentPost.title}</Headline>
<div className="text-secondary-400 pt-1">
<DateFormat value={new Date(currentPost.date)} dateStyle="medium" />
</div>
</div>
<div className="prose max-w-[70ch]">
<Mdx title={currentPost.title} code={currentPost.body.code} />
</div>
<div className="col-start-2 hidden min-[1400px]:block">
<TocContainer />
</div>
</article>
);
};

export default BlogPost;
8 changes: 8 additions & 0 deletions docs/content/releases/blog-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Releases
caption: Find all release blogs.
order: 2
badge: new
---

<PostList />
17 changes: 17 additions & 0 deletions docs/content/releases/blog/release-2024-09-20.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'Watch out! Breaking Change incoming: Removing HTML-Properties'
date: 2024-07-19
type: Blog
---

The Design System team is currently focusing on optimising the Marigold documentation, which includes adding new and higher quality content for users as well as cleaning up and removing outdated content.

## Breaking Change

We are removing all HTML properties on our Marigold components, as these should no longer be used in the future. If a user has used the HTML properties when using Marigold, he oder she must rewrite them after the breaking change. If this is not the case you can sit back and relax.

As part of this process, the upcoming Marigold release will remove content from the documentation that is not used and should no longer be used.

Removing content from the Marigold documentation is particularly necessary if it is not relevant for our users. This ensures that the documentation is not unnecessarily "bloated" with content and thus creates more space for content that our users really need and can find more quickly.

In addition, allowing the use of HTML properties was incorrectly authorised by the Design System Team in the past. This error is hereby corrected to prevent incorrect use of Marigold components in the future.
66 changes: 66 additions & 0 deletions docs/content/releases/blog/release-2024-09-26.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Big news from Marigold
date: 2024-09-26
type: Blog
changed:
- components/content/card
- component/layout/inline
- component/layout/stack
---

We’re thrilled to introduce Marigold UI v2.0—a major upgrade designed to make building beautiful, accessible interfaces faster and easier than ever. Whether you’re crafting an enterprise-level web app or a sleek personal project, v2.0 offers the tools and flexibility you need to create polished UIs with minimal effort.

## Breaking Change

We’re thrilled to introduce Marigold UI v2.0—a major upgrade designed to make building beautiful, accessible interfaces faster and easier than ever. Whether you’re crafting an enterprise-level web app or a sleek personal project, v2.0 offers the tools and flexibility you need to create polished UIs with minimal effort.

## New

We’ve reimagined our theming system from the ground up. You can now:

Toggle dark mode in a single click.
Define custom color schemes with easy CSS variable support.
Build dynamic themes based on user preferences—no complex CSS required.

With performance optimizations in v2.0, your app’s UI will load faster and feel more responsive:

Smaller bundle sizes: We’ve trimmed down the library for better performance.
Lazy loading: Load components on demand to keep things snappy.
Optimized rendering: Minimized reflows and repaints for improved performance.
♿ 4. Accessibility That Works Out of the Box
We believe in making the web accessible to all. With improved ARIA support, better keyboard navigation, and enhanced screen reader compatibility, v2.0 ensures your app is usable by everyone.

## Changes

Our documentation has been revamped for clarity and ease of use:

Interactive code examples and live playgrounds for real-time testing.
Step-by-step guides for React, Vue, and vanilla JS integrations.
A streamlined customization guide to make theming and extending components simple.

## Bug fixes

### @marigold/components

- Card Layouts: For building stunning, responsive grids.
- Advanced Tables: With built-in sorting, filtering, and pagination.
- Notification Toasts: Fully customizable, ideal for real-time feedback.
- Sidebars & Drawers: Smooth, mobile-friendly navigation components.
- Skeleton Loaders: Keep users engaged while content loads.

### @marigold/system

- fixed blablabla

## Why Upgrade to v2.0?

Marigold UI v2.0 offers a significant upgrade in terms of performance, customization, and ease of use. By upgrading, you’ll be able to:

Build UIs faster with new, ready-to-use components.
Customize every aspect of your design system without hassle.
Offer a superior user experience with faster loading and better accessibility.
Migrating from v1.x? We’ve got you covered! Check out our migration guide for an easy, hassle-free update.

## What’s Next for Marigold UI?

We’re just getting started! In the coming months, expect more components, performance improvements, and an upcoming Figma plugin to bridge the gap between design and development.
Loading

0 comments on commit 4818227

Please sign in to comment.