Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat(svelte): Improve commit page layout on mobile#63920

Merged
fkling merged 2 commits into
mainfrom
fkling/sk/commit-page-mobile
Jul 18, 2024
Merged

feat(svelte): Improve commit page layout on mobile#63920
fkling merged 2 commits into
mainfrom
fkling/sk/commit-page-mobile

Conversation

@fkling

@fkling fkling commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

I noticed that the commit page doesn't render well on mobile when the commit has a commit message.

This commit refactors how the Commit component is rendered, including on mobile, which affects both the commits and the commit page.

The two most important changes:

  • The component now uses CSS grid to be more flexible about how individual elements are arranged.
  • On mobile we don't show expand the message inline anymore but instead show it full screen. I think that works well for the commits list too because now you can open and read a longer commit message without having to scroll the commits list itself.

Here are side by side comparisons. The differences in the non-mobile view are barely perceivable, it's mostly spacing changes.

Before After
2024-07-18_17-51 2024-07-18_17-51_1
2024-07-18_17-52 2024-07-18_17-52_1
2024-07-18_17-52_2 2024-07-18_18-04
2024-07-18_17-53 2024-07-18_17-54
2024-07-18_17-55 2024-07-18_17-55_1

Test plan

Manually inspecting the commits and commit pages. Opened a long commit message to test that the message is properly scrollable.

@fkling fkling self-assigned this Jul 18, 2024
@cla-bot cla-bot Bot added the cla-signed label Jul 18, 2024
Comment thread client/web-sveltekit/src/lib/Commit.svelte Outdated
I noticed that the commit page doesn't render well on mobile when the
commit has a commit message.

This commit refactors how the `Commit` component is rendered, including
on mobile, which affects both the commits page as well as the commit
page.

The two most important changes:

- The component now uses CSS grid to be more flexible about how
  individual elements are arranged.
- On mobile we don't show expand the message inline anymore but instead
  show it full screen. I think that works well for the commits list too
  because now you can open and read a longer commit message without
  having to scroll the commits list itself.
@fkling fkling force-pushed the fkling/sk/commit-page-mobile branch from c280f8a to 029366c Compare July 18, 2024 16:11
@fkling fkling merged commit f983676 into main Jul 18, 2024
@fkling fkling deleted the fkling/sk/commit-page-mobile branch July 18, 2024 20:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants