Skip to content

Commit c47f185

Browse files
mfranciscDevtools
andauthored
fix(sandbox): some css updates (#752)
* css updates --------- Co-authored-by: Devtools <devtools@redhat.com>
1 parent ad7793e commit c47f185

8 files changed

Lines changed: 41 additions & 40 deletions

File tree

workspaces/sandbox/make/sandbox.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ start-rhdh-local: clone-rhdh-local generate-env
4343
yq e 'del(.services.rhdh.volumes[] | select(. == "./configs:/opt/app-root/src/configs:Z"))' -i compose.yaml && \
4444
yq e '.services.rhdh.ports = ["3000:3000"] | (.services.rhdh.ports) |= map(. style="double")' -i compose.yaml && \
4545
podman-compose up -d && \
46-
echo "UI is up and running at: localhost:3000"
46+
echo "UI is up and running at: http://localhost:3000"
4747

4848
.PHONY: stop-rhdh-local
4949
stop-rhdh-local:
5050
cd $(RHDH_LOCAL_DIR) && \
5151
podman-compose down -v && \
52-
rm -rf $(RHDH_LOCAL_DIR)
52+
rm -rf $(RHDH_LOCAL_DIR)

workspaces/sandbox/plugins/sandbox/src/api/RegistrationBackendClient.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ export class RegistrationBackendClient implements RegistrationService {
140140
});
141141

142142
if (!response.ok) {
143-
const error: CommonResponse = await response.json();
144-
throw new Error(error?.message);
143+
throw new Error(
144+
'Invalid phone number. Please verify the country code and number format, then try again.',
145+
);
145146
}
146147
};
147148

workspaces/sandbox/plugins/sandbox/src/components/Modals/AnsibleLaunchInfoModal.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,12 @@ export const AnsibleLaunchInfoModal: React.FC<AnsibleLaunchInfoModalProps> = ({
420420
fontWeight: 420,
421421
}}
422422
>
423-
While you wait, consider exploring the{' '}
424-
<Link to="#" underline="none">
425-
AAP documentation.
423+
New to Ansible Automation Platform? Get up to speed with our{' '}
424+
<Link to="http://red.ht/ansibledevsandboxpath" underline="none">
425+
introductory learning path.
426426
</Link>
427+
<OpenInNewIcon />
427428
</Typography>
428-
429-
<OpenInNewIcon />
430429
</div>
431430
<div
432431
style={{

workspaces/sandbox/plugins/sandbox/src/components/SandboxActivities/SandboxActivitiesGrid.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const FeaturedArticles: React.FC = () => {
2929
sx={{
3030
alignItems: 'center',
3131
justifyContent: 'space-between',
32-
padding: '36px 240px 48px 60px',
33-
backgroundColor: theme.palette.background.paper,
32+
padding: '36px 60px 48px 60px',
3433
}}
3534
>
3635
<Typography
@@ -58,8 +57,11 @@ const Articles: React.FC = () => {
5857
sx={{
5958
alignItems: 'center',
6059
justifyContent: 'space-between',
61-
padding: '36px 240px 48px 60px',
62-
backgroundColor: theme.palette.background.default,
60+
padding: '36px 60px 48px 60px',
61+
backgroundColor:
62+
theme.palette.mode === 'dark'
63+
? '#000000'
64+
: theme.palette.background.default,
6365
}}
6466
>
6567
<ItemCardGrid>

workspaces/sandbox/plugins/sandbox/src/components/SandboxCatalog/SandboxCatalogCardButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ export const SandboxCatalogCardButton: React.FC<
6868
}
6969

7070
const buttonSx = {
71-
border: `1px solid ${theme.palette.primary.main}`,
71+
border: `1px solid ${
72+
theme.palette.mode === 'dark' ? '#92c5f9' : theme.palette.primary.main
73+
}`,
7274
marginTop: theme.spacing(0.5),
7375
'&:hover': {
7476
backgroundColor: 'rgba(25, 118, 210, 0.04)',

workspaces/sandbox/plugins/sandbox/src/components/SandboxCatalog/SandboxCatalogGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export const SandboxCatalogGrid: React.FC = () => {
3232
};
3333

3434
return (
35-
<Grid container spacing={3} sx={{ maxWidth: '100%' }}>
35+
<Grid container spacing={2} sx={{ maxWidth: '100%' }}>
3636
{productData?.map(product => (
37-
<Grid item xs={12} sm="auto" md="auto" key={product.id}>
37+
<Grid item xs="auto" sm="auto" md="auto" lg="auto" key={product.id}>
3838
<Box sx={{ width: '330px', height: '372px' }}>
3939
<SandboxCatalogCard
4040
id={product.id}

workspaces/sandbox/plugins/sandbox/src/components/SandboxCatalog/SandboxCatalogPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ export const SandboxCatalogPage = () => {
3535
return (
3636
<SandboxProvider>
3737
<Page themeId="sandbox">
38-
<SandboxHeader pageTitle="Developer Sandbox" showSubTitle />
38+
<SandboxHeader pageTitle="Developer Sandbox" />
3939
<Content className={classes.content} noPadding>
4040
<SandboxCatalogBanner />
41-
<Box style={{ padding: '48px 60px 48px 60px' }}>
41+
<Box
42+
style={{
43+
padding: '48px 60px 48px 60px',
44+
}}
45+
>
4246
<SandboxCatalogGrid />
4347
</Box>
4448

workspaces/sandbox/plugins/sandbox/src/components/SandboxHeader.tsx

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,12 @@ import { Header, Link } from '@backstage/core-components';
2424

2525
interface SandboxHeaderProps {
2626
pageTitle: string;
27-
showSubTitle?: boolean;
2827
}
2928

30-
export const SandboxHeader: React.FC<SandboxHeaderProps> = ({
31-
pageTitle,
32-
showSubTitle,
33-
}) => {
29+
export const SandboxHeader: React.FC<SandboxHeaderProps> = ({ pageTitle }) => {
3430
const theme = useTheme();
3531
return (
3632
<Header
37-
pageTitleOverride={!showSubTitle ? 'Activities' : 'Home'}
3833
title={
3934
<Typography
4035
color="textPrimary"
@@ -48,22 +43,20 @@ export const SandboxHeader: React.FC<SandboxHeaderProps> = ({
4843
</Typography>
4944
}
5045
subtitle={
51-
showSubTitle && (
52-
<Typography variant="body1" color="textSecondary">
53-
powered by{' '}
54-
<Link
55-
to="https://developers.redhat.com/rhdh/overview"
56-
underline="none"
57-
>
58-
Red Hat Developer Hub{' '}
59-
</Link>
60-
<OpenInNewIcon
61-
fontSize="small"
62-
color="primary"
63-
sx={{ fontSize: '12px' }}
64-
/>
65-
</Typography>
66-
)
46+
<Typography variant="body1" color="textSecondary">
47+
powered by{' '}
48+
<Link
49+
to="https://developers.redhat.com/rhdh/overview"
50+
underline="none"
51+
>
52+
Red Hat Developer Hub{' '}
53+
</Link>
54+
<OpenInNewIcon
55+
fontSize="small"
56+
color="primary"
57+
sx={{ fontSize: '12px' }}
58+
/>
59+
</Typography>
6760
}
6861
style={{
6962
background: 'none',

0 commit comments

Comments
 (0)