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

💥 Making MDE-CSS available from CDN to reduce package-size #402

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

FabianWilms
Copy link
Member

@FabianWilms FabianWilms commented Jan 24, 2025

Summary by CodeRabbit

  • Chores

    • Reorganized asset directory structure
    • Moved CSS and SVG files from temporary to permanent locations
    • Updated import and export paths for assets
    • Removed temporary asset files
  • Documentation

    • Updated documentation with new asset paths
    • Added external stylesheet link
  • Configuration

    • Modified Storybook and release configuration to reflect new asset locations

@FabianWilms FabianWilms self-assigned this Jan 24, 2025
@FabianWilms FabianWilms requested a review from langehm January 24, 2025 07:26
@FabianWilms FabianWilms requested a review from lehju January 24, 2025 07:27
@FabianWilms
Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jan 24, 2025

Walkthrough

This pull request involves a comprehensive reorganization of asset management across multiple configuration files. The changes primarily focus on restructuring asset paths from a temporary directory to more permanent locations, specifically moving CSS stylesheets and SVG icon files from assets/temporary/ to assets/css/ and assets/icons/ directories. The modifications impact Storybook configuration, package exports, and documentation, ensuring consistent asset referencing throughout the project.

Changes

File Change Summary
.releaserc.js Removed GitHub release asset entries for CSS and SVG files from temporary directory
.storybook/main.ts Updated SVG file paths from temporary to icons directory
.storybook/preview-head.html Added external CSS stylesheet links
.storybook/preview.ts Removed and consolidated CSS imports
docs/GettingStarted.mdx Updated import paths for icons and stylesheets, added external stylesheet link
package.json Restructured exports, removing temporary asset paths and adding new paths
public/assets/temporary/muenchende-fontfaces.css Deleted font face definitions file

Possibly related PRs

Suggested Labels

released, released on @beta

Suggested Reviewers

  • langehm

Poem

🎨 Assets dancing, paths anew
From temporary to structured view
Icons and styles find their home
No more wandering, no more roam
Code refactored with gentle care 🌟

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.storybook/main.ts (1)

9-9: Consider loading these icons from a CDN as well.

Given the PR's goal of reducing package size by hosting assets via CDN, you could further shrink the bundle footprint by moving these icons to a CDN in addition to the locally referenced paths.

Also applies to: 13-13

package.json (1)

26-28: Excellent reorganization of exported asset paths.

Shifting from temporary directories to more permanent locations matches the unified asset structure across the project. Consider hosting the icons and styles on a CDN as well to maximize the reduction in package size.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d27cffc and f2664ba.

⛔ Files ignored due to path filters (3)
  • package-lock.json is excluded by !**/package-lock.json
  • public/assets/icons/custom-icons.svg is excluded by !**/*.svg
  • public/assets/icons/muc-icons.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • .releaserc.js (0 hunks)
  • .storybook/main.ts (1 hunks)
  • .storybook/preview-head.html (1 hunks)
  • .storybook/preview.ts (1 hunks)
  • docs/GettingStarted.mdx (2 hunks)
  • package.json (1 hunks)
  • public/assets/temporary/muenchende-fontfaces.css (0 hunks)
💤 Files with no reviewable changes (2)
  • public/assets/temporary/muenchende-fontfaces.css
  • .releaserc.js
✅ Files skipped from review due to trivial changes (2)
  • .storybook/preview-head.html
  • .storybook/preview.ts
🔇 Additional comments (3)
docs/GettingStarted.mdx (3)

42-43: Nicely done adjusting the icon paths.

Switching from the “temporary” folder to the new “icons” folder is a great improvement, ensuring consistency with the rest of the new asset structure.


47-51: Great addition of CDN link for MDE5-CSS.

Embedding the external stylesheet from assets.muenchen.de helps match the PR’s intent to improve performance by reducing package size.


60-60: CSS import reorganization looks good.

Pointing to the new custom-style.css file aligns with the updated asset structure. This keeps your documentation consistent and clean.

@FabianWilms FabianWilms merged commit 5fff525 into beta Jan 29, 2025
8 checks passed
@FabianWilms FabianWilms deleted the cherry-pick-external-mde-css branch January 29, 2025 06:22
Copy link

🎉 This PR is included in version 3.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants