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: component theming #1791

Open
wants to merge 1 commit into
base: soul/integrations/makeswift
Choose a base branch
from

Conversation

agurtovoy
Copy link

@agurtovoy agurtovoy commented Dec 20, 2024

What/Why?

Visually editable site and component themes

Testing

Kapture.2024-12-23.at.19.10.53.mp4

Copy link

linear bot commented Dec 20, 2024

Copy link

changeset-bot bot commented Dec 20, 2024

⚠️ No Changeset found

Latest commit: 5d71056

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 6:11am
catalyst-soul ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 6:11am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Dec 24, 2024 6:11am
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Dec 24, 2024 6:11am
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Dec 24, 2024 6:11am

@agurtovoy agurtovoy force-pushed the aleksey/vib-1043-component-theming branch from 2bb617f to ab7bc1a Compare December 23, 2024 02:52
@agurtovoy agurtovoy force-pushed the aleksey/vib-1043-component-theming branch 2 times, most recently from 682d4d2 to 5b45156 Compare December 23, 2024 22:59
@agurtovoy agurtovoy force-pushed the aleksey/vib-1043-component-theming branch from 5b45156 to 4b7d2bc Compare December 24, 2024 00:49
@agurtovoy agurtovoy force-pushed the aleksey/vib-1043-component-theming branch from 4b7d2bc to a1adf36 Compare December 24, 2024 01:08
@agurtovoy agurtovoy marked this pull request as ready for review December 24, 2024 01:40
@agurtovoy agurtovoy requested a review from a team as a code owner December 24, 2024 01:40
@@ -16,15 +14,13 @@ export default async function DefaultLayout({ params, children }: Props) {
setRequestLocale(locale);

return (
<MakeswiftProvider previewMode={(await draftMode()).isEnabled}>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved <MakeswiftProvider> to the root root layout so that theming can be applied to all pages.

<VercelComponents />
</body>
</html>
</MakeswiftProvider>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggle the "Hide whitespace" setting to view the semantic diffs here:

hide whitespace

label: 'Sections',
type: sections,
}),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full site theme panel:

site theme panel

titleFont: Font({ label: 'Title font', variant: false }),
contentFont: Font({ label: 'Content font', variant: false }),
light: colorGroup('Light'),
dark: colorGroup('Dark'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 8 59 10 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 02 55 PM

background: Color({ label: 'Background' }),
text: Color({ label: 'Text' }),
focus: Color({ label: 'Focus' }),
close: closeButton,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 8 59 49 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 04 49 PM

tertiary: colorGroup('Tertiary'),
ghost: colorGroup('Ghost'),
focus: Color({ label: 'Focus' }),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 05 52 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 06 38 PM

borderRadius: Number({ label: 'Border radius (px)', defaultValue: 16 }),
focus: Color({ label: 'Focus' }),
light: colorGroup('Light'),
dark: colorGroup('Dark'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 07 23 PM

Copy link
Author

@agurtovoy agurtovoy Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 10 27 04 PM

@agurtovoy agurtovoy force-pushed the aleksey/vib-1043-component-theming branch from a1adf36 to 02add2f Compare December 24, 2024 03:11
type: {
focus: Color({ label: 'Focus' }),
light: colorGroup('Light'),
dark: colorGroup('Dark'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 10 31 PM Screenshot 2024-12-23 at 9 10 37 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 10 17 PM

font: Font({ label: 'Font', variant: false }),
text: Color({ label: 'Text' }),
focus: Color({ label: 'Focus' }),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 12 20 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 12 44 PM

searchResult: searchResultGroup('Search result'),
cartCount: cartCountGroup('Cart count'),
locale: localeGroup('Locale'),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 14 56 PM Screenshot 2024-12-23 at 9 15 07 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 15 43 PM

layout: Shape.Layout.Popover,
type: {
light: colorGroup('Light'),
dark: colorGroup('Dark'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 16 50 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 17 25 PM

focus: Color({ label: 'Focus' }),
light: colorGroup('Light'),
dark: colorGroup('Dark'),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 32 29 PM

Copy link
Author

@agurtovoy agurtovoy Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 10 27 48 PM

footerLinkHover: Color({ label: 'Footer link hover' }),
footerCopyright: Color({ label: 'Footer copyright' }),
focus: Color({ label: 'Focus' }),
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 33 50 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 34 02 PM

playBorder: Color({ label: 'Play border' }),
playBorderHover: Color({ label: 'Play border hover' }),
playText: Color({ label: 'Play text' }),
focus: Color({ label: 'Focus' }),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 35 06 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 9 34 52 PM

@@ -17,7 +17,7 @@
"@conform-to/react": "^1.2.2",
"@conform-to/zod": "^1.2.2",
"@icons-pack/react-simple-icons": "^10.2.0",
"@makeswift/runtime": "0.0.0-snapshot-20241217195602",
"@makeswift/runtime": "0.0.0-snapshot-20241220223738",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New runtime snapshot w/ Shape v2 support.

label: 'Section',
layout: Shape.Layout.Popover,
type: {
maxWidth: widthGroup('Max width'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 10 28 46 PM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-23 at 10 29 00 PM

export const Component = async ({
snapshotId,
...props
}: {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Userland RSC for MakeswiftComponent

Copy link
Contributor

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-qd5n7nxvo-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟢 Performance 97
🟢 Accessibility 94
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟠 Performance 82
🟢 Accessibility 94
🟢 Best practices 100
🟠 SEO 85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant