Skip to content

Add banner for one click deploy site #1719

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

Merged
merged 2 commits into from
Aug 20, 2025
Merged

Add banner for one click deploy site #1719

merged 2 commits into from
Aug 20, 2025

Conversation

jvmi7
Copy link
Contributor

@jvmi7 jvmi7 commented Aug 19, 2025

No description provided.

@jvmi7 jvmi7 requested a review from a team as a code owner August 19, 2025 22:12
Copy link

netlify bot commented Aug 19, 2025

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 8bb6882
🔍 Latest deploy log https://app.netlify.com/projects/docs-optimism/deploys/68a5be0491910500083db89c
😎 Deploy Preview https://deploy-preview-1719--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

📝 Walkthrough

Walkthrough

A new React component, ChainOperatorsBanner, is added under components/ChainOperatorsBanner.tsx. It renders a promotional banner with an info icon, title, subtitle, and a CTA linking to https://localchain.dev/, with hover color changes via onMouseEnter/onMouseLeave. Styling is handled via inline styles and styled-jsx for a light blue background and border. The banner is imported and inserted near the top of multiple MDX pages: pages/operators/chain-operators.mdx and the subpages architecture.mdx, configuration.mdx, deploy.mdx, tools.mdx, and tutorials.mdx.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • sbvegan

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch one-click-deploy-banner

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
pages/operators/chain-operators/tutorials.mdx (2)

38-38: Card title capitalization: L2 should be uppercase

“L2” is a common acronym and should be capitalized.

-  <Card title="Creating your own l2 rollup testnet" href="/operators/chain-operators/tutorials/create-l2-rollup" />
+  <Card title="Creating your own L2 rollup testnet" href="/operators/chain-operators/tutorials/create-l2-rollup" />

31-31: Grammar and Parallelism Fix in Tutorials Section

Please update the sentence in pages/operators/chain-operators/tutorials.mdx (line 31) for number agreement, parallelism, and proper capitalization:

-This section provides information on adding attributes to the derivation function, adding a precompile, creating your own l2 rollup testnet, integrating a new da layer with alt da, modifying predeployed contracts and using viem. You'll find overview, tutorial, guide to help you understand and work with these topics.
+This section provides information on adding attributes to the derivation function, adding a precompile, creating your own L2 rollup testnet, integrating a new DA layer with Alt DA, modifying predeployed contracts, and using viem. You'll find overviews, tutorials, and guides to help you understand and work with these topics.

• “L2” and “DA” should be upper-cased for consistency.
• “Alt DA” did not appear in nouns.txt; if your style guide prefers “Alt-DA,” please adjust accordingly.
• Added the Oxford comma before “and using viem.”
• Pluralized “overview, tutorial, guide” to “overviews, tutorials, and guides.”

🧹 Nitpick comments (12)
pages/operators/chain-operators/configuration.mdx (1)

19-21: Avoid duplication by centralizing banner injection

Consider injecting this banner via a layout or a shared MDX partial for the entire Chain Operators section to avoid repeating imports/usages across multiple pages.

Potential approaches:

  • Add a section-aware check in the docs layout (e.g., if route starts with /operators/chain-operators) and render the banner there.
  • Create a short MDX include (e.g., _includes/chain-operators-banner.mdx) and import that include across pages, so copy/paste is minimized.
pages/operators/chain-operators/tools.mdx (1)

25-27: Centralize banner usage to reduce repetition

Same suggestion as other pages: consider rendering this via the section layout or an MDX partial to avoid repeated imports/usages on each page.

pages/operators/chain-operators.mdx (2)

26-26: Header case nitpick

Per the style guide, H1/H2/H3 should use sentence case unless preserving proper nouns. Consider “Chain operators.”

-# Chain Operators
+# Chain operators

22-24: DRY opportunity for banner rendering

As this banner appears across multiple Chain Operators pages, consider injecting it in a shared layout or MDX partial to minimize duplication.

pages/operators/chain-operators/deploy.mdx (1)

21-23: Consider centralizing banner injection

To avoid repeating imports/usages, place the banner in a section layout or MDX include.

pages/operators/chain-operators/tutorials.mdx (2)

42-42: Card title capitalization: DA/Alt DA consistency

Ensure capitalization aligns with nouns.txt. Suggest:

-  <Card title="Integrating a new da layer with alt Da" href="/operators/chain-operators/tutorials/integrating-da-layer" />
+  <Card title="Integrating a new DA layer with Alt DA" href="/operators/chain-operators/tutorials/integrating-da-layer" />

If nouns.txt prefers “Alt-DA,” use “Alt-DA” instead.


25-27: Reduce duplication by centralizing the banner

Same as other pages: consider moving this banner into a shared layout or partial for the Chain Operators section.

pages/operators/chain-operators/architecture.mdx (2)

23-23: Normalize spacing in named import for consistency.

Match the surrounding style (spaces inside braces).

-import {OpProposerDescriptionShort} from '@/content/index.js'
+import { OpProposerDescriptionShort } from '@/content/index.js'

24-26: Prefer path alias for ChainOperatorsBanner import

Update the import in pages/operators/chain-operators/architecture.mdx:

-import { ChainOperatorsBanner } from '../../../components/ChainOperatorsBanner'
+import { ChainOperatorsBanner } from '@/components/ChainOperatorsBanner'

To confirm there are no remaining deep-relative imports of this component, you can run a quick grep over your MDX/TSX pages:

grep -R "ChainOperatorsBanner" -n pages/operators

and verify all paths use @/components/ChainOperatorsBanner.

components/ChainOperatorsBanner.tsx (3)

29-37: Mark decorative SVG as hidden from assistive tech.

The info icon is decorative; hide it from screen readers.

           <svg
             width='24'
             height='24'
             viewBox='0 0 24 24'
             fill='none'
             xmlns='http://www.w3.org/2000/svg'
             style={{ color: 'rgb(59, 130, 246)' }}
             className='banner-icon'
+            aria-hidden='true'
+            focusable='false'
           >

51-53: Avoid using a heading tag inside a promotional banner.

Using a heading here can confuse page outline/TOC. Prefer non-heading text.

-            <h3 style={{ fontSize: '1rem', fontWeight: '600', lineHeight: '1.25', margin: 0 }}>
-              One-click deploy is live!
-            </h3>
+            <p style={{ fontSize: '1rem', fontWeight: '600', lineHeight: '1.25', margin: 0 }}>
+              One-click deploy is live!
+            </p>

67-71: Use CSS hover/focus styles instead of JS handlers; add an accessible label.

Inline JS hover handlers are unnecessary and bypass keyboard focus states. Move the hover effect to CSS and add an aria-label for clarity.

         <a
           href='https://localchain.dev/'
           target='_blank'
           rel='noopener noreferrer'
+          aria-label='Try LocalChain.dev (opens in a new tab)'
           style={{
             flexShrink: 0,
-            backgroundColor: 'rgb(59, 130, 246)',
             color: 'white',
             padding: '10px 24px',
             borderRadius: '6px',
             fontWeight: '500',
             fontSize: '14px',
             textDecoration: 'none',
-            transition: 'background-color 0.2s'
           }}
           className='banner-button'
-          onMouseEnter={(e) => {
-            e.currentTarget.style.backgroundColor = 'rgb(37, 99, 235)'
-          }}
-          onMouseLeave={(e) => {
-            e.currentTarget.style.backgroundColor = 'rgb(59, 130, 246)'
-          }}
         >
           Try now
         </a>

And extend the scoped styles to handle default, hover, and focus-visible states:

       <style jsx>{`
         .banner-container {
           background-color: rgba(59, 130, 246, 0.1);
           border: 1px solid rgba(59, 130, 246, 0.2);
         }
+        .banner-button {
+          background-color: rgb(59, 130, 246);
+          transition: background-color 0.2s;
+        }
+        .banner-button:hover,
+        .banner-button:focus-visible {
+          background-color: rgb(37, 99, 235);
+          outline: none;
+        }
       `}</style>

Optional: consider using CSS variables or prefers-color-scheme to better integrate with light/dark themes. Happy to wire that up if desired.

Also applies to: 72-82, 83-88, 94-99

📜 Review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 827e0c2 and 88e5e55.

📒 Files selected for processing (7)
  • components/ChainOperatorsBanner.tsx (1 hunks)
  • pages/operators/chain-operators.mdx (1 hunks)
  • pages/operators/chain-operators/architecture.mdx (1 hunks)
  • pages/operators/chain-operators/configuration.mdx (1 hunks)
  • pages/operators/chain-operators/deploy.mdx (1 hunks)
  • pages/operators/chain-operators/tools.mdx (1 hunks)
  • pages/operators/chain-operators/tutorials.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.mdx

⚙️ CodeRabbit Configuration File

**/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • First, check the frontmatter section at the top of the file:
    1. For regular pages, ensure ALL these fields are present and not empty:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    personas: [non-empty array]
    categories: [non-empty array]
    content_type: [valid type]
    ---
    1. For landing pages (index.mdx or files with ), only these fields are required:
    ---
    title: [non-empty]
    lang: [non-empty]
    description: [non-empty]
    topic: [non-empty]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:
    pnpm validate-metadata
    ```'
  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When rev...

Files:

  • pages/operators/chain-operators.mdx
  • pages/operators/chain-operators/tutorials.mdx
  • pages/operators/chain-operators/tools.mdx
  • pages/operators/chain-operators/configuration.mdx
  • pages/operators/chain-operators/deploy.mdx
  • pages/operators/chain-operators/architecture.mdx
🪛 LanguageTool
pages/operators/chain-operators/architecture.mdx

[grammar] ~23-~23: There might be a mistake here.
Context: ...criptionShort} from '@/content/index.js' import { ChainOperatorsBanner } from '.....

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (16)
pages/operators/chain-operators/configuration.mdx (3)

1-16: Frontmatter looks valid for a landing page

All required fields for a landing page (title, lang, description, topic) are present and non-empty.


21-21: Good placement of the banner

Rendering the banner above the H1 makes it consistently visible without interfering with the Cards grid.


19-19: ✅ Import Path and Export Verified

The file components/ChainOperatorsBanner.tsx exists and declares a named export:

export function ChainOperatorsBanner(): ReactElement {  }

The import in pages/operators/chain-operators/configuration.mdx correctly resolves to this component.

pages/operators/chain-operators/tools.mdx (3)

1-22: Frontmatter is complete for a landing page

Required fields (title, lang, description, topic) are present and non-empty.


25-25: Import path and named import are consistent

The path depth is correct from this file location and aligns with a named export.


27-27: Banner placement is appropriate

Rendering above the H1 keeps the banner prominent without disrupting the Cards grid.

pages/operators/chain-operators.mdx (3)

1-19: Frontmatter passes landing page requirements

title, lang, description, and topic are present and non-empty.


24-24: Banner location is consistent and clear

Good to see the banner before the H1 on the landing page.


22-22: Import path and named import are correct

The component is exported as a named function (export function ChainOperatorsBanner) and all MDX pages consistently import it using named syntax. No changes required.

pages/operators/chain-operators/deploy.mdx (3)

1-18: Frontmatter meets landing page requirements

title, lang, description, and topic are present and non-empty.


21-21: Import path and named import are correct

The relative path depth and named import align with the expected component export.


23-23: Banner placement is appropriate

Placed before the H1, consistent with other pages.

pages/operators/chain-operators/tutorials.mdx (3)

1-22: Frontmatter is complete for a landing page

title, lang, description, and topic are present and non-empty.


25-25: Import path and named import validated

The relative path and named import pattern are consistent with other pages.


27-27: Banner placement consistent with the section

Appears before the H1; consistent with other Chain Operators pages.

pages/operators/chain-operators/architecture.mdx (1)

1-19: Frontmatter metadata looks complete and valid.

All required fields are present and non-empty for a regular page.

@krofax krofax self-assigned this Aug 20, 2025
@krofax krofax merged commit 544a0a4 into main Aug 20, 2025
12 checks passed
@krofax krofax deleted the one-click-deploy-banner branch August 20, 2025 12:25
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.

2 participants