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

chore: upgrade Infima to alpha.39 #7306

Merged
merged 7 commits into from May 4, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -15,7 +15,7 @@ export default function DebugRegistry(): JSX.Element {
return (
<DebugLayout>
<h2>Registry</h2>
<ul className={styles.list}>
<ul className="clean-list">
{Object.values(registry).map(([, aliasedPath, resolved]) => (
<li key={aliasedPath} className={styles.listItem}>
<div style={{marginBottom: '10px'}}>
Expand Down
Expand Up @@ -5,12 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

.list {
padding: 0;
}

.listItem {
list-style: none;
background-color: #242526;
padding: 10px;
border-radius: 4px;
Expand Down
Expand Up @@ -16,7 +16,7 @@ export default function DebugRoutes(): JSX.Element {
return (
<DebugLayout>
<h2>Routes</h2>
<ul className={styles.list}>
<ul className="clean-list">
{routes.map(({path, exact, routes: childRoutes}) => (
<li key={path} className={styles.listItem}>
<div className={styles.route}>
Expand Down
Expand Up @@ -5,12 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

.list {
padding: 0;
}

.listItem {
list-style: none;
background-color: #242526;
padding: 10px;
border-radius: 4px;
Expand Down
Expand Up @@ -24,7 +24,7 @@ export default function DebugMetadata(): JSX.Element {
<code>{siteMetadata.siteVersion || 'No version specified'}</code>
</div>
<h3 className={styles.sectionTitle}>Plugins and themes</h3>
<ul className={styles.list}>
<ul className="clean-list">
{Object.entries(siteMetadata.pluginVersions).map(
([name, versionInformation]) => (
<li key={name} className={styles.listItem}>
Expand Down
Expand Up @@ -9,12 +9,7 @@
margin-top: 20px;
}

.list {
padding: 0;
}

.listItem {
list-style: none;
background-color: #242526;
padding: 10px;
border-radius: 4px;
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-classic/package.json
Expand Up @@ -33,7 +33,7 @@
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"copy-text-to-clipboard": "^3.0.1",
"infima": "0.2.0-alpha.38",
"infima": "0.2.0-alpha.39",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"postcss": "^8.4.13",
Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-theme-classic/src/theme-classic.d.ts
Expand Up @@ -997,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
export interface Props extends Omit<PropNavigationLink, 'title'> {
readonly title: ReactNode;
readonly subLabel?: JSX.Element;
readonly isNext?: boolean;
}

export default function PaginatorNavLink(props: Props): JSX.Element;
Expand Down
Expand Up @@ -22,34 +22,31 @@ export default function BlogListPaginator(props: Props): JSX.Element {
message: 'Blog list page navigation',
description: 'The ARIA label for the blog pagination',
})}>
<div className="pagination-nav__item">
{previousPage && (
<PaginatorNavLink
permalink={previousPage}
title={
<Translate
id="theme.blog.paginator.newerEntries"
description="The label used to navigate to the newer blog posts page (previous page)">
Newer Entries
</Translate>
}
/>
)}
</div>
<div className="pagination-nav__item pagination-nav__item--next">
{nextPage && (
<PaginatorNavLink
permalink={nextPage}
title={
<Translate
id="theme.blog.paginator.olderEntries"
description="The label used to navigate to the older blog posts page (next page)">
Older Entries
</Translate>
}
/>
)}
</div>
{previousPage && (
<PaginatorNavLink
permalink={previousPage}
title={
<Translate
id="theme.blog.paginator.newerEntries"
description="The label used to navigate to the newer blog posts page (previous page)">
Newer Entries
</Translate>
}
/>
)}
{nextPage && (
<PaginatorNavLink
permalink={nextPage}
title={
<Translate
id="theme.blog.paginator.olderEntries"
description="The label used to navigate to the older blog posts page (next page)">
Older Entries
</Translate>
}
isNext
/>
)}
</nav>
);
}
Expand Up @@ -9,8 +9,6 @@ import React from 'react';
import Link, {type Props as LinkProps} from '@docusaurus/Link';
import type {Props} from '@theme/BlogPostAuthor';

import styles from './styles.module.css';

function MaybeLink(props: LinkProps): JSX.Element {
if (props.href) {
return <Link {...props} />;
Expand All @@ -24,11 +22,9 @@ export default function BlogPostAuthor({author}: Props): JSX.Element {
return (
<div className="avatar margin-bottom--sm">
{imageURL && (
<span className="avatar__photo-link avatar__photo">
<MaybeLink href={link}>
<img className={styles.image} src={imageURL} alt={name} />
</MaybeLink>
</span>
<MaybeLink href={link} className="avatar__photo-link">
<img className="avatar__photo" src={imageURL} alt={name} />
</MaybeLink>
)}

{name && (
Expand Down

This file was deleted.

Expand Up @@ -21,34 +21,31 @@ export default function BlogPostPaginator(props: Props): JSX.Element {
message: 'Blog post page navigation',
description: 'The ARIA label for the blog posts pagination',
})}>
<div className="pagination-nav__item">
{prevItem && (
<PaginatorNavLink
{...prevItem}
subLabel={
<Translate
id="theme.blog.post.paginator.newerPost"
description="The blog post button label to navigate to the newer/previous post">
Newer Post
</Translate>
}
/>
)}
</div>
<div className="pagination-nav__item pagination-nav__item--next">
{nextItem && (
<PaginatorNavLink
{...nextItem}
subLabel={
<Translate
id="theme.blog.post.paginator.olderPost"
description="The blog post button label to navigate to the older/next post">
Older Post
</Translate>
}
/>
)}
</div>
{prevItem && (
<PaginatorNavLink
{...prevItem}
subLabel={
<Translate
id="theme.blog.post.paginator.newerPost"
description="The blog post button label to navigate to the newer/previous post">
Newer Post
</Translate>
}
/>
)}
{nextItem && (
<PaginatorNavLink
{...nextItem}
subLabel={
<Translate
id="theme.blog.post.paginator.olderPost"
description="The blog post button label to navigate to the older/next post">
Older Post
</Translate>
}
isNext
/>
)}
</nav>
);
}
Expand Up @@ -26,7 +26,7 @@ export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element {
<div className={clsx(styles.sidebarItemTitle, 'margin-bottom--md')}>
{sidebar.title}
</div>
<ul className={styles.sidebarItemList}>
<ul className={clsx(styles.sidebarItemList, 'clean-list')}>
{sidebar.items.map((item) => (
<li key={item.permalink} className={styles.sidebarItem}>
<Link
Expand Down
Expand Up @@ -18,9 +18,7 @@
}

.sidebarItemList {
list-style: none;
font-size: 0.9rem;
padding-left: 0;
}

.sidebarItem {
Expand Down
Expand Up @@ -15,11 +15,12 @@
align-items: center;
justify-content: center;
transition: background-color var(--ifm-transition-fast) ease;
background-color: var(--docusaurus-collapse-button-bg);
}

.expandButton:hover,
.expandButton:focus {
background-color: var(--ifm-color-emphasis-200);
background-color: var(--docusaurus-collapse-button-bg-hover);
}

.expandButtonIcon {
Expand All @@ -29,9 +30,4 @@
[dir='rtl'] .expandButtonIcon {
transform: rotate(180deg);
}

[data-theme='dark'] .expandButton:hover,
[data-theme='dark'] .expandButton:focus {
background-color: var(--collapse-button-bg-color-dark);
}
}
Expand Up @@ -21,34 +21,31 @@ export default function DocPaginator(props: Props): JSX.Element {
message: 'Docs pages navigation',
description: 'The ARIA label for the docs pagination',
})}>
<div className="pagination-nav__item">
{previous && (
<PaginatorNavLink
{...previous}
subLabel={
<Translate
id="theme.docs.paginator.previous"
description="The label used to navigate to the previous doc">
Previous
</Translate>
}
/>
)}
</div>
<div className="pagination-nav__item pagination-nav__item--next">
{next && (
<PaginatorNavLink
{...next}
subLabel={
<Translate
id="theme.docs.paginator.next"
description="The label used to navigate to the next doc">
Next
</Translate>
}
/>
)}
</div>
{previous && (
<PaginatorNavLink
{...previous}
subLabel={
<Translate
id="theme.docs.paginator.previous"
description="The label used to navigate to the previous doc">
Previous
</Translate>
}
/>
)}
{next && (
<PaginatorNavLink
{...next}
subLabel={
<Translate
id="theme.docs.paginator.next"
description="The label used to navigate to the next doc">
Next
</Translate>
}
isNext
/>
)}
</nav>
);
}
Expand Up @@ -6,13 +6,19 @@
*/

:root {
--collapse-button-bg-color-dark: #2e333a;
--docusaurus-collapse-button-bg: transparent;
--docusaurus-collapse-button-bg-hover: rgb(0 0 0 / 10%);
}

[data-theme='dark']:root {
--docusaurus-collapse-button-bg: rgb(255 255 255 / 5%);
--docusaurus-collapse-button-bg-hover: rgb(255 255 255 / 10%);
}

@media (min-width: 997px) {
.collapseSidebarButton {
display: block !important;
background-color: var(--ifm-button-background-color);
background-color: var(--docusaurus-collapse-button-bg);
height: 40px;
position: sticky;
bottom: 0;
Expand All @@ -29,13 +35,9 @@
transform: rotate(0);
}

[data-theme='dark'] .collapseSidebarButton {
background-color: var(--collapse-button-bg-color-dark);
}

[data-theme='dark'] .collapseSidebarButton:hover,
[data-theme='dark'] .collapseSidebarButton:focus {
background-color: var(--ifm-color-emphasis-200);
.collapseSidebarButton:hover,
.collapseSidebarButton:focus {
background-color: var(--docusaurus-collapse-button-bg-hover);
}
}

Expand Down
Expand Up @@ -31,7 +31,7 @@ function Column({column}: {column: ColumnType}) {
return (
<div className="col footer__col">
<div className="footer__title">{column.title}</div>
<ul className="footer__items">
<ul className="footer__items clean-list">
{column.items.map((item, i) => (
<ColumnLinkItem key={i} item={item} />
))}
Expand Down