From 584a9cd94210266afd03fd29561ef69c32a6df43 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Thu, 9 Aug 2018 11:05:20 +0200 Subject: [PATCH 1/4] [wip]added empty list cta to team list, if statement toggles view for when the list is empty or not --- public/app/containers/Teams/TeamList.tsx | 105 +++++++++++++++-------- 1 file changed, 68 insertions(+), 37 deletions(-) diff --git a/public/app/containers/Teams/TeamList.tsx b/public/app/containers/Teams/TeamList.tsx index 31406250cb3..c8331e5c8b0 100644 --- a/public/app/containers/Teams/TeamList.tsx +++ b/public/app/containers/Teams/TeamList.tsx @@ -61,48 +61,79 @@ export class TeamList extends React.Component { ); } + renderTeamList(teams) { + return ( +
+
+
+ +
+ + + +
+ + + + + + + + + {teams.filteredTeams.map(team => this.renderTeamMember(team))} +
+ NameEmailMembers +
+
+
+ ); + } + + renderEmptyList() { + return ( +
+
+
There are no Teams defiened yet
+ + New team + +
+ ProTip: Something something.{' '} + Link +
+
+
+ ); + } + render() { const { nav, teams } = this.props; + let view; + + if (teams.filteredTeams.length > 0) { + view = this.renderTeamList(teams); + } else { + view = this.renderEmptyList(); + } + return (
-
-
-
- -
- - - -
- - - - - - - - - {teams.filteredTeams.map(team => this.renderTeamMember(team))} -
- NameEmailMembers -
-
-
+ {view}
); } From 1d1370d11dadc33367929a4e312242682c44cd3e Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 10 Aug 2018 08:27:22 +0200 Subject: [PATCH 2/4] changed messaging --- public/app/containers/Teams/TeamList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/containers/Teams/TeamList.tsx b/public/app/containers/Teams/TeamList.tsx index c8331e5c8b0..52dc28a1f95 100644 --- a/public/app/containers/Teams/TeamList.tsx +++ b/public/app/containers/Teams/TeamList.tsx @@ -107,7 +107,7 @@ export class TeamList extends React.Component { return (
-
There are no Teams defiened yet
+
You haven't created any teams yet.
New team From 277c73581482c49985e10cbff8fe5b9bd6670046 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 10 Aug 2018 11:31:35 +0200 Subject: [PATCH 3/4] replaced with EmptyListCta --- public/app/containers/Teams/TeamList.tsx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/public/app/containers/Teams/TeamList.tsx b/public/app/containers/Teams/TeamList.tsx index 52dc28a1f95..06b2d20245f 100644 --- a/public/app/containers/Teams/TeamList.tsx +++ b/public/app/containers/Teams/TeamList.tsx @@ -6,6 +6,7 @@ import { NavStore } from 'app/stores/NavStore/NavStore'; import { TeamsStore, ITeam } from 'app/stores/TeamsStore/TeamsStore'; import { BackendSrv } from 'app/core/services/backend_srv'; import DeleteButton from 'app/core/components/DeleteButton/DeleteButton'; +import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; interface Props { nav: typeof NavStore.Type; @@ -106,16 +107,18 @@ export class TeamList extends React.Component { renderEmptyList() { return (
-
-
You haven't created any teams yet.
- - New team - -
- ProTip: Something something.{' '} - Link -
-
+
); } From 6832b807352ba004b5eef9f3588d700a1ad2bd59 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Thu, 30 Aug 2018 15:02:20 +0200 Subject: [PATCH 4/4] added pro-tip text, removed pro-tip link --- public/app/containers/Teams/TeamList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/containers/Teams/TeamList.tsx b/public/app/containers/Teams/TeamList.tsx index 06b2d20245f..274de170b3c 100644 --- a/public/app/containers/Teams/TeamList.tsx +++ b/public/app/containers/Teams/TeamList.tsx @@ -113,9 +113,9 @@ export class TeamList extends React.Component { buttonIcon: 'fa fa-plus', buttonLink: 'org/teams/new', buttonTitle: ' New team', - proTip: 'Something something.', - proTipLink: '#', - proTipLinkTitle: 'Learn more', + proTip: 'Assign folder and dashboard permissions to teams instead of users to ease administration.', + proTipLink: '', + proTipLinkTitle: '', proTipTarget: '_blank', }} />