Skip to content

Fix horizontal scrolling on mobile#63

Merged
leogdion merged 2 commits intomainfrom
62-fix-horizontal-scrolling-on-mobile
Apr 29, 2026
Merged

Fix horizontal scrolling on mobile#63
leogdion merged 2 commits intomainfrom
62-fix-horizontal-scrolling-on-mobile

Conversation

@leogdion
Copy link
Copy Markdown
Member

@leogdion leogdion commented Apr 29, 2026

Summary by CodeRabbit

  • Documentation

    • Enhanced Xcode project setup tutorial with expanded guidance and added resource links for commonly referenced tools.
  • Bug Fixes

    • Improved horizontal overflow handling to prevent unwanted layout breaks and visual issues.
    • Fixed code block scrolling for better readability of long lines.
    • Refined image sizing constraints for consistent page layout.
  • Chores

    • Updated Swift package dependency.

leogdion and others added 2 commits April 29, 2026 10:13
Remove w-screen (100vw) from mobile nav, add overflow-x: hidden on
html, constrain full-size images with max-w-full, and add overflow-x
fallback on code blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@leogdion leogdion linked an issue Apr 29, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

Updates tutorial documentation with external links to Xcodegen and Tuist tools, restructures a section heading, bumps the xmlcoder Swift Package dependency from 0.18.0 to 0.18.1, and refines CSS overflow rules to prevent unwanted horizontal scrolling and constrain image widths.

Changes

Cohort / File(s) Summary
Tutorial Documentation
Content/tutorials/tuist-xcode-project-setup.md
Added inline external links to Xcodegen and Tuist tools in the "2 leading tools" section, reorganized "Ignoring Our Project" section with a horizontal rule separator, and expanded surrounding prose.
Swift Package Dependencies
Package.resolved
Updated xmlcoder dependency from version 0.18.0 to 0.18.1 with corresponding revision hash update.
Styling Improvements
Styling/styles/styles.css
Added HTML horizontal overflow suppression, removed w-screen from positioned header navigation, constrained .full-size images with max-w-full, and enabled horizontal scrolling for pre code blocks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • Adding Tuist Article #60: Adds the Tuist tutorial article that this PR subsequently refines with external links and section restructuring.

Poem

🐰 Links now gleam to guide the way,
Overflow woes don't dare to stay,
Fresh deps arrive, so spry and trim—
Our web now dances, bright and slim! ✨

🚥 Pre-merge checks | ✅ 5
✅ 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 'Fix horizontal scrolling on mobile' accurately reflects the main objective of the PR, which focuses on CSS overflow handling to prevent horizontal scrolling issues on mobile devices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 62-fix-horizontal-scrolling-on-mobile

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Content/tutorials/tuist-xcode-project-setup.md`:
- Around line 15-19: Fix the three user-facing copy issues in the paragraph:
replace "eleviated" with "alleviated", change "There’s 2 leading tools" to
"There are two leading tools", and change "most any case" to "most cases" (or
"most other cases"); ensure the surrounding sentences read smoothly and keep
emphasis on not committing Xcode projects to the repo. Update the strings in the
Content/tutorials/tuist-xcode-project-setup.md block containing those phrases.

In `@Styling/styles/styles.css`:
- Around line 1319-1320: The stylelint failure is caused by missing empty line
before the declaration `overflow-x: auto;`; edit the CSS rule that contains the
`@apply whitespace-pre-wrap ...` declaration and insert a single blank line
immediately before the `overflow-x: auto;` line so there is an empty line
between the `@apply ...;` statement and the `overflow-x` declaration to satisfy
the `declaration-empty-line-before` rule.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3171d718-dd0c-4cb0-a2ff-9f51a140d07b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f29cf2 and 20a0aa5.

📒 Files selected for processing (3)
  • Content/tutorials/tuist-xcode-project-setup.md
  • Package.resolved
  • Styling/styles/styles.css

Comment on lines +15 to +19
The Xcode project uses a _proprietary format_ that is notoriously difficult to work with, especially when dealing with merge conflicts in version control. In the ancient days, it was Storyboards and Xcode projects which were the biggest culprits of merge conflict hell. Coding your UI in UIKit and then SwiftUI eleviated the Storyboard issue but Xcode projects still remain.

This is where a tool which creates the Xcode project is most helpful. There’s 2 leading tools which I’d recommend: Xcodegen or Tuist. Xcodegen is great if you have a fairly simple app or minimal team structure. Xcodegen uses YAML for its specification structure — if you prefer a simpler static config format, it’s the right choice. For a broader look at both tools, see [How to automate iOS development](/articles/ios-automation/).
This is where a tool which creates the Xcode project is most helpful. There’s 2 leading tools which I’d recommend: Xcodegen or Tuist. [Xcodegen](https://github.com/yonaskolb/xcodegen) is great if you have a fairly simple app or minimal team structure. Xcodegen uses YAML for its specification structure — if you prefer a simpler static config format, it’s the right choice. For a broader look at both tools, see [How to automate iOS development](/articles/ios-automation/).

Tuist is what I’d recommend in most any other case. Tuist uses Swift for its manifest files, which is a deliberate design choice — it gives you type-checking and the full power of the language for complex configurations. Tuist has a very robust community and support as well. In the end I’d highly recommend **not** committing Xcode projects to your code repository.
[Tuist](https://tuist.dev) is what I’d recommend in most any other case. Tuist uses Swift for its manifest files, which is a deliberate design choice — it gives you type-checking and the full power of the language for complex configurations. Tuist has a very robust community and support as well. In the end I’d highly recommend **not** committing Xcode projects to your code repository.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Polish intro copy for clarity and correctness.

There are a few user-facing text issues in this edited block (eleviated, “There’s 2”, and “most any”) that read as errors in published content.

Suggested copy edit
-The Xcode project uses a _proprietary format_ that is notoriously difficult to work with, especially when dealing with merge conflicts in version control. In the ancient days, it was Storyboards and Xcode projects which were the biggest culprits of merge conflict hell. Coding your UI in UIKit and then SwiftUI eleviated the Storyboard issue but Xcode projects still remain.
+The Xcode project uses a _proprietary format_ that is notoriously difficult to work with, especially when dealing with merge conflicts in version control. In the past, Storyboards and Xcode projects were the biggest culprits of merge-conflict pain. Coding UI in UIKit and later SwiftUI alleviated many Storyboard issues, but Xcode projects still remain.

-This is where a tool which creates the Xcode project is most helpful. There’s 2 leading tools which I’d recommend: Xcodegen or Tuist. [Xcodegen](https://github.com/yonaskolb/xcodegen) is great if you have a fairly simple app or minimal team structure. Xcodegen uses YAML for its specification structure — if you prefer a simpler static config format, it’s the right choice. For a broader look at both tools, see [How to automate iOS development](/articles/ios-automation/). 
+This is where a tool that generates the Xcode project is most helpful. There are two leading tools I recommend: Xcodegen and Tuist. [Xcodegen](https://github.com/yonaskolb/xcodegen) is great for a fairly simple app or a smaller team structure. Xcodegen uses YAML for its specification format — if you prefer a simpler static config, it’s the right choice. For a broader look at both tools, see [How to automate iOS development](/articles/ios-automation/).

-[Tuist](https://tuist.dev) is what I’d recommend in most any other case. Tuist uses Swift for its manifest files, which is a deliberate design choice — it gives you type-checking and the full power of the language for complex configurations. Tuist has a very robust community and support as well. In the end I’d highly recommend **not** committing Xcode projects to your code repository.
+[Tuist](https://tuist.dev) is what I’d recommend in almost any other case. It uses Swift for manifest files, which is a deliberate design choice — you get type-checking and the full power of the language for complex configurations. It also has a robust community and strong support. In the end, I highly recommend **not** committing Xcode projects to your repository.
🧰 Tools
🪛 LanguageTool

[grammar] ~15-~15: Ensure spelling is correct
Context: ...oding your UI in UIKit and then SwiftUI eleviated the Storyboard issue but Xcode projects...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~19-~19: Avoid the colloquial phrase ‘most any’ in formal writing. Use “almost any” instead.
Context: ...s://tuist.dev) is what I’d recommend in most any other case. Tuist uses Swift for its ma...

(MOST_EVERYONE)


[style] ~19-~19: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...he language for complex configurations. Tuist has a very robust community and support...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Content/tutorials/tuist-xcode-project-setup.md` around lines 15 - 19, Fix the
three user-facing copy issues in the paragraph: replace "eleviated" with
"alleviated", change "There’s 2 leading tools" to "There are two leading tools",
and change "most any case" to "most cases" (or "most other cases"); ensure the
surrounding sentences read smoothly and keep emphasis on not committing Xcode
projects to the repo. Update the strings in the
Content/tutorials/tuist-xcode-project-setup.md block containing those phrases.

Comment thread Styling/styles/styles.css
Comment on lines +1319 to +1320
@apply whitespace-pre-wrap text-xs font-extralight p-4 bg-gray-900 text-white block my-4 lg:text-base lg:p-8;
overflow-x: auto;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix stylelint failure on declaration spacing.

Line 1320 needs an empty line before overflow-x: auto; to satisfy declaration-empty-line-before.

Suggested fix
       pre code {
         `@apply` whitespace-pre-wrap text-xs font-extralight p-4 bg-gray-900 text-white block my-4 lg:text-base lg:p-8;
+
         overflow-x: auto;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@apply whitespace-pre-wrap text-xs font-extralight p-4 bg-gray-900 text-white block my-4 lg:text-base lg:p-8;
overflow-x: auto;
`@apply` whitespace-pre-wrap text-xs font-extralight p-4 bg-gray-900 text-white block my-4 lg:text-base lg:p-8;
overflow-x: auto;
🧰 Tools
🪛 Stylelint (17.9.0)

[error] 1320-1320: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Styling/styles/styles.css` around lines 1319 - 1320, The stylelint failure is
caused by missing empty line before the declaration `overflow-x: auto;`; edit
the CSS rule that contains the `@apply whitespace-pre-wrap ...` declaration and
insert a single blank line immediately before the `overflow-x: auto;` line so
there is an empty line between the `@apply ...;` statement and the `overflow-x`
declaration to satisfy the `declaration-empty-line-before` rule.

@leogdion leogdion merged commit 494d0ec into main Apr 29, 2026
5 checks passed
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.

Fix Horizontal Scrolling on Mobile

1 participant