Skip to content

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Oct 7, 2025

This changes the way how the "NoProjectMessage" is shown on mobile and tablet. A little padding is always added, so that the corners are not touching the browser borders.

Before on various mobile devices: iPhonePro12_b iPadMini_b iPadAir_b
After on various mobile devices: iPhonePro12 iPadMini iPadAir

@JPeer264 JPeer264 requested a review from vgrozdanic October 7, 2025 12:16
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 7, 2025
cursor[bot]

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Oct 7, 2025

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

cursor[bot]

This comment was marked as outdated.

@TkDodo
Copy link
Collaborator

TkDodo commented Oct 7, 2025

I think the after does look better, however:

@JPeer264
Copy link
Member Author

JPeer264 commented Oct 8, 2025

why would we hide the image completely on the smallest mobile device? I think there is still enough space to show it above the text

It was suggested by design to remove it entirely on mobile.

we should be able to achieve this with just the component. It allows for responsive props

Amazing, I must have skipped that part. Will add it.
Edit: It seems only the Container component is having these props. Not sure if the Container is the right use-case here

@TkDodo
Copy link
Collaborator

TkDodo commented Oct 8, 2025

It was suggested by design to remove it entirely on mobile.

👍

It seems only the Container component is having these props. Not sure if the Container is the right use-case here

Flex is built on top of Container, and it inherits all its props. Think of Container as a generic “div”, and Flex as a more contained and semantic Container that has some props pre-set, like display: 'flex' or 'inline-flex'.

So you have e.g. responsive width (inherited from Container) and responsive direction (added by Flex).

I’d like to understand what isn’t possible with the current layout components because it might mean we have to tweak them. But we shouldn’t need to apply classNames to an svg just to be able to layout things responsively.

@JPeer264 JPeer264 reopened this Oct 14, 2025
@JPeer264 JPeer264 changed the title fix(ui): adapt NoProjectMessage on mobile to hide image and add padding fix(ui): adapt NoProjectMessage on mobile to add padding and change direction Oct 14, 2025
@JPeer264
Copy link
Member Author

@TkDodo I changed everything to use the Flex and it looks way cleaner. However due to 1 limitation I now display the image on mobile (it will get downloaded anyways since it is inline).

The reason is, that the xs breakpoint inside the object is not really xs but everything between 0 and sm (which is 800px). And theoretically I wanted to hide the image only between 0 and 500px (which wouldn't be possible within this helper). I'm not sure if this is something we would like to add though

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

nice work 🙌

@JonasBa
Copy link
Member

JonasBa commented Oct 14, 2025

why would we hide the image completely on the smallest mobile device? I think there is still enough space to show it above the text

It was suggested by design to remove it entirely on mobile.

we should be able to achieve this with just the component. It allows for responsive props

Amazing, I must have skipped that part. Will add it. Edit: It seems only the Container component is having these props. Not sure if the Container is the right use-case here

@vgrozdanic what if we added a 0 breakpoint that would span from 0 to the next defined breakpoint? This way you could do {{0: 'none', xs: 'block'}}. Would that help solve your problem?

@JonasBa
Copy link
Member

JonasBa commented Oct 14, 2025

@vgrozdanic @TkDodo I've taken a first pass on this #101440

@JPeer264 JPeer264 merged commit c796176 into master Oct 15, 2025
81 of 104 checks passed
@JPeer264 JPeer264 deleted the jpeer/fix/mobile-no-project branch October 15, 2025 08:16
chromy pushed a commit that referenced this pull request Oct 17, 2025
…irection (#101065)

This changes the way how the "NoProjectMessage" is shown on mobile and
tablet. A little padding is always added, so that the corners are not
touching the browser borders.

<details>
<summary>
Before on various mobile devices:
</summary>
<img width="300" height="940" alt="iPhonePro12_b"
src="https://github.com/user-attachments/assets/556db191-0162-4ea2-8a70-c77c75f3c36a"
/>

<img width="300" height="1119" alt="iPadMini_b"
src="https://github.com/user-attachments/assets/b1ce2569-52de-49cf-9304-9d99223257cf"
/>

<img width="300" height="1145" alt="iPadAir_b"
src="https://github.com/user-attachments/assets/5e331af2-f417-48ab-8f59-c7c407d97edf"
/>

</details>

<details>
<summary>
After on various mobile devices:
</summary>

<img width="300" height="928" alt="iPhonePro12"
src="https://github.com/user-attachments/assets/1714fbbf-9599-4a6c-a595-e39de992d87e"
/>

<img width="300" height="1114" alt="iPadMini"
src="https://github.com/user-attachments/assets/2e1ef4ea-c43c-42f3-be49-68d9f609ce2f"
/>

<img width="300" height="1142" alt="iPadAir"
src="https://github.com/user-attachments/assets/50e775cc-bfd6-458c-b294-1d1f0e3fcdee"
/>

</details>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants