Skip to content

Fix table overflow behavior on mobile#2062

Merged
pwizla merged 3 commits intostrapi:mainfrom
nc1z:main
Mar 26, 2024
Merged

Fix table overflow behavior on mobile#2062
pwizla merged 3 commits intostrapi:mainfrom
nc1z:main

Conversation

@nc1z
Copy link
Contributor

@nc1z nc1z commented Mar 20, 2024

What does it do?

Updated scss for table element so that table overflow doesn't push screen out of bounds on mobile.

Why is it needed?

UI bug that should be fixed for UX. This happens across the entire documentation sites, whenever we have <code> wrapped text in the tables that are too long, and pushes the table out of the viewport bounds.

Changes Made

  • Changed table overflow to auto
  • Removed comments since <Annotations> usage isn't affected by initial or auto (see #How to test). No existing impact since there are no current implementations of annotation component within markdown tables

Screenshots & gifs

Before Fix - iPhone 14 Pro Max Example
This was tested on an iPhone 14 plus in real life as well.
Link: https://docs.strapi.io/dev-docs/backend-customization/requests-responses

Before - UI bug After - overflow, scrollable

How to test

Related issue(s)/PR(s)

-

@nc1z nc1z requested a review from pwizla as a code owner March 20, 2024 14:09
@vercel
Copy link

vercel bot commented Mar 20, 2024

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

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2024 2:19pm

Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

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

Thanks, @nc1z!

It's approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

@pwizla pwizla self-assigned this Mar 26, 2024
@pwizla pwizla added source: Dev Docs PRs/issues targeting the Developer Docs pr: fix Used on the docs repo for anything that is not "new" or "updated" content: chore, typos, fixes, etc. labels Mar 26, 2024
@pwizla pwizla added this to the 4.21.1 milestone Mar 26, 2024
@pwizla pwizla merged commit 04d2a4b into strapi:main Mar 26, 2024
pwizla added a commit that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix Used on the docs repo for anything that is not "new" or "updated" content: chore, typos, fixes, etc. source: Dev Docs PRs/issues targeting the Developer Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants