Skip to content

fix: center code-block header controls above the divider - #960

Merged
hryhoriiK97 merged 4 commits into
software-mansion:mainfrom
pingdotgg:fix/code-block-header-alignment
Oct 10, 2026
Merged

hryhoriiK97 merged 4 commits into
software-mansion:mainfrom
pingdotgg:fix/code-block-header-alignment

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What/Why?

The language label and copy icon sit too low relative to the code-block header divider. Center both in the actual header band on iOS and Android, retaining the existing block height, code pane and highlighting.

Fixes #953.

Testing

  • The production Android layout test passed for 16/32px fonts at 240/400px widths. Android compilation and ktlint passed.
  • Built and ran the iOS example with the exact PR header implementation. The added Maestro screenshot scenario passed its recorded golden assertion. The committed PNG is a test baseline; PR-only captures stay outside the repository.
  • Library types, Bob/module/codegen, targeted lint and normal hooks passed.

Same controlled fixture, theme, viewport and scroll position. Pixel-preserving crops from actual upstream base and head builds:

Before:

Before: code-block language label and copy icon sit below the header center

After:

After: language label and copy icon are centered above the divider

Local native proof uses an isolated upstream example checkout on an iPhone 17 Pro simulator running iOS 27. Xcode used two jobs, disabled signing/index/debug symbols, and task-owned XCFrameworks retained the arm64 simulator slice to fit the host. These are host resource settings, not workflow or production changes. No Android device, VoiceOver traversal, or full Maestro-suite pass is claimed.

Base: b80be973. Current head: d42c0bfd. CI remains incomplete, with current-head iOS jobs queued.

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android, compilation/layout test passed but no device run
  • Updated documentation/README if applicable, no public API change
  • Ran example app to verify changes
  • Added focused iOS E2E test is passing, full suite not run
  • Required E2E tests have been added

Model: GPT-6.1. Harness: Codex in T3 Code.

@juliusmarminge
juliusmarminge marked this pull request as ready for review October 8, 2026 18:49
hryhoriiK97 and others added 2 commits October 9, 2026 17:36
The Robolectric test asserts two values derived from the same formula, and
the screenshot baseline duplicates what the existing code block goldens
already capture.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The language label and copy icon moved, so the four existing code block
screenshots on iOS and Android are regenerated and pass at the strict
threshold.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@hryhoriiK97
hryhoriiK97 merged commit ae55c0d into software-mansion:main Oct 10, 2026
18 checks passed
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.

Code-block header label and copy button are vertically misaligned

2 participants