From 0bf2d5ebcd297392bad68b1a9a7d2a0f52da838c Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 16:05:50 -0700 Subject: [PATCH 01/13] Extract ApiKeyCount from state. --- public/app/features/api-keys/state/selectors.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/features/api-keys/state/selectors.ts b/public/app/features/api-keys/state/selectors.ts index 8065c252e85..789237ae9a3 100644 --- a/public/app/features/api-keys/state/selectors.ts +++ b/public/app/features/api-keys/state/selectors.ts @@ -1,5 +1,7 @@ import { ApiKeysState } from 'app/types'; +export const getApiKeysCount = (state: ApiKeysState) => state.keys.length; + export const getApiKeys = (state: ApiKeysState) => { const regex = RegExp(state.searchQuery, 'i'); From d2573a6bc88ea306710d529ebf65a41eceb7b948 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 16:07:54 -0700 Subject: [PATCH 02/13] Show CTA if there are no ApiKeys, otherwise show table. --- public/app/features/api-keys/ApiKeysPage.tsx | 231 ++++++++++--------- 1 file changed, 127 insertions(+), 104 deletions(-) diff --git a/public/app/features/api-keys/ApiKeysPage.tsx b/public/app/features/api-keys/ApiKeysPage.tsx index 6052b0f4fc8..ab5f8f2c8bc 100644 --- a/public/app/features/api-keys/ApiKeysPage.tsx +++ b/public/app/features/api-keys/ApiKeysPage.tsx @@ -1,10 +1,10 @@ -import React, { PureComponent } from 'react'; +import React, { PureComponent } from 'react'; import ReactDOMServer from 'react-dom/server'; import { connect } from 'react-redux'; import { hot } from 'react-hot-loader'; import { NavModel, ApiKey, NewApiKey, OrgRole } from 'app/types'; import { getNavModel } from 'app/core/selectors/navModel'; -import { getApiKeys } from './state/selectors'; +import { getApiKeys, getApiKeysCount } from './state/selectors'; import { loadApiKeys, deleteApiKey, setSearchQuery, addApiKey } from './state/actions'; import PageHeader from 'app/core/components/PageHeader/PageHeader'; import SlideDown from 'app/core/components/Animations/SlideDown'; @@ -12,6 +12,7 @@ import PageLoader from 'app/core/components/PageLoader/PageLoader'; import ApiKeysAddedModal from './ApiKeysAddedModal'; import config from 'app/core/config'; import appEvents from 'app/core/app_events'; +import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; export interface Props { navModel: NavModel; @@ -22,6 +23,7 @@ export interface Props { deleteApiKey: typeof deleteApiKey; setSearchQuery: typeof setSearchQuery; addApiKey: typeof addApiKey; + apiKeysCount: number; } export interface State { @@ -101,115 +103,135 @@ export class ApiKeysPage extends PureComponent { }); }; - renderTable() { - const { apiKeys } = this.props; + renderEmptyList() { + return ( +
+ +
+ ); + } - return [ -

- Existing Keys -

, - - - - - - - - {apiKeys.length > 0 && ( - - {apiKeys.map(key => { - return ( - - - - - - ); - })} - - )} -
NameRole -
{key.name}{key.role} - this.onDeleteApiKey(key)} className="btn btn-danger btn-mini"> - - -
, - ]; + renderApiKeyList() { + const { newApiKey, isAdding } = this.state; + const { apiKeys, searchQuery } = this.props; + + return ( +
+
+
+ +
+ +
+ +
+ + +
+ +
Add API Key
+
+
+
+ Key name + this.onApiKeyStateUpdate(evt, ApiKeyStateProps.Name)} + /> +
+
+ Role + + + +
+
+ +
+
+
+
+
+ +

Existing Keys

+ + + + + + + + {apiKeys.length > 0 ? ( + + {apiKeys.map(key => { + return ( + + + + + + ); + })} + + ) : null} +
NameRole +
{key.name}{key.role} + this.onDeleteApiKey(key)} className="btn btn-danger btn-mini"> + + +
+
+ ); } render() { - const { newApiKey, isAdding } = this.state; - const { hasFetched, navModel, searchQuery } = this.props; + const { hasFetched, navModel, apiKeysCount } = this.props; return (
-
-
-
- -
- -
- -
- - -
- -
Add API Key
-
-
-
- Key name - this.onApiKeyStateUpdate(evt, ApiKeyStateProps.Name)} - /> -
-
- Role - - - -
-
- -
-
-
-
-
- {hasFetched ? this.renderTable() : } -
+ {hasFetched ? + (apiKeysCount > 0 ? this.renderApiKeyList() : this.renderEmptyList()) + : }
); } @@ -220,7 +242,8 @@ function mapStateToProps(state) { navModel: getNavModel(state.navIndex, 'apikeys'), apiKeys: getApiKeys(state.apiKeys), searchQuery: state.apiKeys.searchQuery, - hasFetched: state.apiKeys.hasFetched, + apiKeysCount: getApiKeysCount(state.apiKeys), + hasFetched: state.apiKeys.hasFetched }; } From f03fa364dfb8321396a69882184aa01998907762 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 16:17:00 -0700 Subject: [PATCH 03/13] Update tests for ApiKeys CTA screen. --- .../features/api-keys/ApiKeysPage.test.tsx | 18 ++- .../__snapshots__/ApiKeysPage.test.tsx.snap | 147 ++---------------- 2 files changed, 27 insertions(+), 138 deletions(-) diff --git a/public/app/features/api-keys/ApiKeysPage.test.tsx b/public/app/features/api-keys/ApiKeysPage.test.tsx index 8bc6e9338fc..a6d0335b064 100644 --- a/public/app/features/api-keys/ApiKeysPage.test.tsx +++ b/public/app/features/api-keys/ApiKeysPage.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React from 'react'; import { shallow } from 'enzyme'; import { Props, ApiKeysPage } from './ApiKeysPage'; import { NavModel, ApiKey } from 'app/types'; @@ -14,6 +14,7 @@ const setup = (propOverrides?: object) => { deleteApiKey: jest.fn(), setSearchQuery: jest.fn(), addApiKey: jest.fn(), + apiKeysCount: 0, }; Object.assign(props, propOverrides); @@ -28,15 +29,20 @@ const setup = (propOverrides?: object) => { }; describe('Render', () => { - it('should render component', () => { - const { wrapper } = setup(); + it('should render API keys table if there are any keys', () => { + const { wrapper } = setup({ + apiKeys: getMultipleMockKeys(5), + apiKeysCount: 5, + }); + expect(wrapper).toMatchSnapshot(); }); - it('should render API keys table', () => { + it('should render CTA if theres are no API keys', () => { const { wrapper } = setup({ - apiKeys: getMultipleMockKeys(5), - hasFetched: true, + apiKeys: getMultipleMockKeys(0), + apiKeysCount: 0, + hasFetched: true, }); expect(wrapper).toMatchSnapshot(); diff --git a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap index b1cac8469be..923d0fec0e6 100644 --- a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap +++ b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Render should render API keys table 1`] = ` +exports[`Render should render API keys table if there are any keys 1`] = `
`; -exports[`Render should render component 1`] = ` +exports[`Render should render CTA if theres are no API keys 1`] = `
-
-
- -
-
- -
- -
- -
- Add API Key -
-
-
-
- - Key name - - -
-
- - Role - - - - -
-
- -
-
-
-
-
-
From 081cb7a6957747af8588acd373de133fb8270eba Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 16:21:47 -0700 Subject: [PATCH 04/13] Updated protip, not sure what to write there. --- public/app/features/api-keys/ApiKeysPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/api-keys/ApiKeysPage.tsx b/public/app/features/api-keys/ApiKeysPage.tsx index ab5f8f2c8bc..1430da03e50 100644 --- a/public/app/features/api-keys/ApiKeysPage.tsx +++ b/public/app/features/api-keys/ApiKeysPage.tsx @@ -112,7 +112,7 @@ export class ApiKeysPage extends PureComponent { buttonIcon: 'fa fa-plus', buttonLink: 'org/apikeys/new', buttonTitle: ' New API Key', - proTip: 'Assign folder and dashboard permissions to teams instead of users to ease administration.', + proTip: 'Remember you can provide view-only API access to other applications.', proTipLink: '', proTipLinkTitle: '', proTipTarget: '_blank', From af985743d23a7d09bd5eeff5e1e82b525ce20714 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 16:22:32 -0700 Subject: [PATCH 05/13] Updated tests for new protip. --- .../features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap index 923d0fec0e6..2d597244a02 100644 --- a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap +++ b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap @@ -284,7 +284,7 @@ exports[`Render should render CTA if theres are no API keys 1`] = ` "buttonIcon": "fa fa-plus", "buttonLink": "org/apikeys/new", "buttonTitle": " New API Key", - "proTip": "Assign folder and dashboard permissions to teams instead of users to ease administration.", + "proTip": "Remember you can provide view-only API access to other applications.", "proTipLink": "", "proTipLinkTitle": "", "proTipTarget": "_blank", From 0937335f1446ca367b9d1d9f7efbd5ca46a6be95 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 17:07:05 -0700 Subject: [PATCH 06/13] Add onClick handler to CTA. --- public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx | 1 + public/app/core/components/EmptyListCTA/EmptyListCTA.tsx | 3 ++- .../EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx index 4af60f3c839..ff92dc0d5c7 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx @@ -7,6 +7,7 @@ const model = { buttonIcon: 'ga css class', buttonLink: 'http://url/to/destination', buttonTitle: 'Click me', + onClick: 'handler', proTip: 'This is a tip', proTipLink: 'http://url/to/tip/destination', proTipLinkTitle: 'Learn more', diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx index 5ece360e36a..ae0e39cc26d 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx @@ -11,6 +11,7 @@ class EmptyListCTA extends Component { buttonIcon, buttonLink, buttonTitle, + onClick, proTip, proTipLink, proTipLinkTitle, @@ -19,7 +20,7 @@ class EmptyListCTA extends Component { return (
{title}
- + {buttonTitle} diff --git a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap index 6d47c984d5e..fc76544b112 100644 --- a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap +++ b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap @@ -12,6 +12,7 @@ exports[`EmptyListCTA renders correctly 1`] = ` Date: Wed, 10 Oct 2018 17:18:43 -0700 Subject: [PATCH 07/13] Add form to both the CTA page and the regular list. --- public/app/features/api-keys/ApiKeysPage.tsx | 100 ++++++++++-------- .../__snapshots__/ApiKeysPage.test.tsx.snap | 96 ++++++++++++++++- 2 files changed, 150 insertions(+), 46 deletions(-) diff --git a/public/app/features/api-keys/ApiKeysPage.tsx b/public/app/features/api-keys/ApiKeysPage.tsx index 1430da03e50..d6c83c2a566 100644 --- a/public/app/features/api-keys/ApiKeysPage.tsx +++ b/public/app/features/api-keys/ApiKeysPage.tsx @@ -110,7 +110,8 @@ export class ApiKeysPage extends PureComponent { model={{ title: "You haven't added any API Keys yet.", buttonIcon: 'fa fa-plus', - buttonLink: 'org/apikeys/new', + buttonLink: '#', + onClick: this.onToggleAdding, buttonTitle: ' New API Key', proTip: 'Remember you can provide view-only API access to other applications.', proTipLink: '', @@ -118,12 +119,63 @@ export class ApiKeysPage extends PureComponent { proTipTarget: '_blank', }} /> + {this.renderAddApiKeyForm()}
); } - renderApiKeyList() { + renderAddApiKeyForm() { const { newApiKey, isAdding } = this.state; + + return ( + +
+ +
Add API Key
+
+
+
+ Key name + this.onApiKeyStateUpdate(evt, ApiKeyStateProps.Name)} + /> +
+
+ Role + + + +
+
+ +
+
+
+
+
+ ); + } + + renderApiKeyList() { + const { isAdding } = this.state; const { apiKeys, searchQuery } = this.props; return ( @@ -148,49 +200,7 @@ export class ApiKeysPage extends PureComponent {
- -
- -
Add API Key
-
-
-
- Key name - this.onApiKeyStateUpdate(evt, ApiKeyStateProps.Name)} - /> -
-
- Role - - - -
-
- -
-
-
-
-
+ {this.renderAddApiKeyForm()}

Existing Keys

diff --git a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap index 2d597244a02..fcd22a14479 100644 --- a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap +++ b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap @@ -282,8 +282,9 @@ exports[`Render should render CTA if theres are no API keys 1`] = ` model={ Object { "buttonIcon": "fa fa-plus", - "buttonLink": "org/apikeys/new", + "buttonLink": "#", "buttonTitle": " New API Key", + "onClick": [Function], "proTip": "Remember you can provide view-only API access to other applications.", "proTipLink": "", "proTipLinkTitle": "", @@ -292,6 +293,99 @@ exports[`Render should render CTA if theres are no API keys 1`] = ` } } /> + +
+ +
+ Add API Key +
+
+
+
+ + Key name + + +
+
+ + Role + + + + +
+
+ +
+
+ +
+
`; From b12170010371a9c3e642ba7dae04357f3894a870 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Wed, 10 Oct 2018 17:22:48 -0700 Subject: [PATCH 08/13] Add fancy delete button for ApiKeys. --- public/app/features/api-keys/ApiKeysPage.tsx | 5 +- .../__snapshots__/ApiKeysPage.test.tsx.snap | 55 +++++-------------- 2 files changed, 17 insertions(+), 43 deletions(-) diff --git a/public/app/features/api-keys/ApiKeysPage.tsx b/public/app/features/api-keys/ApiKeysPage.tsx index d6c83c2a566..bd22d850f6d 100644 --- a/public/app/features/api-keys/ApiKeysPage.tsx +++ b/public/app/features/api-keys/ApiKeysPage.tsx @@ -13,6 +13,7 @@ import ApiKeysAddedModal from './ApiKeysAddedModal'; import config from 'app/core/config'; import appEvents from 'app/core/app_events'; import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; +import DeleteButton from 'app/core/components/DeleteButton/DeleteButton'; export interface Props { navModel: NavModel; @@ -219,9 +220,7 @@ export class ApiKeysPage extends PureComponent { ); diff --git a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap index fcd22a14479..6ea7fe57124 100644 --- a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap +++ b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap @@ -174,14 +174,9 @@ exports[`Render should render API keys table if there are any keys 1`] = ` Viewer From dc9e822cc7b95d7e6c4a109cd44fe5e3bd645ff4 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Thu, 11 Oct 2018 11:56:32 +0200 Subject: [PATCH 09/13] Remove CTA when CTA-action is clicked instead of a /new route #13471 --- .../core/components/Animations/SlideDown.tsx | 11 ++++-- .../features/api-keys/ApiKeysPage.test.tsx | 2 +- public/app/features/api-keys/ApiKeysPage.tsx | 34 +++++++++++-------- .../__snapshots__/ApiKeysPage.test.tsx.snap | 14 +++++++- 4 files changed, 41 insertions(+), 20 deletions(-) diff --git a/public/app/core/components/Animations/SlideDown.tsx b/public/app/core/components/Animations/SlideDown.tsx index 4d515f98f16..497af02ade9 100644 --- a/public/app/core/components/Animations/SlideDown.tsx +++ b/public/app/core/components/Animations/SlideDown.tsx @@ -1,15 +1,20 @@ import React from 'react'; import Transition from 'react-transition-group/Transition'; +interface Style { + transition?: string; + overflow?: string; +} + const defaultMaxHeight = '200px'; // When animating using max-height we need to use a static value. // If this is not enough, pass in - + {!isAdding && ( + + )} {this.renderAddApiKeyForm()} ); @@ -127,9 +130,10 @@ export class ApiKeysPage extends PureComponent { renderAddApiKeyForm() { const { newApiKey, isAdding } = this.state; + const slideDownStyle = isAdding ? slideDownDefaultStyle : { ...slideDownDefaultStyle, transition: 'unset' }; return ( - +
`; -exports[`Render should render CTA if theres are no API keys 1`] = ` +exports[`Render should render CTA if there are no API keys 1`] = `
Date: Thu, 11 Oct 2018 14:01:13 +0200 Subject: [PATCH 10/13] Update snapshots after merge --- .../features/api-keys/ApiKeysPage.test.tsx | 2 +- .../__snapshots__/ApiKeysPage.test.tsx.snap | 246 +----------------- 2 files changed, 4 insertions(+), 244 deletions(-) diff --git a/public/app/features/api-keys/ApiKeysPage.test.tsx b/public/app/features/api-keys/ApiKeysPage.test.tsx index 42912fc9d96..54200234ddc 100644 --- a/public/app/features/api-keys/ApiKeysPage.test.tsx +++ b/public/app/features/api-keys/ApiKeysPage.test.tsx @@ -42,7 +42,7 @@ describe('Render', () => { const { wrapper } = setup({ apiKeys: getMultipleMockKeys(0), apiKeysCount: 0, - hasFetched: true, + hasFetched: true, }); expect(wrapper).toMatchSnapshot(); diff --git a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap index 375ed788e27..63b92a16ee0 100644 --- a/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap +++ b/public/app/features/api-keys/__snapshots__/ApiKeysPage.test.tsx.snap @@ -5,249 +5,9 @@ exports[`Render should render API keys table if there are any keys 1`] = ` -
-
-
- -
-
- -
- -
- -
- Add API Key -
-
-
-
- - Key name - - -
-
- - Role - - - - -
-
- -
-
- -
-
-

- Existing Keys -

-
{key.name} {key.role} - this.onDeleteApiKey(key)} className="btn btn-danger btn-mini"> - - + this.onDeleteApiKey(key)} />
- - - +
- - - +
- - - +
- - - +
- - - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Name - - Role - -
- test-1 - - Viewer - - -
- test-2 - - Viewer - - -
- test-3 - - Viewer - - -
- test-4 - - Viewer - - -
- test-5 - - Viewer - - -
-
+
`; From bb227d5c3a2f2288c74640323ea14b5ce516fc99 Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Fri, 26 Oct 2018 10:12:27 -0700 Subject: [PATCH 11/13] Use jest.fn instead of string. --- public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx index ff92dc0d5c7..21700bb4d03 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.test.tsx @@ -7,7 +7,7 @@ const model = { buttonIcon: 'ga css class', buttonLink: 'http://url/to/destination', buttonTitle: 'Click me', - onClick: 'handler', + onClick: jest.fn(), proTip: 'This is a tip', proTipLink: 'http://url/to/tip/destination', proTipLinkTitle: 'Learn more', From 35688b223a2ae0ef09e04c0091d6c8c3171ff29c Mon Sep 17 00:00:00 2001 From: Carlos Mondragon Date: Fri, 26 Oct 2018 10:20:03 -0700 Subject: [PATCH 12/13] Update snapshots. --- .../EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap index fc76544b112..b85660bcc6f 100644 --- a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap +++ b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.test.tsx.snap @@ -12,7 +12,7 @@ exports[`EmptyListCTA renders correctly 1`] = ` Date: Wed, 31 Oct 2018 12:50:44 +0100 Subject: [PATCH 13/13] restored transition --- .../core/components/Animations/SlideDown.tsx | 6 ++++-- public/app/features/api-keys/ApiKeysPage.tsx | 20 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/public/app/core/components/Animations/SlideDown.tsx b/public/app/core/components/Animations/SlideDown.tsx index 497af02ade9..70dacd73849 100644 --- a/public/app/core/components/Animations/SlideDown.tsx +++ b/public/app/core/components/Animations/SlideDown.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React from 'react'; import Transition from 'react-transition-group/Transition'; interface Style { @@ -6,9 +6,11 @@ interface Style { overflow?: string; } -const defaultMaxHeight = '200px'; // When animating using max-height we need to use a static value. +// When animating using max-height we need to use a static value. // If this is not enough, pass in