Skip to content

feat: DC-5348 Add new ai button on landing page - #7115

Merged
carlagn merged 5 commits into
mainfrom
feat/DC-5348-add-ai-btn-landing
Sep 12, 2025
Merged

feat: DC-5348 Add new ai button on landing page#7115
carlagn merged 5 commits into
mainfrom
feat/DC-5348-add-ai-btn-landing

Conversation

@carlagn

@carlagn carlagn commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Fixes #DC-5348

Summary by CodeRabbit

  • New Features

    • Added a “Get Started with Prisma & AI” call-to-action button in the homepage hero (link-styled with an icon, directs to the AI page).
  • Style

    • Increased spacing between left icons and labels in custom buttons for improved readability; badge icon spacing unchanged.
    • Adjusted hero code area spacing and increased code font size for better legibility.
    • Repositioned action controls in code blocks for more consistent alignment.

@coderabbitai

coderabbitai Bot commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a new link-styled Button CTA to the homepage hero and updates styling: increases the left icon margin in button styles, adjusts hero code spacing and font size, and sets a fixed right offset for the code block’s button group. No logic, exports, or error handling changes.

Changes

Cohort / File(s) Summary
Homepage hero CTA
src/pages/index.tsx
Imports Button and renders a new CTA after the hero code block with props: variant="link", color="teal", leftIcon="fa-regular fa-robot", label="Get Started with Prisma & AI", link="/ai", and inline fontSize: 18px.
Styling updates
src/components/button/styles.module.scss, src/pages/index.module.scss, src/theme/CodeBlock/Content/styles.module.scss
- Button: .custom-button .leftIcon margin-right increased from 4px to 8px (.badge .leftIcon unchanged).
- Hero: .hero-code-wrapper margin-top: -8px; pre code font-size: 18px.
- CodeBlock: .buttonGroup right changed to 15px from calc(var(--ifm-pre-padding) / 2).

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • petradonka
  • nikolasburk
  • nurul3101
  • mhessdev
  • ankur-arch

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: DC-5348 Add new ai button on landing page" accurately summarizes the primary change (adding an AI button to the landing page) and includes the ticket reference, so it is directly related to the PR's changes and concise. It is slightly inconsistent in capitalization ("ai" vs "AI") but remains clear and not misleading.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/DC-5348-add-ai-btn-landing

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions

Copy link
Copy Markdown
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 10, 2025

Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e754822
Status: ✅  Deploy successful!
Preview URL: https://579142dc.docs-51g.pages.dev
Branch Preview URL: https://feat-dc-5348-add-ai-btn-land.docs-51g.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/components/button/styles.module.scss (1)

16-20: Fix invalid CSS on arrow icon transition

transition: translateX(4px); is invalid; set an initial transform and limit the transition to transform for smoother animation.

   .fa-arrow-right {
-    transition: all 150ms ease-in-out;
-    transition: translateX(4px);
+    transition: transform 150ms ease-in-out;
+    transform: translateX(0);
     margin-left: 4px;
   }
src/pages/index.tsx (1)

209-209: Preserve query params in the new CTA link

Other links on this page propagate location.search; do the same here to keep UTM/context.

-          <Button variant="link" color="teal" leftIcon="fa-regular fa-robot" label={"Get Started with Prisma & AI"} link="/ai" style={{ fontSize: `18px` }} />
+          <Button variant="link" color="teal" leftIcon="fa-regular fa-robot" label={"Get Started with Prisma & AI"} link={`/ai${location.search}`} style={{ fontSize: `18px` }} />

Add inside HomepageHeroSection (outside this hunk):

// Inside HomepageHeroSection()
const { colorMode } = useColorMode();
const location = useLocation();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 559abd5 and 8887b20.

📒 Files selected for processing (2)
  • src/components/button/styles.module.scss (1 hunks)
  • src/pages/index.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/index.tsx (1)
src/components/button/Button.tsx (1)
  • Button (29-63)
⏰ 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: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
🔇 Additional comments (3)
src/components/button/styles.module.scss (1)

13-15: Icon spacing LGTM

8px right margin improves legibility for left icons on buttons; badges remain at 4px.

src/pages/index.tsx (2)

14-14: Import looks good

No issues with adding the Button import.


209-209: Verify FA style for robot icon

fa-regular fa-robot may not exist; likely fa-solid fa-robot. Please confirm your FA set.

If needed:

- leftIcon="fa-regular fa-robot"
+ leftIcon="fa-solid fa-robot"

Comment thread src/pages/index.tsx
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 12, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
src/pages/index.module.scss (2)

53-53: Prefer not using negative margins; scope or replace with responsive spacing

The hero is a flex column with gap: 24px. Using margin-top: -8px on .hero-code-wrapper is brittle and may regress at different breakpoints or writing modes. Either (a) reduce the gap for the hero at relevant breakpoints, or (b) at least neutralize the negative margin on small screens and use logical properties.

Apply this diff to localize the tweak and improve i18n friendliness:

-      margin-top: -8px;
+      margin-block-start: -8px;
+      @media (max-width: 974px) {
+        margin-block-start: 0;
+      }

87-89: Use rem (and set line-height) for accessible code sizing

Hard-coding 18px doesn’t scale with user font settings. Switch to rem and add an explicit line-height for readability. Consider clamp() if you want slight responsive scaling.

-          code {
-            font-size: 18px;
-          }
+          code {
+            font-size: 1.125rem; /* 18px @ 16px root */
+            line-height: 1.5;
+          }

Please verify: at 200% browser zoom and on narrow viewports, the code line doesn’t collide with the copy button (padding-right: 40px) and no horizontal scrolling is introduced.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8887b20 and d750b46.

📒 Files selected for processing (1)
  • src/pages/index.module.scss (2 hunks)
⏰ 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). (4)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Lost Pixel
  • GitHub Check: Cloudflare Pages

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 12, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (1)
src/theme/CodeBlock/Content/styles.module.scss (1)

56-56: Avoid hard-coded 15px; prefer a theme-aware logical inset (keeps spacing consistent and RTL-ready).

A fixed pixel offset can drift from --ifm-pre-padding across themes/sizes. Use a variable-based logical property with a local override hook.

-  right: 15px;
+  /* Keep aligned with code padding; allow page-level overrides */
+  inset-inline-end: var(--codeblock-button-inline-end, calc(var(--ifm-pre-padding) / 2));

Follow-up:

  • If you keep inset-inline-end, drop the /* rtl:ignore */ above to let logical properties handle RTL. Please verify on small breakpoints and an RTL locale.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d750b46 and e754822.

📒 Files selected for processing (1)
  • src/theme/CodeBlock/Content/styles.module.scss (1 hunks)
⏰ 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). (4)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
  • GitHub Check: Cloudflare Pages

@carlagn
carlagn merged commit a3ec904 into main Sep 12, 2025
7 of 9 checks passed
@carlagn
carlagn deleted the feat/DC-5348-add-ai-btn-landing branch September 12, 2025 09:56
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