Skip to content

Commit 6a561e2

Browse files
feat(extensions): plugin side drawer UX improvements (#1377)
- Make verified and certified icons smaller for better visual hierarchy - Add proper padding, bullet points, and spacing to the Highlights section - Apply medium-weight text and proper padding to the About section title - Style Links section title consistently with About section - Reduce size of external link icons and improve alignment Fixes RHIDP-8302
1 parent 67e9f96 commit 6a561e2

File tree

5 files changed

+59
-16
lines changed

5 files changed

+59
-16
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-marketplace': patch
3+
---
4+
5+
Plugin side drawer UX improvements:
6+
7+
- Made verified and certified icons smaller for better visual hierarchy
8+
- Added proper padding, bullet points, and spacing to the Highlights section
9+
- Applied medium-weight text and proper padding to the About section title
10+
- Styled Links section title consistently with About section
11+
- Reduced size of external link icons and improved alignment

workspaces/marketplace/plugins/marketplace/src/components/Badges.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const BadgeChip = ({ plugin }: { plugin: MarketplacePlugin }) => {
8282
avatar={<TaskAltIcon style={{ color: options.color }} />}
8383
label={options.label}
8484
variant="outlined"
85+
size="small"
8586
/>
8687
);
8788
};

workspaces/marketplace/plugins/marketplace/src/components/Links.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import { Link } from '@backstage/core-components';
1818

1919
import Typography from '@mui/material/Typography';
20+
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
2021

2122
import {
2223
MarketplaceCollection,
@@ -37,14 +38,21 @@ export const Links = ({
3738

3839
return (
3940
<div>
40-
<Typography variant="h5" sx={{ pt: 2 }}>
41+
<Typography
42+
variant="h6"
43+
component="h3"
44+
sx={{ fontWeight: 500, fontSize: '1rem', mb: 0.5 }}
45+
>
4146
Links
4247
</Typography>
43-
<ul>
48+
<ul style={{ paddingLeft: '20px' }}>
4449
{links.map(link => (
45-
<li key={link.url}>
46-
<Link to={link.url} externalLinkIcon>
47-
{link.title ?? link.url}
50+
<li key={link.url} style={{ marginBottom: '8px' }}>
51+
<Link to={link.url}>
52+
{link.title ?? link.url}{' '}
53+
<OpenInNewIcon
54+
sx={{ fontSize: '1rem', verticalAlign: 'middle' }}
55+
/>
4856
</Link>
4957
</li>
5058
))}

workspaces/marketplace/plugins/marketplace/src/components/Markdown.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useEffect } from 'react';
1818

1919
import { MarkdownContent } from '@backstage/core-components';
2020
import { useTheme } from '@mui/material/styles';
21+
import Box from '@mui/material/Box';
2122

2223
export interface MarkdownProps {
2324
title?: string;
@@ -50,7 +51,7 @@ export const Markdown = (props: MarkdownProps) => {
5051
const theme = useTheme();
5152
let content = props.content ?? '**no description provided**';
5253
if (props.title && !content.startsWith('# ')) {
53-
content = `# ${props.title}\n\n${content}`;
54+
content = `## ${props.title}\n\n${content}`;
5455
}
5556

5657
// TODO load images from marketplace assets endpoint ???
@@ -100,11 +101,22 @@ export const Markdown = (props: MarkdownProps) => {
100101
}, [content, theme.palette.text.secondary]);
101102

102103
return (
103-
<MarkdownContent
104-
content={content}
105-
dialect="gfm"
106-
linkTarget="_blank"
107-
transformImageUri={transformImageUri}
108-
/>
104+
<Box
105+
sx={{
106+
'& h2': {
107+
fontWeight: 500,
108+
fontSize: '1rem',
109+
marginTop: 0,
110+
marginBottom: '8px',
111+
},
112+
}}
113+
>
114+
<MarkdownContent
115+
content={content}
116+
dialect="gfm"
117+
linkTarget="_blank"
118+
transformImageUri={transformImageUri}
119+
/>
120+
</Box>
109121
);
110122
};

workspaces/marketplace/plugins/marketplace/src/components/MarketplacePluginContent.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const columns: TableColumn<MarketplacePackage>[] = [
126126
title: 'Package name',
127127
field: 'spec.packageName',
128128
type: 'string',
129+
width: '40%',
129130
},
130131
{
131132
title: 'Version',
@@ -175,7 +176,11 @@ const PluginPackageTable = ({ plugin }: { plugin: MarketplacePlugin }) => {
175176

176177
return (
177178
<div>
178-
<Typography variant="h5" sx={{ pt: 2 }}>
179+
<Typography
180+
variant="h6"
181+
component="h3"
182+
sx={{ fontWeight: 500, fontSize: '1rem', mb: 0.5, pt: 2 }}
183+
>
179184
Versions
180185
</Typography>
181186
<Table
@@ -466,12 +471,18 @@ export const MarketplacePluginContent = ({
466471
<Grid item md={3}>
467472
{highlights.length > 0 ? (
468473
<>
469-
<Typography variant="subtitle1" sx={{ fontWeight: 'bold' }}>
474+
<Typography
475+
variant="h6"
476+
component="h3"
477+
sx={{ fontWeight: 500, fontSize: '1rem', mb: 0.5 }}
478+
>
470479
Highlights
471480
</Typography>
472-
<ul>
481+
<ul style={{ paddingLeft: '20px', marginBottom: '24px' }}>
473482
{highlights.map(highlight => (
474-
<li key={highlight}>{highlight}</li>
483+
<li key={highlight} style={{ marginBottom: '8px' }}>
484+
{highlight}
485+
</li>
475486
))}
476487
</ul>
477488
</>

0 commit comments

Comments
 (0)