-
Notifications
You must be signed in to change notification settings - Fork 30
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
typography + meta #2975
Merged
Merged
typography + meta #2975
Changes from 51 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
e75c216
create foundations + layout stories
dreamwasp 077dceb
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 6537339
start foundations
dreamwasp 03b9002
start retooling componentheader
dreamwasp 55a5dcb
component header tweak
dreamwasp 6d85bc3
start restructure of header components
dreamwasp 7cee2cc
TOC + Theme working, need DataTable + code background color
dreamwasp 2d96f2a
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 826963c
working on color mode - need to fix text color
dreamwasp 497d63b
Merge branch 'cass-gm-842' of ssh://github.com/Codecademy/gamut into …
dreamwasp 7f75bca
revert test
dreamwasp 9b69962
Theme page sorted, need to fix ColorMode
dreamwasp cb3c78a
colormode sorted
dreamwasp d85461f
colormode sorted
dreamwasp b1f2136
start type fix + what to do about blocks
dreamwasp be4e7ca
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 7032817
LayoutGrid + content Container
dreamwasp 2ab0c47
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 5053d9b
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp f20113c
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 927e21a
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 4abf62e
LayoutGrid done
dreamwasp 86f15c9
Merge branch 'cass-gm-842' of ssh://github.com/Codecademy/gamut into …
dreamwasp 02bcda0
start flexbox, need to look into sandbox stuff
dreamwasp 2c044d5
gridbox + flexbox are good, just need to tweak
dreamwasp 76ace8d
Merge branch 'cass-sb-8-layout', remote-tracking branch 'origin' into…
dreamwasp be7ec47
tweaks to headers
dreamwasp a77ce8e
lots of style tweaks + deduplications
dreamwasp b286e5a
fix typograpth, need to fix color mode switches
dreamwasp af5be6e
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp a4d6db1
start on system stories
dreamwasp 45ff066
unify shared elements
dreamwasp 0693a32
add variance + fix tables
dreamwasp d98ca77
more tweaks to status
dreamwasp c8f9041
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp 7641220
design tweaks
dreamwasp 2759bd2
Merge branch 'cass-gm-842' of ssh://github.com/Codecademy/gamut into …
dreamwasp 018ffc3
add hub
dreamwasp 2e01130
more tweaks
dreamwasp 3b3d557
Merge branch 'cass-sb-8-layout' into cass-gm-842
dreamwasp dce02a1
rename DataTable
dreamwasp 37ab760
clean up of default
dreamwasp 5902037
typography + meta stories
dreamwasp ee48957
add anchor story
dreamwasp 862fedf
start text + hiddentext
dreamwasp 206fad4
Merge remote-tracking branch 'origin/cass-sb-8-layout' into cass-gm-843
dreamwasp 5c59281
text done
dreamwasp b473bbb
started snippet changes
dreamwasp ffb9aa3
fixed code snippets
dreamwasp a9a528d
meta and sorted done?"
dreamwasp 529822f
renamed + sorting
dreamwasp b7e1e79
Merge branch 'cass-sb-8-layout' into cass-gm-843
dreamwasp ce24811
Merge branch 'cass-sb-8-layout' into cass-gm-843
dreamwasp 7d3bed2
more kenny edits
dreamwasp 35bcd5b
more kenny edits + other new tab for links
dreamwasp 2a4bf89
the last of it
dreamwasp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,137 @@ | ||
{ | ||
"Component Story": { | ||
"prefix": "component-story", | ||
"Component Doc": { | ||
"prefix": "component-doc", | ||
"body": [ | ||
"import { $1 } from '@codecademy/$2';", | ||
"import title from '@codecademy/macros/lib/title.macro';", | ||
"import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';", | ||
"import { PropsTable } from '@codecademy/storybook-addon-variance';", | ||
"import { Canvas, Controls, Meta } from '@storybook/blocks';", | ||
"", | ||
"import { ComponentHeader } from '~styleguide/blocks';", | ||
"", | ||
"import * as $1Stories from './$1.stories';", | ||
"", | ||
"export const parameters = {", | ||
"subtitle: `Template component`,", | ||
"design: {", | ||
"type: 'figma',", | ||
"url: 'https: //www.figma.com/file/XXX',", | ||
" },", | ||
"status: 'current',", | ||
"source: {", | ||
"repo: '$2',", | ||
"// this is easy to find by right clicking on the file in VSCode and clicking 'Copy Remote File Url From...' and the selecting 'main' or amending the url path below like so: https://github.com/Codecademy/gamut/blob/main/packages/${2}/src/file/location", | ||
"githubLink:", | ||
"'https: //github.com/Codecademy/gamut/blob/main/packages/gamut/src/Logo',", | ||
" },", | ||
"};", | ||
"<Meta of={$1Stories}/>", | ||
"", | ||
"<ComponentHeader {...parameters} />", | ||
"", | ||
"## Usage", | ||
"", | ||
"Use $1 to [what it should be used for]", | ||
"", | ||
"### Best practices:", | ||
"", | ||
"- [recommendation / best practice for implementation]", | ||
"- [recommendation / best practice for implementation]", | ||
"", | ||
"When NOT to use", | ||
"", | ||
"- [use case]- for [describe the use case], use the [similar component] component.", | ||
"- [use case]- for [describe the use case], use the [similar component] component", | ||
"", | ||
"## Anatomy", | ||
"", | ||
"[Insert image exported from Figma]", | ||
"", | ||
"1. [Element name]", | ||
"- [description including available options and ux writing if relevant]", | ||
"", | ||
"<Meta", | ||
" title={title}", | ||
" component={$1}", | ||
" parameters={{", | ||
" subtitle: '$3',", | ||
" source: '$2',", | ||
" status: 'current' | 'updating' | 'deprecated' | 'static'$4 ,", | ||
" design: {", | ||
" type: 'figma',", | ||
" url: 'https://www.figma.com/file/$5',", | ||
" }", | ||
" }}", | ||
" args={{}}", | ||
"/>", | ||
"## Variants", | ||
"", | ||
"`$1` component summary goes here", | ||
"### [Variant 1 name]", | ||
"", | ||
"## Design Principles", | ||
"Use the [variant 1 name] to [what it should be used for]", | ||
"", | ||
"Design Principles summary", | ||
"<Canvas of={$1Stories.Default} />", | ||
"", | ||
"## Usage Guidelines", | ||
"## Playground", | ||
"", | ||
"Usage summary", | ||
"If you are using a story named 'Default', you can forgo the `of` prop.", | ||
"", | ||
"## Code Playground", | ||
"<Canvas sourceState='shown' of={$1Stories.Default} />", | ||
"", | ||
"<Canvas>", | ||
" <Story name=\"$1\">", | ||
" {(args) => <$1 {...args} />}", | ||
" </Story>", | ||
"</Canvas>", | ||
"<Controls />", | ||
"", | ||
"<PropsTable story=\"$1\"/>" | ||
"## Accessibility considerations", | ||
"", | ||
"- [Accessibility guidance]", | ||
"", | ||
"## UX writing", | ||
"", | ||
"- [content]", | ||
" - [guidance]", | ||
" - [guidance]" | ||
], | ||
"description": "Default Component Story Structure." | ||
"description": "Default Component Doc Structure." | ||
}, | ||
"Table of Contents Story": { | ||
"prefix": "toc-story", | ||
"body": [ | ||
"import title from '@codecademy/macros/lib/title.macro';", | ||
"import { Meta } from '@storybook/addon-docs/blocks';", | ||
"import { Meta } from '@storybook/blocks';", | ||
"import { AboutHeader, TableOfContents } from '~styleguide/blocks';", | ||
"", | ||
"export const parameters = {", | ||
" id: '$1',", | ||
" title: '$1/About',", | ||
" subtitle: '$2',", | ||
" }", | ||
"", | ||
"import { TableOfContents } from '~styleguide/blocks';", | ||
"<Meta title='$1/About' />", | ||
"", | ||
"<Meta", | ||
" title={title}", | ||
" parameters={{", | ||
" subtitle: '$3',", | ||
" }}", | ||
"/>", | ||
"<AboutHeader {...parameters} />", | ||
"", | ||
"<TableOfContents />" | ||
"Foundations make up the smallest scale design values that comprise a design system. Sometimes referred to elsewhere as "tokens", they are the abstract units that comprise and stitch together our atoms, molecules, and organisms.", | ||
"", | ||
"<TableOfContents", | ||
" links={[", | ||
" {", | ||
" id: '$1/Category',", | ||
" subtitle: 'Short description',", | ||
" title: 'Category',", | ||
" }", | ||
" ]}", | ||
"/>" | ||
], | ||
"description": "TOC Story Structure." | ||
}, | ||
"Canvas Block": { | ||
"prefix": "canvas-block", | ||
"body": [ | ||
"<Canvas>", | ||
" <Story name=\"$1\" args={{}}>", | ||
" {(args) => <$2 {...args} />}", | ||
" </Story>", | ||
"</Canvas>" | ||
], | ||
"description": "A single story block wrapped in a canvas" | ||
}, | ||
"Story Block": { | ||
"prefix": "story-block", | ||
"Component Story": { | ||
"prefix": "component-story", | ||
"body": [ | ||
" <Story name=\"$1\" args={{}}>", | ||
" {(args) => <$2 {...args} />}", | ||
" </Story>" | ||
"import { $1 } from '@codecademy/gamut';", | ||
"import type { Meta, StoryObj } from '@storybook/react';", | ||
"", | ||
"const meta: Meta<typeof $1> = {", | ||
" component: $1,", | ||
" args: {},", | ||
"};", | ||
"", | ||
"export default meta;", | ||
"type Story = StoryObj<typeof $1>;", | ||
"", | ||
"export const Default: Story = {", | ||
" args: {", | ||
" children: 'Test'", | ||
" },", | ||
"};", | ||
"", | ||
"export const Secondary: Story = {", | ||
" args: {", | ||
" children: 'Test again',", | ||
" variant: 'secondary'", | ||
" }", | ||
"};" | ||
], | ||
"description": "A single story block without a canvas" | ||
"description": "Default TSX story structure." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Meta } from '@storybook/blocks'; | ||
|
||
import { AboutHeader, TableOfContents } from '~styleguide/blocks'; | ||
|
||
export const parameters = { | ||
id: 'Meta', | ||
title: 'Meta', | ||
subtitle: | ||
'Documentation and associated links explaining our in-progress approach to a design system.', | ||
}; | ||
|
||
<Meta title="Meta/About" /> | ||
|
||
<AboutHeader {...parameters} /> | ||
|
||
<TableOfContents | ||
links={[ | ||
{ | ||
id: 'Meta/Best Practices', | ||
subtitle: 'Current best practices for using the Gamut Design System', | ||
title: 'Best Practices', | ||
status: 'current', | ||
}, | ||
{ | ||
id: 'Meta/Contributing', | ||
subtitle: `Thanks so much for being interested in contributing to Gamut! We love working with Codecademy employees across all our teams.`, | ||
title: 'Contributing', | ||
}, | ||
{ | ||
id: 'Meta/FAQ', | ||
dreamwasp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
subtitle: `Please let us know if there are questions you'd like answered here!`, | ||
title: 'FAQ', | ||
}, | ||
{ | ||
id: 'Meta/Stories', | ||
subtitle: `We're still building these opinions out, so don't expect all stories to adhere just yet!`, | ||
title: 'Stories', | ||
}, | ||
]} | ||
/> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add Molecules + Organisms here after they're merged in!