Core refactoring: extract base view, color palette, add showsUnspokenTraits#319
Merged
Core refactoring: extract base view, color palette, add showsUnspokenTraits#319
Conversation
johnnewman-square
approved these changes
Mar 12, 2026
Collaborator
johnnewman-square
left a comment
There was a problem hiding this comment.
This looks good!
Comment on lines
+108
to
+111
| init(modernColors: [UIColor]) { | ||
| guard let palette = Self(colors: modernColors, | ||
| fillOpacity: 0.25, | ||
| strokeOpacity: 0.8) |
Collaborator
There was a problem hiding this comment.
Minor: are there any concerns with this strokeOpacity being 0.8, while public static let modern uses a strokeOpacity of 1.0?
johnnewman-square
approved these changes
Mar 16, 2026
…Traits - Extract AccessibilitySnapshotBaseView from AccessibilitySnapshotView - Replace DefaultColors with AccessibilityColorPalette (new ColorPalette struct) - Add showsUnspokenTraits to AccessibilitySnapshotConfiguration - Add LayoutEngine and LegendLayoutMetrics as new Core files - Update iOSSnapshotTestCase and SnapshotTesting adapters for Core changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These files add LayoutEngine support and import AccessibilitySnapshotPreviews, which doesn't exist in this branch yet. Restore them to their master state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ew.swift Co-authored-by: johnnewman-square <johnnewman@squareup.com>
12cac75 to
b67526d
Compare
johnnewman-square
approved these changes
Mar 16, 2026
priip
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AccessibilitySnapshotBaseViewfromAccessibilitySnapshotViewas a shared base classDefaultColorswith a newAccessibilityColorPalette/ColorPalettestructLayoutEngineandLegendLayoutMetricsas dedicated Core filesshowsUnspokenTraitsproperty toAccessibilitySnapshotConfigurationiOSSnapshotTestCase,SnapshotTesting, andParseradapters for the above changesThis is a preparatory refactor with no new public-facing feature. Part 1 of 3.
🤖 Generated with Claude Code