Skip to content

docs: zuplo sponsor#301

Merged
dinwwwh merged 6 commits intomainfrom
docs/zuplo-sponsor
Apr 5, 2025
Merged

docs: zuplo sponsor#301
dinwwwh merged 6 commits intomainfrom
docs/zuplo-sponsor

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Mar 27, 2025

Summary by CodeRabbit

  • New Features

    • The banner now reappears automatically after three days if it was previously dismissed.
    • It is now actively displayed at the top of the layout.
  • Style

    • Enhanced the banner’s appearance with a solid background, added padding, and a refined close button position.
    • Introduced a helper text element that adapts for larger screens for improved information display.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2025 2:07am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2025

Walkthrough

The changes update the Banner component’s visibility logic and styling. In the Banner component, the visibility is determined by a single condition checking if the banner was dismissed or if three days have passed since dismissal. The background has been changed from a gradient to a solid rgba color, with added padding and a responsive helper class. Additionally, the Banner component is now actively rendered in the layout via an import update in the theme’s main index file.

Changes

File(s) Summary of Changes
apps/content/.vitepress/theme/components/Banner.vue Modified visibility logic to display the banner if dismissed or after three days. Removed useLocalStorage and updated the dismissBanner function. Updated styling: solid rgba background, added padding, introduced .banner-helper, and adjusted the close button's position.
apps/content/.vitepress/theme/index.ts Imported the Banner component and enabled its rendering in the layout under the 'layout-top' key by uncommenting the relevant code.

Sequence Diagram(s)

sequenceDiagram
    participant L as Layout
    participant B as Banner
    participant T as TimeCheck

    L->>B: Render Banner ('layout-top')
    B->>T: Check if bannerDismissed is falsy or expired (3 days)
    alt Condition met (missing/expired)
        T-->>B: Valid - Show banner
        B->>User: Display Banner
    else Condition not met
        T-->>B: Remain hidden
        B->>User: Do not display banner
    end
Loading

Poem

I hopped through lines of revamped code,
Where banners bloom on a timed abode.
Three days pass, then off they hide,
A gentle nudge, a style applied.
I, a rabbit, cheer with glee—
Code leaps high, wild and free! 🐰✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 451d8ef and cc01f14.

📒 Files selected for processing (1)
  • apps/content/.vitepress/theme/components/Banner.vue (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/content/.vitepress/theme/components/Banner.vue

🪧 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2025

More templates

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@301

@orpc/client

npm i https://pkg.pr.new/@orpc/client@301

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@301

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@301

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@301

@orpc/react

npm i https://pkg.pr.new/@orpc/react@301

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@301

@orpc/server

npm i https://pkg.pr.new/@orpc/server@301

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@301

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@301

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@301

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@301

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@301

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@301

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@301

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@301

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@301

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@301

commit: cc01f14

Copy link
Copy Markdown

@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)
apps/content/.vitepress/theme/components/Banner.vue (2)

18-20: Good enhancement to the banner visibility logic.

The condition now allows the banner to reappear after 3 days if it was previously dismissed, which is a good user experience improvement. Previously dismissed banners can now be seen again after a reasonable time period.

For better readability, consider extracting the time calculation into a named constant:

+const THREE_DAYS_MS = 60 * 60 * 24 * 3 * 1000
 watchEffect(() => {
-  if (!bannerDismissed.value || Number(bannerDismissed.value) + 60 * 60 * 24 * 3 * 1000 < Date.now()) {
+  if (!bannerDismissed.value || Number(bannerDismissed.value) + THREE_DAYS_MS < Date.now()) {
     show.value = true
   }
 })

55-55: Banner background updated to solid color.

The background has been changed from a gradient to a solid rgba color, which looks cleaner and matches the Zuplo branding.

Consider using a CSS variable for the color to improve maintainability:

+:root {
+  --banner-background-color: rgba(255, 0, 189, 0.8);
+}

.banner-container {
-  background: rgba(255, 0, 189, 0.8);
+  background: var(--banner-background-color);
  color: var(--vp-c-white);
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 427bff4 and 401ea0c.

📒 Files selected for processing (2)
  • apps/content/.vitepress/theme/components/Banner.vue (5 hunks)
  • apps/content/.vitepress/theme/index.ts (2 hunks)
🔇 Additional comments (6)
apps/content/.vitepress/theme/index.ts (2)

6-6: Good addition of the Banner import.

This import makes the Banner component available for use in the layout.


20-20: Banner component enabled in the layout.

You've successfully enabled the Banner component to display at the top of the layout. This change aligns with the PR objective of adding the Zuplo sponsor banner.

apps/content/.vitepress/theme/components/Banner.vue (4)

34-34: Banner text updated with responsive helper text.

The banner text now includes an additional part that will be conditionally displayed based on screen size.


60-60: Added padding to the banner.

The added padding improves the layout and readability of the banner content.


83-91: Added responsive helper class for banner text.

This implementation elegantly handles showing additional text on larger screens, improving the mobile experience by keeping it concise while providing more context on desktop.


107-107: Adjusted close button positioning.

The close button has been repositioned from 18px to 4px from the right edge, which likely improves its visual alignment.

@dinwwwh dinwwwh merged commit ce2f84d into main Apr 5, 2025
8 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant