From 5e566421f84fe7436229befdbc95bc751ab79607 Mon Sep 17 00:00:00 2001 From: dreamwasp Date: Mon, 23 Jun 2025 11:12:31 -0400 Subject: [PATCH 1/2] feature branch: hackathon 2024 --- packages/styleguide/src/lib/Meta/About.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/styleguide/src/lib/Meta/About.mdx b/packages/styleguide/src/lib/Meta/About.mdx index 67054a34f66..e6bc8b85c1e 100644 --- a/packages/styleguide/src/lib/Meta/About.mdx +++ b/packages/styleguide/src/lib/Meta/About.mdx @@ -11,6 +11,8 @@ export const parameters = { +This is a feature branch for Hackathon 2025~ + Date: Tue, 24 Jun 2025 13:42:08 -0400 Subject: [PATCH 2/2] feat: Cass figma mcp (#3117) * a robot made this * new roolz * add more colormode rules * better rules * better rules * figma mcp --- .cursor/rules/figma-rules.mdc | 18 +++++++ .vscode/settings.json | 12 ++++- .../src/lib/Molecules/Modals/Modal/Modal.mdx | 2 +- .../Molecules/Modals/Modal/Modal.stories.tsx | 50 +++++++++++++++++++ 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .cursor/rules/figma-rules.mdc diff --git a/.cursor/rules/figma-rules.mdc b/.cursor/rules/figma-rules.mdc new file mode 100644 index 00000000000..822c23400f1 --- /dev/null +++ b/.cursor/rules/figma-rules.mdc @@ -0,0 +1,18 @@ +--- +description: +globs: +alwaysApply: true +--- + - The Figma Dev Mode MCP Server provides an assets endpoint which can serve image and SVG asset + - IMPORTANT: do NOT use or create placeholders if a localhost source is provided + - IMPORTANT: Always use components from `/packages` whenever possible + - Prioritize using semantic tokens and component props over Figma fidelity + - Avoid hardcoded values, use semantic design tokens whenever possible. The Background component is the exception - use color token names (i.e, navy, white, etc) and not a semantic token + - IMPORTANT: Do not use inline styles, whenever possible use emotion and the css-in-js utilities from `/packages/gamut-styles`. Follow the rules from `packages/styleguide/src/lib/Foundations/System` + - IMPORTANT: Follow WCAG requirements for accessibility + - Always follow best practices from `/packages/styleguide/src/lib/Meta/Best Practices.mdx` + - IMPORTANT: All patterns should come from `/packages/gamut-patterns` - match the Figma component name to the pattern component + - IMPORTANT: All icons should come from `/packages/gamut-icons` - match the Figma component name to the icon component + - Check if the Figma component name matches a Gamut component name and use that component + - Use the tokens from `packages/gamut-styles/src/variables` + - Use the CodeConnect implementation diff --git a/.vscode/settings.json b/.vscode/settings.json index 13c37b8648a..dddd024c3ca 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,5 +41,15 @@ }, "storyExplorer.storiesGlobs": "packages/styleguide/stories/**/*.stories.mdx", "jest.jestCommandLine": "node_modules/.bin/jest", - "nxConsole.generateAiAgentRules": true + "nxConsole.generateAiAgentRules": true, + "chat.mcp.discovery.enabled": true + // "mcp": { + // "servers": { + // "Figma Dev Mode MCP": { + // "type": "sse", + // "url": "http://127.0.0.1:3845/sse" + // } + // } + // }, + // "chat.agent.enabled": true } diff --git a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx index 3a1d9630839..c3067243ae2 100644 --- a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx +++ b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.mdx @@ -32,7 +32,7 @@ Use a Modal to create a dialog on sits on top of a full screen overlay. Setting the `size` to `'fluid'` will make the width of the Modal fit its content. - + ### Large diff --git a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx index 2176b405f98..f41f8c4c00e 100644 --- a/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx +++ b/packages/styleguide/src/lib/Molecules/Modals/Modal/Modal.stories.tsx @@ -1,6 +1,7 @@ import { Box, Checkbox, + Dialog, FillButton, FlexBox, Modal, @@ -345,3 +346,52 @@ export const MultipleViewsDisabled: React.FC = () => { ); }; + +const ImagePlaceholder = () => { + return ( + + + Replace with any image + + 16:9 + + ); +}; + +export const ARobotMadeThis: React.FC = () => { + const [isOpen, setIsOpen] = useState(false); + + return ( + <> + setIsOpen(true)}>Open Figma Dialog + setIsOpen(false), + }} + confirmCta={{ + children: 'Primary action', + onClick: () => setIsOpen(false), + }} + image={} + isOpen={isOpen} + size="small" + title="Headline" + onRequestClose={() => setIsOpen(false)} + > + + Optional 1-2 lines of explanation that provides relevant details. + Lorem ipsum cras nulla massa odio ligula. + + + + ); +};