Skip to content

chore: Clean up homepage code examples (tweak comments + no wrapping)#6470

Merged
ovflowd merged 6 commits intomainfrom
MattIPv4/clean-up-homepage-examples
Mar 12, 2024
Merged

chore: Clean up homepage code examples (tweak comments + no wrapping)#6470
ovflowd merged 6 commits intomainfrom
MattIPv4/clean-up-homepage-examples

Conversation

@MattIPv4
Copy link
Copy Markdown
Member

@MattIPv4 MattIPv4 commented Mar 9, 2024

Description

Ensures that tabs + code don't allow for whitespace wrapping outside of what is in the source, preferring to overflow with scrolling within their container. I should note that I tried my best to resolve some responsiveness issues that this introduces (hence setting some max/min widths to stop grid/flex overflowing -- that being said, it looks like there are general responsiveness issues on these pages beyond this change (especially around tablet breakpoints).

Also, cleans up the comments in the examples to better follow what I think the user flow would be for trying them out, as I'd noted in #6457 (review)

Validation

On mobile + desktop, the code examples on the homepage behave as one would expect them to. On mobile, you can scroll the tabs + code to see more, rather than it wrapping.

Related Issues

Fixes #6388

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npx turbo format to ensure the code follows the style guide.
  • I have run npx turbo test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@MattIPv4 MattIPv4 requested a review from a team as a code owner March 9, 2024 05:33
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 9, 2024

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 11, 2024 1:27am

@MattIPv4 MattIPv4 changed the title chore: Clean up homepage code examples (tweak comments + no warpping) chore: Clean up homepage code examples (tweak comments + no wrapping) Mar 9, 2024
@MattIPv4 MattIPv4 force-pushed the MattIPv4/clean-up-homepage-examples branch from 21539ac to 02f478e Compare March 9, 2024 05:34
canerakdas

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟢 90 🟢 96 🟢 91 🔗
/en/about 🟢 100 🟢 91 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 90 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟠 89 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 90 🟢 96 🟢 92 🔗

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2024

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 84%
80.07% (450/562) 79.55% (144/181) 71.17% (79/111)

Unit Test Report

Tests Skipped Failures Errors Time
90 0 💤 0 ❌ 0 🔥 4.79s ⏱️

@MattIPv4
Copy link
Copy Markdown
Member Author

MattIPv4 commented Mar 10, 2024

When I check the preview on my phone, the CodeBox component seems to increase the width of the page layout;

Heh, I thought I'd fixed that. Will continue playing around with getting flex + grid to behave. I suspect I need to throw some more max-w-full onto things.

Open to suggestions on a cleaner way to make that happen.

Copy link
Copy Markdown
Member

@canerakdas canerakdas left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Mar 11, 2024

Just to confirm, scrolling is only on mobile, right? The intended behaviour on desktop is wrapping

@MattIPv4
Copy link
Copy Markdown
Member Author

Just to confirm, scrolling is only on mobile, right? The intended behaviour on desktop is wrapping

Not currently, I have this set to scroll everywhere. Why would it want to wrap on desktop, that seems like a rather inconsistent behaviour that looks odd?

Copy link
Copy Markdown
Contributor

@mwenku mwenku left a comment

Choose a reason for hiding this comment

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

Here to learn something new... :)

Copy link
Copy Markdown
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

LGTM! Let's see how it looks like and the feedback we get

@ovflowd ovflowd added this pull request to the merge queue Mar 12, 2024
Merged via the queue into main with commit 268a4e0 Mar 12, 2024
@ovflowd ovflowd deleted the MattIPv4/clean-up-homepage-examples branch March 12, 2024 10:22
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.

instead of wrapping text on mobile on homepage on code examples, let user scroll horizontally

5 participants