Skip to content

refactor(examples): centralise colours/data + extract reusable helpers - #10

Merged
Dicky019 merged 1 commit into
mainfrom
feat/example
Jun 27, 2026
Merged

Dicky019 merged 1 commit into
mainfrom
feat/example

Conversation

@Dicky019

Copy link
Copy Markdown
Owner

Tighten both demos for clean-code/SOLID and visual parity.

  • Add framework-named inline nav titles (SwiftUI NavigationStack "SwiftUI Demo", UIKit "UIKit Demo").
  • Centralise all colours into a single Palette (UIColor source of truth, SwiftUI Color derived) exposed via UIColor/ShapeStyle extensions for dot syntax.
  • Remove duplicated logic: share the stat formatter, error message, highlights titles and the Device-card rows across both demos via Shared/Utils.
  • Reframe Format as value-type extensions (CGFloat/CGSize/Int) and move the API coverage exercise out of the views into ScalingShowcaseTests.
  • Add UIKit helpers (UILabel.scaled, UIFont.preScaled, UIView.addAutoLayout) to cut view boilerplate.
  • Rename Shared/Support to Shared/Utils.

Tighten both demos for clean-code/SOLID and visual parity.

- Add framework-named inline nav titles (SwiftUI NavigationStack "SwiftUI
  Demo", UIKit "UIKit Demo").
- Centralise all colours into a single Palette (UIColor source of truth, SwiftUI
  Color derived) exposed via UIColor/ShapeStyle extensions for dot syntax.
- Remove duplicated logic: share the stat formatter, error message, highlights
  titles and the Device-card rows across both demos via Shared/Utils.
- Reframe Format as value-type extensions (CGFloat/CGSize/Int) and move the API
  coverage exercise out of the views into ScalingShowcaseTests.
- Add UIKit helpers (UILabel.scaled, UIFont.preScaled, UIView.addAutoLayout) to
  cut view boilerplate.
- Rename Shared/Support to Shared/Utils.
@Dicky019
Dicky019 merged commit ce4781f into main Jun 27, 2026
4 checks passed
@Dicky019
Dicky019 deleted the feat/example branch June 27, 2026 14:47
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.

1 participant