refactor(theme): split BlogPostItem into smaller theme subcomponents#7716
Merged
refactor(theme): split BlogPostItem into smaller theme subcomponents#7716
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: -469 B (0%) Total Size: 804 kB
ℹ️ View Unchanged
|
Collaborator
Author
|
WIP: will likely add a |
# Conflicts: # packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx
…to override default bottom margin
slorber
commented
Jul 7, 2022
Collaborator
Author
slorber
left a comment
There was a problem hiding this comment.
Added some review comments
packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx
Show resolved
Hide resolved
Josh-Cena
reviewed
Jul 8, 2022
packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
Outdated
Show resolved
Hide resolved
Josh-Cena
reviewed
Jul 8, 2022
packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Metadata/index.tsx
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking changes
The blog theme components have been significantly refactored, similarly to docs (#7644)
@theme/BlogPostItemhas been split into much smaller components, easier to swizzleconst {metadata, frontMatter} = useBlogPost()import {useBlogPost} from '@docusaurus/theme-common/internal';metadata.truncated=>metadata.hasTruncateMarker@theme/BlogPostAuthor=>@theme/BlogPostItem/Header/Author@theme/BlogPostAuthors=>@theme/BlogPostItem/Header/AuthorsPre-flight checklist
Motivation
Continue the process of splitting larger theme components into smaller subcomponents easier to swizzle
Test Plan
ci + preview
These links should be strictly identical to what it looked like before:
Blog list:
Blog post:
Site changelog:
Site changelog entry:
Test links
Deploy preview: https://deploy-preview-7716--docusaurus-2.netlify.app/
Related issues/PRs
#7644