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

Limit Global Styles: Add notice to newsletter onboarding #68841

Merged
merged 6 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* eslint-disable wpcalypso/jsx-classname-namespace */
import { isEnabled } from '@automattic/calypso-config';
import { Popover } from '@automattic/components';
import { useLocale } from '@automattic/i18n-utils';
import { hasMinContrast, RGB } from '@automattic/onboarding';
import { ColorPicker } from '@wordpress/components';
import { Icon } from '@wordpress/icons';
import { ColorPicker, Tooltip } from '@wordpress/components';
import { Icon, starFilled } from '@wordpress/icons';
import { useI18n } from '@wordpress/react-i18n';
import classNames from 'classnames';
import { Dispatch, SetStateAction, useState, useRef } from 'react';
import Badge from 'calypso/components/badge';
import FormFieldset from 'calypso/components/forms/form-fieldset';
import FormLabel from 'calypso/components/forms/form-label';
import FormInput from 'calypso/components/forms/form-text-input';
Expand Down Expand Up @@ -79,6 +81,20 @@ const AccentColorControl = ( { accentColor, setAccentColor }: AccentColorControl
{ hasTranslation( 'Favorite color' ) || locale === 'en'
? __( 'Favorite color' )
: __( 'Accent color' ) }
{ isEnabled( 'limit-global-styles' ) && (
mmtr marked this conversation as resolved.
Show resolved Hide resolved
<Tooltip
text={ __(
'Upgrade to a paid plan for color changes to take affect and to unlock all premium design tools'
Copy link
Member Author

Choose a reason for hiding this comment

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

We might want to replace "premium design tools" here with whatever feature name we finally give to Global Styles. See pdgrnI-1Ix-p2

) }
>
<span className="accent-color-control__premium-label">
<Badge type="info">
<Icon icon={ starFilled } size={ 18 } />
<span>{ __( 'Premium' ) }</span>
</Badge>
</span>
</Tooltip>
) }
</FormLabel>
<FormInput
inputRef={ accentColorRef }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@
width: unset !important;
}
}

.accent-color-control__premium-label {
position: relative;

.badge {
background-color: var(--color-neutral-80);
color: var(--color-neutral-0);
font-size: 0.75rem;
margin-left: 8px;
padding-left: 6px;
}

svg {
fill: var(--color-neutral-0);
vertical-align: top;
}
}
1 change: 1 addition & 0 deletions config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"layout/query-selected-editor": true,
"layout/support-article-dialog": true,
"legal-updates-banner": false,
"limit-global-styles": true,
"login/magic-login": true,
"logmein": true,
"mailchimp": true,
Expand Down