An open source design system that's fully customizable and agent ready
TypeScript
fix(templates): improve rubric scores for settings, login-split, editor (#1524)
rubyycheung650b0e9e31b4
diff --git a/packages/cli/templates/pages/editor/page.tsx b/packages/cli/templates/pages/editor/page.tsxindex 992e11e0c8..2fc17400e9 100644--- a/packages/cli/templates/pages/editor/page.tsx+++ b/packages/cli/templates/pages/editor/page.tsx@@ -311,9 +311,6 @@ const editorStyles = stylex.create({paddingInline: 0,},iconCircle: {- display: 'flex',- alignItems: 'center',- justifyContent: 'center',width: 40,height: 40,borderRadius: '50%',@@ -620,9 +617,9 @@ function BlockPreview({xstyle={cardXstyle}onClick={onSelect}><XDSHStack gap={4} vAlign="start">- <div {...stylex.props(editorStyles.iconCircle)}>+ <XDSCenter xstyle={editorStyles.iconCircle}><XDSIcon icon={LockClosedIcon} color="secondary" />- </div>+ </XDSCenter><XDSVStack gap={1}><XDSText type="label" weight="semibold">{(props.heading as string) || 'Notice'}diff --git a/packages/cli/templates/pages/login-split/page.tsx b/packages/cli/templates/pages/login-split/page.tsxindex 37b6cd9482..2c6ee8a2c9 100644--- a/packages/cli/templates/pages/login-split/page.tsx+++ b/packages/cli/templates/pages/login-split/page.tsx@@ -19,10 +19,24 @@ import {radiusVars,} from '@xds/core/theme/tokens.stylex';-const COVER_IMAGE_URL = '/templates/light-working-vertical-1.png';+// colorful-lifestyle-vertical-1 from xds_oss asset set+const COVER_IMAGE_URL =+ 'https://scontent.xx.fbcdn.net/v/t39.6806-6/670480937_2502078110200666_6842204180822201520_n.png?_nc_cat=100&ccb=1-7&_nc_sid=56bbc2&_nc_ohc=CkjsPqmDibQQ7kNvwGqbpNN&_nc_oc=Adp5jI8z5m0aqhA07RtwoFUrqqr3jc6tQshxd5Hr5UyL_DIkFt0wEIQwLeKgXOg1lTBG_Ncth9lSFM0vmPqMxbfx&_nc_zt=14&_nc_ht=scontent.xx&_nc_gid=eCyOnLSq2cMADZiwJgLJaQ&_nc_ss=7a30f&oh=00_Af2sEmvEqZa5nd1SqocypZQnRh_FLwZHEBOrG0LTR7tfdA&oe=69E852F4';-const APPLE_ICON_URL = '/templates/apple-logo.png';-const GOOGLE_ICON_URL = '/templates/google-logo.png';+const AppleIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg viewBox="0 0 24 24" fill="currentColor" width={16} height={16} {...props}>+ <path d="M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" />+ </svg>+);++const GoogleIcon = (props: React.SVGProps<SVGSVGElement>) => (+ <svg viewBox="0 0 24 24" fill="currentColor" width={16} height={16} {...props}>+ <path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4" />+ <path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853" />+ <path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05" />+ <path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" />+ </svg>+);const styles = stylex.create({page: {@@ -135,7 +149,7 @@ export default function LoginTwoColumn() {<XDSButtonlabel="Apple"variant="secondary"- icon={<img src={APPLE_ICON_URL} width={16} height={16} alt="" />}+ icon={<AppleIcon />}size="lg"xstyle={styles.fullWidth}/>@@ -144,7 +158,7 @@ export default function LoginTwoColumn() {<XDSButtonlabel="Google"variant="secondary"- icon={<img src={GOOGLE_ICON_URL} width={16} height={16} alt="" />}+ icon={<GoogleIcon />}size="lg"xstyle={styles.fullWidth}/>diff --git a/packages/cli/templates/pages/login-sso/page.tsx b/packages/cli/templates/pages/login-sso/page.tsxindex e1b1b51557..f9f89d190a 100644--- a/packages/cli/templates/pages/login-sso/page.tsx+++ b/packages/cli/templates/pages/login-sso/page.tsx@@ -20,7 +20,9 @@ import {shadowVars} from '@xds/core/theme/tokens.stylex';// Styles// ----------------------------------------------------------------------------const BG_URL = '/templates/login-sso-bg.jpg';+// moody-scene-horizontal-1 from xds_oss asset set+const BG_URL =+ 'https://scontent.xx.fbcdn.net/v/t39.6806-6/672863405_1398068472358179_8859473259447111379_n.png?_nc_cat=100&ccb=1-7&_nc_sid=56bbc2&_nc_ohc=-wV2jHO2HVUQ7kNvwHGzCzr&_nc_oc=AdrxH65fOWB9AYbTJt499HTYmTlEoQ2-Gq4v0HixJT92Mz5awWgcZNSxSTRZJPypWIDapoCWcQ2JcNruqRd9ovzp&_nc_zt=14&_nc_ht=scontent.xx&_nc_gid=ak5CKQPy-Mq6Vm7qld0MTw&_nc_ss=7a30f&oh=00_Af03yc18QziUpPjAs6EJMXwjb9gx2bfazL1ccL5840WQdw&oe=69E8390A';const styles = stylex.create({page: {@@ -38,18 +40,15 @@ const styles = stylex.create({},});-const META_LOGO_URL = '/templates/meta-logo.svg';-type SSOProvider = {name: string;abbr: string;- logoUrl?: string;};const SSO_PROVIDERS: Record<string, SSOProvider> = {'google.com': {name: 'Google Workspace', abbr: 'G'},'microsoft.com': {name: 'Microsoft Entra ID', abbr: 'M'},'okta.com': {name: 'Okta', abbr: 'O'},- 'meta.com': {name: 'Meta SSO', abbr: 'M', logoUrl: META_LOGO_URL},+ 'meta.com': {name: 'Meta SSO', abbr: 'M'},'apple.com': {name: 'Apple Business', abbr: 'A'},};@@ -168,11 +167,7 @@ export default function LoginSSO() {{step === 'sso-confirm' && provider && (<><XDSVStack gap={2} hAlign="center">- {provider.logoUrl ? (- <img src={provider.logoUrl} width={48} height={48} alt="" />- ) : (- <XDSAvatar name={provider.name} size={48} />- )}+ <XDSAvatar name={provider.name} size={48} /><XDSText type="display-3" as="h2">Sign in with {provider.name}</XDSText>diff --git a/packages/cli/templates/pages/settings/page.tsx b/packages/cli/templates/pages/settings/page.tsxindex 7c93440744..57c7d42f9c 100644--- a/packages/cli/templates/pages/settings/page.tsx+++ b/packages/cli/templates/pages/settings/page.tsx@@ -111,7 +111,7 @@ export default function SettingsTemplate() {</XDSSection>}><XDSVStack gap={4}>- <XDSGrid columns={2} gap={10}>+ <XDSGrid minChildWidth={320} gap={10}><XDSVStack gap={1}><XDSHeading level={3}>Basic information</XDSHeading><XDSText type="supporting" color="secondary">@@ -147,7 +147,7 @@ export default function SettingsTemplate() {<XDSDivider />- <XDSGrid columns={2} gap={10}>+ <XDSGrid minChildWidth={320} gap={10}><XDSVStack gap={1}><XDSHeading level={3}>Change password</XDSHeading><XDSText type="supporting" color="secondary">@@ -181,7 +181,7 @@ export default function SettingsTemplate() {<XDSDivider />- <XDSGrid columns={2} gap={10}>+ <XDSGrid minChildWidth={320} gap={10}><XDSVStack gap={1}><XDSHeading level={3}>Advanced settings</XDSHeading><XDSText type="supporting" color="secondary">