Skip to content

Conversation

@mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Jan 30, 2025

Motivation

Currently, there are large side gaps on mobile that take up too much space. This PR improves the UI by reducing those gaps, allowing more content to be displayed on mobile.

Demo: https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/

Changes

  • Remove extra padding and rounding from the layout.content mixin (it's used only in the Content and SplitContent components).
  • Add top-left corner rounding to the Content and SplitContent components when the menu is open to maintain a consistent style.
  • Decrease Nav padding to match the updated Content horizontal gaps.
  • Use the default scrollbar style for mobile to prevent extra space allocation (a thin, auto-hiding bar that doesn't take up additional space).

Screenshots

Before After
image image
image image
image image
image image

@mstrasinskis mstrasinskis marked this pull request as ready for review February 3, 2025 14:11
@mstrasinskis mstrasinskis requested review from a team as code owners February 3, 2025 14:11
@mstrasinskis mstrasinskis force-pushed the reduce-padding-on-mobile branch from 826c130 to 5dbb40e Compare February 3, 2025 16:42
@mstrasinskis mstrasinskis requested a review from dskloetd February 3, 2025 16:43
@mstrasinskis mstrasinskis merged commit 8e74596 into main Feb 4, 2025
9 checks passed
@mstrasinskis mstrasinskis deleted the reduce-padding-on-mobile branch February 4, 2025 08:19
github-merge-queue bot pushed a commit to dfinity/nns-dapp that referenced this pull request Feb 4, 2025
# Motivation

Currently, there are large side gaps on mobile that take up too much
space. This PR improves the UI by reducing those gaps, allowing more
content to be displayed on mobile.

Demo:
https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/

# Changes

- npm run upgrade:gix to fetch [related
changes](dfinity/gix-components#572).
- Update mobile styles:
- Add a margin to the filter buttons because they have a negative
margin. Otherwise, their borders are partly hidden.
  - Align the universe selector with the content width.
  - Avoid extra padding on portfolio page.

# Tests

- ~Add global ResizeObserver mock, because of [changes in
gix-components](dfinity/gix-components#565
Not needed [anymore](#6320).
- Still pass.
- Screenshots updated.
- Tested manually.

| Before | After |
|--------|--------|
| <img width="385" alt="image"
src="https://github.com/user-attachments/assets/5215a783-c567-4374-be93-98505ab22b86"
/> | <img width="388" alt="image"
src="https://github.com/user-attachments/assets/1580f18e-9158-49c6-be99-4782c530cbf1"
/> |
| <img width="387" alt="image"
src="https://github.com/user-attachments/assets/96eb9131-48c9-4953-954c-05dce5ffd73d"
/> | <img width="386" alt="image"
src="https://github.com/user-attachments/assets/2ecb5e16-5553-4a8b-8949-dce90f106f93"
/> |
| <img width="385" alt="image"
src="https://github.com/user-attachments/assets/14ce43ac-a5e7-47af-afe8-16a26e146f9d"
/> | <img width="387" alt="image"
src="https://github.com/user-attachments/assets/458d3157-9f70-4327-8ee7-f3fc60b5b860"
/> |
| <img width="388" alt="image"
src="https://github.com/user-attachments/assets/bd1b6eda-e9cb-4cbc-87b2-66f95ce531b6"
/> | <img width="386" alt="image"
src="https://github.com/user-attachments/assets/2a9c44cc-d2d9-481d-b699-68cc15bc9c3b"
/> |

# Todos

- [ ] Add entry to changelog (if necessary).
not necessary
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.

2 participants