Skip to content

Commit 24cf70a

Browse files
Revert "Domains: Add domains management list breadcrumbs (#57082)" (#57371)
This reverts commit 776cd56.
1 parent d679111 commit 24cf70a

File tree

5 files changed

+20
-115
lines changed

5 files changed

+20
-115
lines changed

client/my-sites/domains/domain-management/components/breadcrumbs/style.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
@import '@wordpress/base-styles/mixins';
33

44
.breadcrumbs {
5-
position: relative;
65
margin: 0;
76

87
@include break-mobile {
9-
position: sticky;
10-
top: -44px;
118
/* hack to make the breadcrumbs closer to the top of the content area */
129
margin-top: -44px;
1310
}
@@ -18,10 +15,6 @@
1815
align-items: center;
1916
justify-content: space-between;
2017
padding: 16px;
21-
22-
@include break-mobile {
23-
padding: 16px 0;
24-
}
2518
}
2619

2720
.breadcrumbs__bottom-border {
@@ -59,11 +52,6 @@
5952
& a {
6053
color: var( --color-neutral-50 );
6154
}
62-
& span:first-child {
63-
font-size: $font-body;
64-
font-weight: 600;
65-
color: var( --color-neutral-80 );
66-
}
6755

6856
@include break-mobile {
6957
display: none;

client/my-sites/domains/domain-management/list/options-domain-button.jsx

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { recordTracksEvent } from '@automattic/calypso-analytics';
2-
import config from '@automattic/calypso-config';
32
import { Button, Gridicon } from '@automattic/components';
43
import { localize } from 'i18n-calypso';
54
import page from 'page';
@@ -21,12 +20,10 @@ class AddDomainButton extends Component {
2120
static propTypes = {
2221
selectedSiteSlug: PropTypes.string,
2322
specificSiteActions: PropTypes.bool,
24-
ellipsisButton: PropTypes.bool,
2523
};
2624

2725
static defaultProps = {
2826
specificSiteActions: false,
29-
ellipsisButton: false,
3027
};
3128

3229
state = {
@@ -64,10 +61,10 @@ class AddDomainButton extends Component {
6461
const useYourDomainUrl = domainUseMyDomain( this.props.selectedSiteSlug );
6562
return (
6663
<Fragment>
67-
<PopoverMenuItem icon="search" onClick={ this.clickAddDomain }>
64+
<PopoverMenuItem onClick={ this.clickAddDomain }>
6865
{ translate( 'Search for a domain' ) }
6966
</PopoverMenuItem>
70-
<PopoverMenuItem icon="domains" href={ useYourDomainUrl } onClick={ this.trackMenuClick }>
67+
<PopoverMenuItem href={ useYourDomainUrl } onClick={ this.trackMenuClick }>
7168
{ translate( 'Use a domain I own' ) }
7269
</PopoverMenuItem>
7370
</Fragment>
@@ -76,66 +73,40 @@ class AddDomainButton extends Component {
7673

7774
return (
7875
<Fragment>
79-
{ ! config.isEnabled( 'domains/management-list-redesign' ) && (
80-
<PopoverMenuItem href={ domainManagementAllRoot() } onClick={ this.trackMenuClick }>
81-
{ translate( 'Manage all domains' ) }
82-
</PopoverMenuItem>
83-
) }
84-
<PopoverMenuItem icon="plus" href="/new" onClick={ this.trackMenuClick }>
76+
<PopoverMenuItem href={ domainManagementAllRoot() } onClick={ this.trackMenuClick }>
77+
{ translate( 'Manage all domains' ) }
78+
</PopoverMenuItem>
79+
<PopoverMenuItem href="/new" onClick={ this.trackMenuClick }>
8580
{ translate( 'Add a domain to a new site' ) }
8681
</PopoverMenuItem>
87-
<PopoverMenuItem icon="create" href="/domains/add" onClick={ this.trackMenuClick }>
82+
<PopoverMenuItem href="/domains/add" onClick={ this.trackMenuClick }>
8883
{ translate( 'Add a domain to a different site' ) }
8984
</PopoverMenuItem>
90-
<PopoverMenuItem icon="domains" href="/start/domain" onClick={ this.trackMenuClick }>
85+
<PopoverMenuItem href="/start/domain" onClick={ this.trackMenuClick }>
9186
{ translate( 'Add a domain without a site' ) }
9287
</PopoverMenuItem>
9388
</Fragment>
9489
);
9590
};
9691

97-
getDesktopViewLabel() {
92+
render() {
9893
const { translate } = this.props;
9994

100-
if ( this.props.ellipsisButton ) {
101-
return <Gridicon icon="ellipsis" className="options-domain-button__ellipsis" />;
102-
}
103-
104-
if ( this.props.specificSiteActions ) {
105-
if ( config.isEnabled( 'domains/management-list-redesign' ) ) {
106-
return translate( 'Add a domain' );
107-
}
108-
return translate( 'Add a domain to this site' );
109-
}
110-
return translate( 'Other domain options' );
111-
}
112-
113-
render() {
114-
const { specificSiteActions, ellipsisButton } = this.props;
95+
const label = this.props.specificSiteActions
96+
? translate( 'Add a domain to this site' )
97+
: translate( 'Other domain options' );
11598

11699
return (
117100
<Fragment>
118101
<Button
119-
primary={ specificSiteActions }
102+
primary={ this.props.specificSiteActions }
120103
compact
121104
className="options-domain-button"
122105
onClick={ this.toggleAddMenu }
123106
ref={ this.addDomainButtonRef }
124107
>
125-
{ this.getDesktopViewLabel() }
126-
{ ! ellipsisButton && <Gridicon icon="chevron-down" /> }
127-
</Button>
128-
<Button
129-
primary={ specificSiteActions }
130-
className="options-domain-button options-domain-button__mobile"
131-
onClick={ this.toggleAddMenu }
132-
ref={ this.addDomainButtonRef }
133-
borderless={ ellipsisButton }
134-
>
135-
{ ! ellipsisButton && <Gridicon icon="plus" /> }
136-
{ ellipsisButton && (
137-
<Gridicon icon="ellipsis" className="options-domain-button__ellipsis" />
138-
) }
108+
{ label }
109+
<Gridicon icon="chevron-down" />
139110
</Button>
140111
<PopoverMenu
141112
className="options-domain-button__popover"
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
@import '@wordpress/base-styles/breakpoints';
2-
@import '@wordpress/base-styles/mixins';
3-
4-
.options-domain-button,
5-
.options-domain-button__mobile {
6-
display: none;
1+
.options-domain-button {
2+
& > .gridicon {
3+
margin-left: 5px;
4+
}
75

86
&__popover {
97
margin-top: 5px;
108
}
11-
12-
@include break-mobile {
13-
display: inline;
14-
15-
& > .gridicon {
16-
margin-left: 5px;
17-
}
18-
}
19-
}
20-
21-
.options-domain-button__mobile {
22-
display: initial;
23-
@include break-mobile {
24-
display: none;
25-
}
26-
}
9+
}

client/my-sites/domains/domain-management/list/site-domains.jsx

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import BodySectionCssClass from 'calypso/layout/body-section-css-class';
1818
import { type } from 'calypso/lib/domains/constants';
1919
import HeaderCart from 'calypso/my-sites/checkout/cart/header-cart';
2020
import DomainWarnings from 'calypso/my-sites/domains/components/domain-warnings';
21-
import Breadcrumbs from 'calypso/my-sites/domains/domain-management/components/breadcrumbs';
2221
import EmptyDomainsListCard from 'calypso/my-sites/domains/domain-management/list/empty-domains-list-card';
2322
import OptionsDomainButton from 'calypso/my-sites/domains/domain-management/list/options-domain-button';
2423
import WpcomDomainItem from 'calypso/my-sites/domains/domain-management/list/wpcom-domain-item';
@@ -186,35 +185,6 @@ export class SiteDomains extends Component {
186185
);
187186
}
188187

189-
renderBreadcrumbs() {
190-
const { translate } = this.props;
191-
192-
const item = {
193-
label: translate( 'Domains' ),
194-
helpBubble: translate(
195-
'Manage the domains connected to your site. {{learnMoreLink}}Learn more{{/learnMoreLink}}.',
196-
{
197-
components: {
198-
learnMoreLink: <InlineSupportLink supportContext="domains" showIcon={ false } />,
199-
},
200-
}
201-
),
202-
};
203-
const buttons = [
204-
<OptionsDomainButton key="breadcrumb_button_1" specificSiteActions />,
205-
<OptionsDomainButton key="breadcrumb_button_2" ellipsisButton />,
206-
];
207-
208-
return (
209-
<Breadcrumbs
210-
items={ [ item ] }
211-
mobileItem={ item }
212-
buttons={ buttons }
213-
mobileButtons={ buttons }
214-
/>
215-
);
216-
}
217-
218188
render() {
219189
if ( ! this.props.userCanManageOptions ) {
220190
if ( this.props.renderAllSites ) {
@@ -264,7 +234,6 @@ export class SiteDomains extends Component {
264234
return (
265235
<Main wideLayout>
266236
<BodySectionCssClass bodyClass={ [ 'edit__body-white' ] } />
267-
{ this.renderBreadcrumbs() }
268237
<DocumentHead title={ headerText } />
269238
<SidebarNavigation />
270239
{ this.renderNewDesign() }

client/my-sites/domains/domain-management/list/style.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
@import '@wordpress/base-styles/breakpoints';
33
@import '@wordpress/base-styles/mixins';
44

5-
.breadcrumbs svg.options-domain-button__ellipsis {
6-
transform: rotate( 90deg ) translateX( -2px );
7-
height: 14px;
8-
margin-left: 0;
9-
}
10-
115
.domain-management-list__notice {
126
margin-bottom: 0;
137
}

0 commit comments

Comments
 (0)