Skip to content

Commit

Permalink
Add InlineSupportLink to nav unification toggle (#50794)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldcain authored Mar 5, 2021
1 parent 1b3ff1b commit f2c4b45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions client/me/account/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Main from 'calypso/components/main';
import SitesDropdown from 'calypso/components/sites-dropdown';
import ColorSchemePicker from 'calypso/blocks/color-scheme-picker';
import { successNotice, errorNotice, removeNotice } from 'calypso/state/notices/actions';
import { getLanguage, isLocaleVariant, canBeTranslated } from 'calypso/lib/i18n-utils';
import { getLanguage, isLocaleVariant, canBeTranslated, localizeUrl } from 'calypso/lib/i18n-utils';
import isRequestingMissingSites from 'calypso/state/selectors/is-requesting-missing-sites';
import getOnboardingUrl from 'calypso/state/selectors/get-onboarding-url';
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker';
Expand Down Expand Up @@ -72,6 +72,7 @@ import getUnsavedUserSettings from 'calypso/state/selectors/get-unsaved-user-set
import isPendingEmailChange from 'calypso/state/selectors/is-pending-email-change';
import QueryUserSettings from 'calypso/components/data/query-user-settings';
import isNavUnificationEnabled from 'calypso/state/selectors/is-nav-unification-enabled';
import InlineSupportLink from 'calypso/components/inline-support-link';

export const noticeId = 'me-settings-notice';
const noticeOptions = {
Expand Down Expand Up @@ -1068,11 +1069,17 @@ class Account extends React.Component {
'{{spanlead}}Show advanced dashboard pages.{{/spanlead}} {{spanextra}}Enabling this will replace your dashboard pages with more advanced wp-admin equivalents when possible.{{/spanextra}}',
{
components: {
spanlead: <span className="account__link-destination-label-lead" />,
spanlead: <strong className="account__link-destination-label-lead" />,
spanextra: <span className="account__link-destination-label-extra" />,
},
}
) }
<InlineSupportLink
supportPostId={ 80368 }
supportLink={ localizeUrl(
'https://wordpress.com/support/account-settings/#dashboard-appearance'
) }
/>
</FormToggle>
</FormFieldset>
) }
Expand Down
6 changes: 5 additions & 1 deletion client/me/account/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
.components-toggle-control__label {
color: var( --color-text-subtle );

span {
strong {
display: block;
}
}
Expand All @@ -46,5 +46,9 @@
font-style: italic;
margin-top: 0.1em;
}

.inline-support-link {
margin-left: 4px;
}
}

0 comments on commit f2c4b45

Please sign in to comment.