Skip to content

Fix Safari layout bug on Performer details page - #7235

Open
dude-stash wants to merge 1 commit into
stashapp:developfrom
dude-stash:fix/safari-performer-details-layout
Open

dude-stash wants to merge 1 commit into
stashapp:developfrom
dude-stash:fix/safari-performer-details-layout

Conversation

@dude-stash

@dude-stash dude-stash commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Description

On Safari (desktop macOS), the Performer details panel renders stacked below the photo instead of beside it, while Chrome renders it correctly.

Root cause: isPlatformUniquelyRenderedByApple() (ui/v2.5/src/utils/apple.ts) checks UAParser().os.name?.includes("Mac OS") to detect Apple platforms and apply the .apple CSS class, which in turn triggers a Safari-specific display: flex fix for .detail-container in index.scss. ua-parser-js v2 (currently pinned in this repo) reports the macOS platform name as "macOS" rather than the "Mac OS" string used by v1, so the check never matches, the .apple class is never applied, and the flex fix never engages — leaving Safari on the default float-based layout, which stacks instead of sitting side-by-side.

The fix normalizes the OS name check to be case-insensitive and match both "Mac OS" and "macOS".

Related Issue

Fixes #7234

Testing

  • Reproduced the bug on Safari (macOS) on the Performer details page: details rendered below the photo instead of beside it.
  • Verified UAParser().os.name returns "macOS" on this Safari version, confirming the string mismatch against the old "Mac OS" check.
  • Applied the fix and confirmed isPlatformUniquelyRenderedByApple() now returns true, the .apple class is applied to the app root, and the Performer details panel renders beside the photo as on Chrome.
  • The fix also applies to Tags, Studios and other views

Screenshots

Attaching before/after screenshots from Safari.

Screenshot 2026-09-14 at 18 40 39

Fixed
Screenshot 2026-09-14 at 23 21 43

Screenshot 2026-09-14 at 23 21 34 Screenshot 2026-09-14 at 23 21 30 Screenshot 2026-09-14 at 23 21 54

Checklist

  • I have read and understood the Contributing document.
  • I have read and understood the AI Usage Policy document.
  • I have made corresponding changes to the documentation (if applicable).

AI Usage Disclosure

  • I have used AI tools to assist with this pull request, and I have disclosed the tools and how I used them below.

Claude Code (Sonnet 5) was used to investigate the root cause (tracing the CSS/UA-sniffing logic behind the Safari-only layout bug), diagnose the ua-parser-js v2 string mismatch, and implement the one-line fix in apple.ts.

Additional Context

@dude-stash
dude-stash marked this pull request as ready for review September 15, 2026 02:25
@dude-stash dude-stash changed the title Fix Safari/iPadOS layout bug on Performer details page Fix Safari layout bug on Performer details page Sep 15, 2026
@dude-stash
dude-stash marked this pull request as draft September 15, 2026 09:17
@garfolino
garfolino force-pushed the fix/safari-performer-details-layout branch 2 times, most recently from 58b979a to 5456a15 Compare September 15, 2026 09:27
ua-parser-js v2 reports the macOS platform as "macOS" instead of the
"Mac OS" string used by v1. isPlatformUniquelyRenderedByApple() still
checked for "Mac OS", so it never matched on desktop Safari, the
.apple class was never applied, and the Safari-specific flex layout
fix for the details page never engaged - leaving the details panel
stacked below the photo instead of beside it.

Fixes stashapp#7234

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@garfolino
garfolino force-pushed the fix/safari-performer-details-layout branch from 5456a15 to 463085c Compare September 15, 2026 09:35
@dude-stash
dude-stash marked this pull request as ready for review September 15, 2026 09:36
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.

Details for Performers being shown below Picture on Safari

1 participant