Skip to content

Commit

Permalink
Remove domains/dns-records-redesign feature flag (Automattic#59160)
Browse files Browse the repository at this point in the history
  • Loading branch information
delputnam authored Dec 15, 2021
1 parent 98cf6d2 commit df45a76
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 36 deletions.
8 changes: 1 addition & 7 deletions client/my-sites/domains/domain-management/controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,11 @@ export default {
},

domainManagementDns( pageContext, next ) {
let component = DomainManagement.Dns;

if ( config.isEnabled( 'domains/dns-records-redesign' ) ) {
component = DomainManagement.DnsRecords;
}

pageContext.primary = (
<DomainManagementData
analyticsPath={ domainManagementDns( ':site', ':domain' ) }
analyticsTitle="Domain Management > Name Servers and DNS > DNS Records"
component={ component }
component={ DomainManagement.DnsRecords }
context={ pageContext }
selectedDomainName={ pageContext.params.domain }
/>
Expand Down
12 changes: 3 additions & 9 deletions client/my-sites/domains/domain-management/dns/dns-add-new.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import { localize } from 'i18n-calypso';
import { includes, find, flatMap } from 'lodash';
import page from 'page';
Expand Down Expand Up @@ -184,9 +183,6 @@ class DnsAddNew extends React.Component {
formState.getAllFieldValues( this.state.fields ),
selectedDomainName
);
if ( ! config.isEnabled( 'domains/dns-records-redesign' ) ) {
this.formStateController.resetFields( this.getFieldsForType( this.state.type ) );
}

if ( recordToEdit ) {
this.props.updateDns( selectedDomainName, [ normalizedData ], [ recordToEdit ] ).then(
Expand Down Expand Up @@ -287,11 +283,9 @@ class DnsAddNew extends React.Component {
{ buttonLabel }
</FormButton>

{ config.isEnabled( 'domains/dns-records-redesign' ) && (
<FormButton isPrimary={ false } type="button" onClick={ this.props.goBack }>
{ translate( 'Cancel' ) }
</FormButton>
) }
<FormButton isPrimary={ false } type="button" onClick={ this.props.goBack }>
{ translate( 'Cancel' ) }
</FormButton>
</div>
</form>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class DnsRecords extends Component {

const mobileButtons = [
<DnsAddNewRecordButton
key="mobile-add-new-record-button"
site={ selectedSite.slug }
domain={ selectedDomainName }
isMobile={ true }
Expand Down
14 changes: 7 additions & 7 deletions client/my-sites/domains/domain-management/dns/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import { CompactCard as Card } from '@automattic/components';
import { localize } from 'i18n-calypso';
import { some } from 'lodash';
Expand Down Expand Up @@ -101,8 +100,13 @@ class Dns extends Component {
};

const buttons = [
<DnsAddNewRecordButton site={ selectedSite.slug } domain={ selectedDomainName } />,
<DnsAddNewRecordButton
key="add-new-record-button"
site={ selectedSite.slug }
domain={ selectedDomainName }
/>,
<DnsMenuOptionsButton
key="menu-options-button"
domain={ selectedDomainName }
onSuccess={ this.onRestoreSuccess }
onError={ this.onRestoreError }
Expand All @@ -120,11 +124,7 @@ class Dns extends Component {
}

renderPlaceholder() {
return config.isEnabled( 'domains/dns-records-redesign' ) ? (
<DomainMainPlaceholder breadcrumbs={ this.renderBreadcrumbs } />
) : (
<DomainMainPlaceholder goBack={ this.goBack } />
);
<DomainMainPlaceholder breadcrumbs={ this.renderBreadcrumbs } />;
}

renderMain() {
Expand Down
16 changes: 4 additions & 12 deletions client/my-sites/domains/domain-management/name-servers/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import classNames from 'classnames';
import { localize } from 'i18n-calypso';
import { get, isEmpty } from 'lodash';
Expand Down Expand Up @@ -35,7 +34,6 @@ import {
CLOUDFLARE_NAMESERVERS_REGEX,
} from './constants';
import CustomNameserversForm from './custom-nameservers-form';
import DnsTemplates from './dns-templates';
import FetchError from './fetch-error';
import withDomainNameservers from './with-domain-nameservers';
import WpcomNameserversToggle from './wpcom-nameservers-toggle';
Expand Down Expand Up @@ -163,13 +161,9 @@ class NameServers extends Component {
</VerticalNav>

<VerticalNav>
{ this.hasWpcomNameservers() &&
! this.isPendingTransfer() &&
( config.isEnabled( 'domains/dns-records-redesign' ) ? (
<EmailSetup selectedDomainName={ this.props.selectedDomainName } />
) : (
<DnsTemplates selectedDomainName={ this.props.selectedDomainName } />
) ) }
{ this.hasWpcomNameservers() && ! this.isPendingTransfer() && (
<EmailSetup selectedDomainName={ this.props.selectedDomainName } />
) }
</VerticalNav>
</Fragment>
);
Expand All @@ -182,9 +176,7 @@ class NameServers extends Component {

return (
<Main wideLayout className={ classes }>
{ config.isEnabled( 'domains/dns-records-redesign' )
? this.renderBreadcrumbs()
: this.header() }
{ this.renderBreadcrumbs() }
{ this.getContent() }
</Main>
);
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"domains/premium-domain-purchases": true,
"domains/management-list-redesign": true,
"domains/settings-page-redesign": true,
"domains/dns-records-redesign": true,
"domains/contact-info-redesign": true,
"email-accounts/enabled": true,
"external-media": true,
Expand Down

0 comments on commit df45a76

Please sign in to comment.