swift-composable-architecture icon indicating copy to clipboard operation
swift-composable-architecture copied to clipboard

[Building Sync-ups Tutorial] fixes in "Editing and deleting a sync-up" chapter

Open FredericRuaudel opened this issue 3 weeks ago • 0 comments

Hi!

Following my last PR, I'm currently reviewing the "Building Sync-ups" tutorial and so far, there is a lot of changes so I've splitted up into one PR per chapter to ease the review of them, continuing with the "Editing and deleting a sync-up" chapter here…

Changes Made:

  • Replaced the deprecated .cornerRadius() method with the newer .clipShape(.rect(cornerRadius:)) modifier to ensure compatibility with the latest SwiftUI standards.
  • Updated the delete button to use a .destructive role instead of .foregroundColor(.red) for better semantics.
  • Fix compilation errors by using withLock to ensure safe updates to the shared syncUp state during editing.
  • Add a step in SyncUpDetail tutorial to utilize a type-safe .syncUps key when updating the parent list after deletion confirmation action.
  • Make some slight changes in the text of the tutorial documentation due to the removal of outdated commentary regarding delegate actions.

FredericRuaudel avatar Feb 01 '25 15:02 FredericRuaudel