Skip to content

Commit 7a4d7e3

Browse files
committed
fix: now the hub presents Stack Overflow as plugin owner and the plugin version, added some tooltips too.
1 parent 2c0a6b5 commit 7a4d7e3

4 files changed

Lines changed: 73 additions & 19 deletions

File tree

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

app-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ stackoverflow:
1212
baseUrl: ${STACK_OVERFLOW_INSTANCE_URL}
1313
# Required only for Enteprise Tier.
1414

15-
teamName: ${STACK_OVERFLOW_TEAM_NAME}
15+
# teamName: ${STACK_OVERFLOW_TEAM_NAME}
1616
# Required only for Basic and Business Tiers.
1717

1818
apiAccessToken: ${STACK_OVERFLOW_API_ACCESS_TOKEN}

plugins/stack-overflow-teams/src/components/StackOverflow/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export { StackOverflowTags } from './StackOverflowTags'
33
export { StackOverflowUsers } from './StackOverflowUsers'
44
export { StackOverflowSearchResultListItem } from './StackOverflowSearchResultListItem'
55
export { StackOverflowPostQuestionModal } from './StackOverflowPostQuestionModal'
6+
export { StackOverflowMe } from './StackOverflowMe'
Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
11
import React from 'react';
2-
import { Typography, Grid, Box, Paper } from '@material-ui/core';
2+
import packageJson from '../../package.json'
3+
import { Typography, Grid, Box, Paper, Tooltip } from '@material-ui/core';
4+
import Help from '@material-ui/icons/Help';
5+
import QuestionAnswer from '@material-ui/icons/QuestionAnswer';
6+
import Person from '@material-ui/icons/Person';
7+
import LocalOffer from '@material-ui/icons/LocalOffer';
8+
import People from '@material-ui/icons/People';
39
import {
410
Header,
511
Page,
612
Content,
713
ContentHeader,
814
HeaderLabel,
9-
SupportButton,
1015
} from '@backstage/core-components';
1116
import {
1217
StackOverflowQuestions,
1318
StackOverflowTags,
1419
StackOverflowUsers,
20+
StackOverflowMe
1521
} from '../components/StackOverflow';
16-
import { StackOverflowMe } from '../components/StackOverflow/StackOverflowMe';
1722

1823
export const StackOverflowHub = () => (
1924
<Page themeId="plugin">
20-
<Header title="Welcome to Stack Overflow Teams!" subtitle="Your knowledge hub.">
21-
<HeaderLabel label="Owner" value="Team X" />
22-
<HeaderLabel label="Lifecycle" value="Alpha" />
25+
<Header title="Welcome to Stack Overflow Teams!" subtitle="Your team's collective knowledge at your fingertips.">
26+
<HeaderLabel label="Owner" value="Stack Overflow" />
27+
<HeaderLabel label="Plugin Version" value={`v${packageJson.version}`} />
2328
</Header>
2429
<Content>
25-
<ContentHeader title="Stack Overflow for Teams">
26-
<SupportButton>
27-
View a leaderboard of your Stack Overflow instance with top users,
28-
trending tags, and unanswered questions.
29-
</SupportButton>
30-
</ContentHeader>
30+
<ContentHeader title="Stack Overflow for Teams"/>
3131
<Grid container spacing={3}>
3232
{/* Main Questions Section */}
3333
<Grid item xs={12} md={8}>
3434
<Paper elevation={3}>
3535
<Box p={3}>
36-
<Typography variant="h5" gutterBottom>
37-
Stack Overflow Questions
38-
</Typography>
36+
<Box display="flex" justifyContent="space-between" alignItems="center">
37+
<Box display="flex" alignItems="center">
38+
<QuestionAnswer style={{ marginRight: 8 }} />
39+
<Typography variant="h5" gutterBottom>
40+
Questions
41+
</Typography>
42+
</Box>
43+
<Tooltip title="Browse and search through your team's questions.">
44+
45+
<Help />
46+
47+
</Tooltip>
48+
</Box>
3949
<Box mt={1}>
4050
<StackOverflowQuestions />
4151
</Box>
@@ -50,14 +60,42 @@ export const StackOverflowHub = () => (
5060
<Grid item xs={12}>
5161
<Paper elevation={3}>
5262
<Box p={3}>
53-
<StackOverflowMe />
63+
<Box display="flex" justifyContent="space-between" alignItems="flex-start" mb={2}>
64+
<Box flex={1}>
65+
<Box display="flex" alignItems="center" mb={2}>
66+
<Person style={{ marginRight: 8 }} />
67+
<Typography variant="h6">
68+
My Profile
69+
</Typography>
70+
</Box>
71+
<StackOverflowMe />
72+
</Box>
73+
<Tooltip title="Information from your Stack Overflow for Teams profile.">
74+
75+
<Help />
76+
77+
</Tooltip>
78+
</Box>
5479
</Box>
5580
</Paper>
5681
</Grid>
5782
{/* Tags Section */}
5883
<Grid item xs={12}>
5984
<Paper elevation={3}>
6085
<Box p={2}>
86+
<Box display="flex" justifyContent="space-between" alignItems="center" mb={1}>
87+
<Box display="flex" alignItems="center">
88+
<LocalOffer style={{ marginRight: 8 }} />
89+
<Typography variant="h6">
90+
Tags
91+
</Typography>
92+
</Box>
93+
<Tooltip title="Popular tags used in your team to categorize and organize questions">
94+
95+
<Help />
96+
97+
</Tooltip>
98+
</Box>
6199
<Box mt={1}>
62100
<StackOverflowTags />
63101
</Box>
@@ -71,7 +109,19 @@ export const StackOverflowHub = () => (
71109
<Grid item xs={12}>
72110
<Paper elevation={3}>
73111
<Box p={3}>
74-
112+
<Box display="flex" justifyContent="space-between" alignItems="center" mb={2}>
113+
<Box display="flex" alignItems="center">
114+
<People style={{ marginRight: 8 }} />
115+
<Typography variant="h5">
116+
Team Members
117+
</Typography>
118+
</Box>
119+
<Tooltip title="Team members, their role, reputation scores.">
120+
121+
<Help />
122+
123+
</Tooltip>
124+
</Box>
75125
<Box mt={2}>
76126
<StackOverflowUsers />
77127
</Box>
@@ -81,4 +131,4 @@ export const StackOverflowHub = () => (
81131
</Grid>
82132
</Content>
83133
</Page>
84-
);
134+
);

0 commit comments

Comments
 (0)