Skip to content

Conversation

@AbhiVarde
Copy link

@AbhiVarde AbhiVarde commented Nov 25, 2025

What does this PR do?

Problem

Multiple pages had responsive layout and overflow issues on mobile and small screens (< 1024px):

  • Contact & Startups Forms: Submit buttons and form wrappers lacked consistent width constraints and full-width behavior on mobile
  • Developer Toolkit: Product labels caused horizontal overflow or tight spacing on small screens
  • Thread Cards: Long URLs and text content overflowed card boundaries horizontally without proper wrapping

Solution

Implemented comprehensive responsive fixes across all affected components:

  • Added unified max-w-xl constraint to form and button wrappers
  • Made submit buttons full-width on mobile (w-full! lg:w-auto!)
  • Hidden product labels on small screens (< lg) while keeping icons visible and tappable
  • Added responsive padding that scales from px-0.5 to px-3 based on screen size
  • Implemented proper word-wrapping and overflow handling for thread cards with min-w-0, flex-wrap, and break-word utilities
  • Added overflow: hidden to card container to prevent layout shifts

Changes Made

Files Modified:

  1. src/routes/contact-us/+page.svelte

    • Wrapped form in mx-auto max-w-xl container
    • Added button wrapper with matching max-w-xl constraint
    • Applied w-full! lg:w-auto! classes to submit button for responsive width
  2. src/routes/startups/+page.svelte

    • Applied same form and button wrapper constraints as contact page
    • Added reCAPTCHA text line break control with hidden sm:block for better mobile layout
    • Ensured consistent responsive behavior across both forms
  3. src/routes/(marketing)/(components)/developers-toolkit.svelte

    • Hidden product labels on small screens with hidden lg:inline
    • Added responsive padding scale: px-0.5 sm:px-1 md:px-2 lg:px-3
    • Maintained icon visibility and tap targets on all screen sizes
  4. src/routes/threads/ThreadCard.svelte

    • Added min-w-0 to parent containers to enable proper text wrapping
    • Implemented flex-wrap for tags and content
    • Added comprehensive word-breaking CSS rules in both utility classes and SCSS
    • Applied overflow: hidden to card container
    • Added truncate to tags for long tag names
    • Made reply counter shrink-0 to prevent compression

Test Plan

  • ✅ Chrome DevTools mobile simulation
  • ✅ Physical device testing (Chrome 142.0.7444.60 on Windows 11)
  • ✅ Verified form button width transitions at 1024px breakpoint
  • ✅ Tested developer toolkit responsiveness across all breakpoints
  • ✅ Verified thread cards with long URLs and text content
  • ✅ Tested tag wrapping behavior with multiple long tags
  • ✅ Confirmed desktop layout remains unchanged
  • ✅ Verified touch targets remain accessible on mobile

Screenshots

Page / Section Before (Current Issue) After (Fixed)
Contact Us Page Contact Us Before Contact Us After
Startup Page Startup Page Before Startup Page After
Developer Toolkit Component (Startup Section) DevToolkit Before DevToolkit After
Thread Cards (Threads Page) Thread Cards Before Thread Cards After

Note: The "After" screenshots are from my local build. For thread cards testing, I used dummy content locally as it requires the following environment variables:

PUBLIC_APPWRITE_DB_MAIN_ID
PUBLIC_APPWRITE_COL_THREADS_ID

Related PRs and Issues

Fixes #2599

Have you read the Contributing Guidelines?

Yes, I have read and followed the contributing guidelines.

Summary by CodeRabbit

  • Style
    • Reflowed build/deploy controls for responsive stacking on small screens and horizontal layout on large screens; button padding now adapts by breakpoint and product labels hide on small screens.
    • Improved form containers across contact/startups pages with centered, constrained widths.
    • Submit buttons: full-width on small screens, auto-width on large screens.
    • Fixed text wrapping, truncation, and overflow in thread cards and tag lists; adjusted small-screen line breaks for recaptcha/privacy text.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

This pull request applies responsive layout and styling updates across four Svelte components: src/routes/(marketing)/(components)/developers-toolkit.svelte (restructures Build and Deploy groups from fixed horizontal layout to breakpoint-aware stacking, changes button padding to responsive values, replaces inline labels with spans hidden on small screens and visible on lg, and makes group gap elements responsive), src/routes/contact-us/+page.svelte and src/routes/startups/+page.svelte (constrains and centers forms with mx-auto, w-full, max-w-xl and makes submit buttons full-width by default and auto on large screens), and src/routes/threads/ThreadCard.svelte (adds min-w-0, flex-wrap, truncate, overflow and hyphenation rules and shrink-0 to prevent layout overflow and improve text wrapping). No exported/public declarations or runtime logic were changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • src/routes/threads/ThreadCard.svelte — verify interplay of min-w-0, flex-wrap, truncate, overflow and hyphenation rules across breakpoints and varied content lengths; check tag truncation and wrapping.
  • src/routes/(marketing)/(components)/developers-toolkit.svelte — confirm hidden label spans remain accessible to assistive technologies and responsive padding/gap classes behave across breakpoints.
  • src/routes/contact-us/+page.svelte and src/routes/startups/+page.svelte — confirm mx-auto, w-full, max-w-xl constraints center and bound layouts and that w-full! / lg:w-auto! button width toggles behave as intended.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main changes: responsive form layouts, developer toolkit responsiveness, and thread card overflow fixes on mobile.
Linked Issues check ✅ Passed All coding objectives from issue #2599 are addressed: forms use max-w-xl constraints with centered layout, submit buttons are full-width on mobile with lg:w-auto, toolkit labels hidden on small screens, and thread cards have overflow controls with proper text wrapping.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the issues described in #2599; no unrelated modifications found in the contact forms, developer toolkit, or thread cards components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

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

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: 1

Caution

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

⚠️ Outside diff range comments (1)
src/routes/threads/ThreadCard.svelte (1)

14-22: Remove undefined utility class wrap-break-word from line 16.

The class wrap-break-word is not defined anywhere in the codebase and is not a standard Tailwind utility. The word-breaking styling is already applied to the h3 element via the component's <style> block (lines 71–76), making this class redundant and non-functional. Remove wrap-break-word from the class attribute.

🧹 Nitpick comments (1)
src/routes/threads/ThreadCard.svelte (1)

33-37: Add key to each block for proper list handling.

The ESLint warning correctly identifies that this {#each} block is missing a key. While this might work for stable data, it's best practice to add a key for proper DOM reconciliation.

Apply this diff to add a key:

-{#each thread.tags ?? [] as tag}
+{#each thread.tags ?? [] as tag, index (index)}
     <li class="min-w-0">
         <div class="web-tag truncate">{tag}</div>
     </li>
 {/each}

Note: If tags are guaranteed to be unique, you could use (tag) as the key instead of (index).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89cd54f and a6ec155.

📒 Files selected for processing (4)
  • src/routes/(marketing)/(components)/developers-toolkit.svelte (4 hunks)
  • src/routes/contact-us/+page.svelte (3 hunks)
  • src/routes/startups/+page.svelte (4 hunks)
  • src/routes/threads/ThreadCard.svelte (4 hunks)
🧰 Additional context used
🪛 ESLint
src/routes/threads/ThreadCard.svelte

[error] 33-37: Each block should have a key

(svelte/require-each-key)

🔇 Additional comments (12)
src/routes/contact-us/+page.svelte (3)

145-145: LGTM: Proper form width constraint and centering.

The mx-auto max-w-xl combination properly centers and constrains the form width, aligning with the PR's objective of consistent layout across breakpoints.


194-217: LGTM: Consistent button wrapper constraint.

The button wrapper now shares the same max-w-xl constraint as the form above, creating a unified, centered layout. The justify-between properly spaces the error message and submit button.


210-216: LGTM: Correct Tailwind v4 important syntax and responsive button behavior.

The button properly uses w-full! and lg:w-auto! (with ! at the end per Tailwind v4 requirements), making it full-width on mobile and compact on desktop as intended.

src/routes/(marketing)/(components)/developers-toolkit.svelte (2)

63-79: LGTM: Responsive padding prevents overflow on small screens.

The progressive padding scale (px-0.5 sm:px-1 md:px-2 lg:px-3) provides minimal spacing on mobile to prevent horizontal overflow while scaling up appropriately on larger viewports. This directly addresses the stated objective of preventing cramped spacing and overflow in the Developer Toolkit.


70-77: LGTM: Hidden labels prevent overflow while preserving accessibility.

Wrapping labels with hidden lg:inline effectively prevents text overflow on small screens while keeping icons visible and tappable. The alt attribute on the images maintains accessibility for screen readers.

Also applies to: 100-107

src/routes/threads/ThreadCard.svelte (3)

31-38: LGTM: Proper flex wrapping and tag truncation.

The combination of min-w-0, flex-wrap, and truncate effectively prevents tag overflow on small screens. Tags will wrap to new lines when needed, and individual long tags will truncate with ellipsis.


40-46: LGTM: Reply counter protected from shrinking.

The shrink-0 class prevents the reply counter from being compressed in flex layouts, ensuring it remains readable at its intended size.


51-92: LGTM: Comprehensive overflow handling and word-breaking rules.

The CSS properly implements:

  • overflow: hidden on the card to prevent horizontal scroll
  • Multiple word-breaking properties (overflow-wrap, word-wrap, word-break) for cross-browser compatibility
  • hyphens: auto for improved readability
  • Tag truncation styles to support the truncate class

These changes effectively address the stated objective of keeping long URLs and text within card boundaries on mobile.

src/routes/startups/+page.svelte (4)

319-319: LGTM: Formatting cleanup.

Removed unnecessary leading space in the class attribute.


402-406: LGTM: Consistent form width constraint.

The form wrapper uses the same mx-auto max-w-xl pattern as the contact-us page, providing consistent responsive behavior across both forms.


460-478: LGTM: Consistent button wrapper with clever line break control.

The button wrapper matches the contact-us pattern. The hidden sm:block on the <br> (line 466) is a clever solution to control text wrapping—the reCAPTCHA disclaimer stays on one line on mobile and breaks appropriately on larger screens.


485-491: LGTM: Correct Tailwind v4 syntax and consistent responsive behavior.

The submit button uses proper Tailwind v4 important syntax (w-full! and lg:w-auto!) and matches the responsive behavior implemented in the contact-us form.

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: 1

Caution

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

⚠️ Outside diff range comments (1)
src/routes/threads/ThreadCard.svelte (1)

31-47: Verify the responsive layout changes and add a key to the each block.

The min-w-0, flex-wrap, truncate, and shrink-0 utilities properly handle tag wrapping and prevent layout overflow on mobile. However, the {#each} block at lines 33-37 is missing a key directive, which can cause DOM reconciliation issues when the tag list changes.

Apply this diff to add a unique key:

-                {#each thread.tags ?? [] as tag}
+                {#each thread.tags ?? [] as tag (tag)}
                     <li class="min-w-0">
                         <div class="web-tag truncate">{tag}</div>
                     </li>

Note: This assumes tags are unique. If tags can be duplicated, use (tag, index) as the key instead, though this is less ideal for performance.

♻️ Duplicate comments (1)
src/routes/threads/ThreadCard.svelte (1)

24-29: Remove the undefined u-break-word utility class.

The u-break-word class on line 25 was previously flagged as non-existent in the codebase and marked as "Addressed in commit 4630e29", but it still appears in the code. This class has no effect. The word-breaking behavior is already handled by the CSS rules in .thread p {} at lines 64-69.

Apply this diff to remove the undefined class:

-            class="web-main-body-500 u-margin-block-start-4 u-break-word min-w-0"
+            class="web-main-body-500 u-margin-block-start-4 min-w-0"
🧹 Nitpick comments (2)
src/routes/threads/ThreadCard.svelte (2)

64-76: Consider removing redundant inherited word-breaking rules.

Lines 64-76 re-declare overflow-wrap, word-wrap, word-break, and hyphens on child p and h3 elements, but these properties are already defined on the parent .thread (lines 60-62) and are inherited. Unless there's a specific override needed, these declarations are redundant.

Additionally, word-break: break-word (lines 67, 74) is non-standard, as noted in the previous comment.

Apply this diff to remove the redundant rules:

         overflow-wrap: break-word;
         word-wrap: break-word;
-        word-break: break-word;
 
-        p {
-            overflow-wrap: break-word;
-            word-wrap: break-word;
-            word-break: break-word;
-            hyphens: auto;
-        }
-
-        h3 {
-            overflow-wrap: break-word;
-            word-wrap: break-word;
-            word-break: break-word;
-            hyphens: auto;
-        }
+        p,
+        h3 {
+            hyphens: auto;
+        }
     }

Note: Keep the hyphens: auto on children only if you want to be explicit, or remove it entirely if inheritance from .thread is sufficient.


87-92: Remove duplication between CSS and Tailwind utility.

The .web-tag CSS at lines 87-92 duplicates the truncate utility class applied on line 35. The truncate utility already provides overflow: hidden, text-overflow: ellipsis, and white-space: nowrap.

Option 1: Remove the truncate class from line 35 and keep only the CSS:

-                        <div class="web-tag truncate">{tag}</div>
+                        <div class="web-tag">{tag}</div>

Option 2: Keep the truncate utility and simplify the CSS to only add max-width:

     .web-tag {
         max-width: 100%;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
     }

Option 2 is preferred as it leverages Tailwind utilities while adding only the additional constraint needed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6ec155 and 4630e29.

📒 Files selected for processing (1)
  • src/routes/threads/ThreadCard.svelte (4 hunks)
🧰 Additional context used
🪛 ESLint
src/routes/threads/ThreadCard.svelte

[error] 33-37: Each block should have a key

(svelte/require-each-key)

🔇 Additional comments (2)
src/routes/threads/ThreadCard.svelte (2)

14-22: LGTM! Proper flex overflow handling.

The min-w-0 utilities correctly enable the flex container and title to shrink below their min-content width, preventing overflow on narrow viewports.


51-55: LGTM! Proper overflow containment.

The overflow: hidden on .web-card prevents content from visually escaping the card boundaries, working in conjunction with the word-breaking and wrapping rules.

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: 1

🧹 Nitpick comments (2)
src/routes/threads/ThreadCard.svelte (2)

35-36: Avoid duplicating truncation logic between Tailwind and .web-tag CSS.

.web-tag now applies overflow: hidden, text-overflow: ellipsis, and white-space: nowrap, which overlaps with the truncate utility on the same element. To keep a single source of truth, consider dropping truncate from the markup and relying on the .web-tag rule:

-    <div class="web-tag truncate">{tag}</div>
+    <div class="web-tag">{tag}</div>

This keeps behavior while simplifying the class list.

Also applies to: 84-89


52-55: Clipping card overflow is reasonable for this layout.

Adding overflow: hidden to .web-card will prevent child content from bleeding outside the card on small screens, which matches the goal of eliminating horizontal scroll. Just be aware this will also clip any internal overflow (e.g., extra-long focus rings or box-shadows) if those are added later.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4630e29 and c4b898b.

📒 Files selected for processing (1)
  • src/routes/threads/ThreadCard.svelte (4 hunks)
🧰 Additional context used
🪛 ESLint
src/routes/threads/ThreadCard.svelte

[error] 33-37: Each block should have a key

(svelte/require-each-key)

🔇 Additional comments (6)
src/routes/threads/ThreadCard.svelte (6)

14-16: Header flex adjustments look correct.

Making the header row flex with min-w-0 and giving the title a flexible width should prevent it from forcing horizontal overflow while still letting it grow naturally. No changes needed here.


24-29: Body text overflow handling is appropriate.

Adding min-w-0 to the content paragraph complements the new .thread word-wrapping rules and helps avoid horizontal scrolling on small screens. Looks good.


31-36: Tag container flex/wrap behavior is well tuned.

Using min-w-0 plus flex-wrap on the tags container and items should keep tags within the card while allowing natural wrapping across lines. This aligns well with the overflow constraints.


40-46: Reply button flex behavior is appropriate.

Keeping the replies button as a flex container with shrink-0 is a good way to ensure the counter and icon remain visible and aligned while the textual content and tags wrap independently.


57-73: Thread text wrapping and hyphenation rules are solid.

max-width: 100% plus overflow-wrap/word-wrap and hyphens: auto on both p and h3 should handle long URLs and titles cleanly within the card, without relying on nonstandard word-break values. This is a nice, standards-compliant improvement.


84-89: Global .web-tag truncation matches the PR’s goals.

Constraining .web-tag with max-width: 100%, hidden overflow, ellipsis, and no wrapping aligns with the intent to keep tags on one line and avoid layout shifts in tight spaces. No issues here.

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

♻️ Duplicate comments (1)
src/routes/threads/ThreadCard.svelte (1)

25-25: Reconfirm u-break-word utility or drop it as redundant

u-break-word is still present on the paragraph, but long‑content wrapping is already handled via the .thread SCSS rules below. If u-break-word remains an undefined utility, it adds noise without effect; if it was added later, it’s now somewhat redundant.

Either:

  • Confirm it’s defined and intentionally kept, or
  • Remove it to rely solely on the .thread styles.

You can re‑check its definition with:

#!/bin/bash
# Verify any definitions/usages of u-break-word
rg -n "u-break-word" src/app.css src/scss || echo "No matches found for u-break-word"
🧹 Nitpick comments (1)
src/routes/threads/ThreadCard.svelte (1)

31-36: Tag flex/wrap + truncation behavior matches mobile overflow goals

The combination of flex min-w-0 flex-wrap on the container, min-w-0 on <li>, and .web-tag truncate (plus the SCSS below) should keep tags within the card, let chips wrap to new lines, and ellipsize overly long tag text. This aligns well with the “no horizontal scroll, clean wrapping” requirement.

If tags are guaranteed unique per thread, you could simplify the key to (tag), but the current (tag + index) is functionally fine.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4b898b and f084273.

📒 Files selected for processing (1)
  • src/routes/threads/ThreadCard.svelte (4 hunks)
🔇 Additional comments (3)
src/routes/threads/ThreadCard.svelte (3)

14-17: min-w-0 on flex row and heading correctly prevents title overflow

Using min-w-0 on the flex container and h3 with flex-1 is the right pattern to allow the title to shrink/wrap instead of forcing horizontal scroll in tight layouts. No issues here.


41-46: Reply counter shrink-0 avoids clipping in tight flex layouts

Adding flex shrink-0 items-center on the replies button is a good call: it prevents the icon/counter cluster from being squashed when the title/description grow, which directly helps maintain readability on small screens.


54-61: Text wrapping and truncation rules look consistent and robust

overflow: hidden on .web-card plus the .thread word‑wrapping and hyphenation (and the .web-tag truncation styles) give you strong control over long titles, content, URLs, and tags so they stay within card bounds without horizontal scrolling. This matches the thread‑card objectives and should behave well across breakpoints.

Also applies to: 63-73, 84-89

Copy link
Member

@HarshMN2345 HarshMN2345 left a comment

Choose a reason for hiding this comment

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

Thanks @AbhiVarde for the contribution 🙌
Really appreciate you taking the time to work on this, great job so far!

A few frontend improvement suggestions for the Startups page from my side:

Increase spacing between the two containers (around 8px would look better)

Make the BUILD container full width

Center align both containers to the page for better layout balance

Remove the line on the right side of the BUILD container

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 (1)
src/routes/(marketing)/(components)/developers-toolkit.svelte (1)

67-79: Label hiding and padding achieve the mobile overflow goals

Using responsive padding (px-0.5 sm:px-1 md:px-2 lg:px-3) plus w-fit on the pill links, and moving the textual label into <span class="hidden lg:inline">, keeps the icons tappable while preventing text overflow on small screens. The img alt text still provides an accessible name for the links when labels are hidden, so this change is consistent with the linked issue’s requirements.

If this pattern is reused elsewhere, consider extracting a small ProductLink component to avoid duplication between the Build and Deploy groups.

Also applies to: 97-109

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f084273 and 32a06a2.

📒 Files selected for processing (1)
  • src/routes/(marketing)/(components)/developers-toolkit.svelte (4 hunks)
🧰 Additional context used
🪛 ESLint
src/routes/(marketing)/(components)/developers-toolkit.svelte

[error] 66-66: Unexpected href link without resolve().

(svelte/no-navigation-without-resolve)

🔇 Additional comments (2)
src/routes/(marketing)/(components)/developers-toolkit.svelte (2)

55-60: Responsive stacking and divider behavior look correct

The outer wrapper now stacks the Build/Deploy groups vertically on small screens and switches to a horizontal, wrapping layout on lg with the dashed divider only visible on large screens. The w-fulllg:w-auto behavior on the Build pill matches the objective of keeping things centered and compact on desktop while avoiding overflow on mobile.

Also applies to: 86-86


64-67: I'm unable to verify this review comment because the repository is currently inaccessible—the cloning operation failed. Without access to the codebase, I cannot:

  1. Confirm whether the svelte/no-navigation-without-resolve ESLint rule is configured in the project
  2. Verify if $app/paths and the resolve() function are available in this SvelteKit project
  3. Validate that the code at lines 64-67 and 94-97 matches the provided snippet
  4. Check how resolve() is used elsewhere in the codebase
  5. Determine whether the suggested fix is appropriate for this project

Manual verification required: Please confirm the following:

  • Is svelte/no-navigation-without-resolve configured in your ESLint setup?
  • Does your project use SvelteKit's $app/paths module?
  • Are internal navigation links in other parts of the codebase wrapped with resolve()?

@AbhiVarde
Copy link
Author

Hey @HarshMN2345, thanks! Changes applied, ready for another look 🙏

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.

🐛 Bug: Contact & Startups form layouts inconsistent on mobile + developer toolkit overflow + thread cards overflow on small screens

2 participants