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

[docs-infra] Move Ukraine banner to the bottom #45135

Merged
merged 1 commit into from
Jan 29, 2025
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
9 changes: 4 additions & 5 deletions docs/src/components/banner/TableOfContentsBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import { alpha } from '@mui/material/styles';
import { Link } from '@mui/docs/Link';
import FEATURE_TOGGLE from 'docs/src/featureToggle';

export default function TableOfContentsBanner() {
return FEATURE_TOGGLE.enable_toc_banner ? (
return (
<Link
href="https://war.ukraine.ua/support-ukraine/"
target="_blank"
sx={[
(theme) => ({
mb: 2,
mt: 2,
mx: 0.5,
mb: 2,
p: 1,
pl: '10px',
display: 'flex',
alignItems: 'center',
gap: '10px',
backgroundColor: alpha(theme.palette.grey[50], 0.4),
border: '1px solid',
borderColor: (theme.vars || theme).palette.divider,
borderRadius: 1,
Expand Down Expand Up @@ -53,5 +52,5 @@ export default function TableOfContentsBanner() {
MUI stands in solidarity with Ukraine.
</Typography>
</Link>
) : null;
);
}
1 change: 0 additions & 1 deletion docs/src/featureToggle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// need to use commonjs export so that @mui/internal-markdown can use
module.exports = {
enable_website_banner: false,
enable_toc_banner: true,
enable_docsnav_banner: true,
enable_job_banner: false,
};
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ export default function AppTableOfContents(props) {

return (
<Nav aria-label={t('pageTOC')}>
<TableOfContentsBanner />
<NoSsr>
{showJobAd && (
<Link
Expand Down Expand Up @@ -344,6 +343,7 @@ export default function AppTableOfContents(props) {
</React.Fragment>
) : null}
<DiamondSponsors />
<TableOfContentsBanner />
</Nav>
);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/DiamondSponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function DiamondSponsors() {
const t = useTranslate();

return (
<Stack direction="column" sx={{ mt: 2 }}>
<Stack direction="column" sx={{ mt: 2, mx: 0.5 }}>
Copy link
Member Author

Choose a reason for hiding this comment

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

I kill two birds with one stone here. It changes the class name generated, preventing this from working https://github.com/easylist/easylist/blob/18821365f63fa7ee8bcb03f732df2d67fd86dde2/easylist/easylist_specific_hide.txt#L2759 😆

Similar to #44567

<NativeLink
data-ga-event-category="sponsor"
data-ga-event-action="docs-premium"
Expand Down