Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular loading spinner is an oval on mobile #29041

Closed
lukeh990 opened this issue Feb 4, 2024 · 4 comments · Fixed by #29801
Closed

Circular loading spinner is an oval on mobile #29041

lukeh990 opened this issue Feb 4, 2024 · 4 comments · Fixed by #29801
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@lukeh990
Copy link

lukeh990 commented Feb 4, 2024

Description

When doing any operation that starts a loading spinner on mobile. It is always an oblong shape instead of a perfect circle. Most notably I see this when loading the user dashboard, logging in with passkey, or in any loading spinner.

Screenshots

IMG_0226

Gitea Version

1.21.5

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

iOS 17.3

Browser Version

AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Mobile/15E148 Safari/604.1

@lukeh990 lukeh990 added topic/ui Change the appearance of the Gitea UI type/bug labels Feb 4, 2024
@yardenshoham
Copy link
Member

Can't reproduce on chrome
image

@techknowlogick
Copy link
Member

techknowlogick commented Feb 4, 2024

I've seen this on Gitea.com using the mobile safari browser. I can't replicate using a desktop browser even after changing viewport, so I'll have to figure out how to finally set up the remote developer console so I can see what happening.

Edit: I've only seen this on the 2fa waiting/login screen

@lukeh990
Copy link
Author

lukeh990 commented Feb 4, 2024

I was able to recreate it again on a Mac. The easiest way I found of replicating it is with the passkey prompt. It was even on the desktop viewport. It is most certainly a webkit issue. I tired poking around with the CSS and it look like the aspect-ratio: 1 set on the .is-loading:after selector is not being enforced as the width and height are not the same.
Screenshot 2024-02-04 at 13 57 38
Screenshot 2024-02-04 at 13 51 09

@lukeh990
Copy link
Author

lukeh990 commented Feb 4, 2024

I think I've managed to isolate the issue to the border properties. I created a codeine and started adding individual components of the gitea .is-loading::after selector. It looked fine up until I added the border in. After that it just suddenly jumped. See this codepen (Only works with safari).

I made a little diagram of what is happening:
Screenshot 2024-02-04 at 14 22 53

Edit: here is the CSS that I put on the divs:

div {
  width: 40px;
  height: 40px;
  
  pointer-events: none !imoortant;
  position: relative !important;
  overflow: hidden !important;
}

Here is what the codepen window looks like:
Screenshot 2024-02-04 at 14 21 25

techknowlogick pushed a commit that referenced this issue Mar 14, 2024
Fixes: #29041
Fixes: #29713

Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 14, 2024
Fixes: go-gitea#29041
Fixes: go-gitea#29713

Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.
silverwind added a commit that referenced this issue Mar 14, 2024
Backport #29801 by @silverwind

Fixes: #29041
Fixes: #29713

Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.

Before:
<img width="184" alt="Screenshot 2024-03-14 at 22 29 58"
src="https://github.com/go-gitea/gitea/assets/115237/6effc5f0-bc64-4752-be74-9c43b3974407">

After:
<img width="177" alt="Screenshot 2024-03-14 at 22 30 30"
src="https://github.com/go-gitea/gitea/assets/115237/5de244d7-6b46-428e-957c-4b10f53e2441">

Co-authored-by: silverwind <me@silverwind.io>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 20, 2024
Fixes: go-gitea/gitea#29041
Fixes: go-gitea/gitea#29713

Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.

(cherry picked from commit 35def319fdb8c73aa5e2c52fad5230d287e2bd93)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 22, 2024
Backport #29801 by @silverwind

Fixes: go-gitea/gitea#29041
Fixes: go-gitea/gitea#29713

Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.

Before:
<img width="184" alt="Screenshot 2024-03-14 at 22 29 58"
src="https://github.com/go-gitea/gitea/assets/115237/6effc5f0-bc64-4752-be74-9c43b3974407">

After:
<img width="177" alt="Screenshot 2024-03-14 at 22 30 30"
src="https://github.com/go-gitea/gitea/assets/115237/5de244d7-6b46-428e-957c-4b10f53e2441">

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit df23ec0f8b490bee49dc0e7944b529f3ede35301)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants