Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [M3-7298] - Improve Footer Styles #9823

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9823-fixed-1697820563300.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Footer styles on small viewports ([#9823](https://github.com/linode/manager/pull/9823))
6 changes: 4 additions & 2 deletions packages/manager/src/MainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import withGlobalErrors, {
Props as GlobalErrorProps,
} from 'src/containers/globalErrors.container';
import { useDialogContext } from 'src/context/useDialogContext';
import { Footer } from 'src/features/Footer/Footer';
import { Footer } from 'src/features/Footer';
import { GlobalNotifications } from 'src/features/GlobalNotifications/GlobalNotifications';
import {
notificationContext,
Expand Down Expand Up @@ -155,7 +155,9 @@ const LoadBalancers = React.lazy(() => import('src/features/LoadBalancers'));
const NodeBalancers = React.lazy(
() => import('src/features/NodeBalancers/NodeBalancers')
);
const StackScripts = React.lazy(() => import('src/features/StackScripts/StackScripts'));
const StackScripts = React.lazy(
() => import('src/features/StackScripts/StackScripts')
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen this one before 🀣

const SupportTickets = React.lazy(
() => import('src/features/Support/SupportTickets')
);
Expand Down
3 changes: 2 additions & 1 deletion packages/manager/src/components/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Hidden } from 'src/components/Hidden';
import PrimaryNav from './PrimaryNav/PrimaryNav';

export const SIDEBAR_WIDTH = 190;
export const SIDEBAR_COLLAPSED_WIDTH = 52;

export interface Props {
closeMenu: () => void;
Expand Down Expand Up @@ -70,7 +71,7 @@ const StyledDrawer = styled(Drawer, {
[theme.breakpoints.up('sm')]: {
overflowY: 'hidden',
},
width: '52px',
width: `${SIDEBAR_COLLAPSED_WIDTH}px`,
},
'&.MuiDrawer-docked': {
height: '100%',
Expand Down
4 changes: 4 additions & 0 deletions packages/manager/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,7 @@ export const ACCESS_LEVELS = {

// Linode Community URL accessible from the TopMenu Community icon
export const LINODE_COMMUNITY_URL = 'https://linode.com/community';

export const FEEDBACK_LINK = 'https://www.linode.com/feedback/';

export const DEVELOPERS_LINK = 'https://developers.linode.com';
53 changes: 53 additions & 0 deletions packages/manager/src/features/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import Stack from '@mui/material/Stack';
import * as React from 'react';

import { Link } from 'src/components/Link';
import {
SIDEBAR_COLLAPSED_WIDTH,
SIDEBAR_WIDTH,
} from 'src/components/SideMenu';
import { DEVELOPERS_LINK, FEEDBACK_LINK } from 'src/constants';

import packageJson from '../../package.json';

interface Props {
desktopMenuIsOpen: boolean;
}

export const Footer = React.memo((props: Props) => {
const { desktopMenuIsOpen } = props;

return (
<footer role="contentinfo">
<Stack
sx={(theme) => ({
backgroundColor: theme.bg.main,
paddingLeft: {
md: desktopMenuIsOpen
? `${SIDEBAR_COLLAPSED_WIDTH + 16}px`
: `${SIDEBAR_WIDTH + 16}px`,
sm: 2,
xs: 2,
},
paddingY: theme.spacing(2.5),
transition: 'padding-left .1s linear', // match the sidebar transition speed
})}
direction={{ sm: 'row', xs: 'column' }}
spacing={{ sm: 4, xs: 1 }}
>
<Link
forceCopyColor
to={`https://github.com/linode/manager/releases/tag/linode-manager@v${packageJson.version}`}
>
v{packageJson.version}
</Link>
<Link forceCopyColor to={DEVELOPERS_LINK}>
API Reference
</Link>
<Link forceCopyColor to={FEEDBACK_LINK}>
Provide Feedback
</Link>
</Stack>
</footer>
);
});
128 changes: 0 additions & 128 deletions packages/manager/src/features/Footer/Footer.tsx

This file was deleted.