Skip to content

Releases: ra1028/swiftui-atom-properties

0.7.3

20 Nov 07:29
63d4760
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.7.2...0.7.3

0.7.2

11 Oct 05:25
7b1510d
Compare
Choose a tag to compare

What's Changed

  • Fix cancellation of refreshing AsyncPhaseAtom by @ra1028 in #157

Full Changelog: 0.7.1...0.7.2

0.7.1

10 Oct 10:54
90cd87a
Compare
Choose a tag to compare

What's Changed

  • Add test with Swift 5 enabling upcoming features by @ra1028 in #156

Full Changelog: 0.7.0...0.7.1

0.7.0

09 Oct 10:20
77485a9
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.6.1...0.7.0

0.6.1

29 Aug 09:16
3abffe4
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.6.0...0.6.1

0.6.0

29 May 09:44
330123c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.5.0...0.6.0

0.5.0

26 Dec 11:15
24bab62
Compare
Choose a tag to compare

New features

  • Modified atoms such as TaskAtoms modified with .phase modifier now supports to refresh.
struct FetchMoviesTaskAtom: ThrowingTaskAtom, Hashable {
    func value(context: Context) async throws -> [Movies] {
        try await fetchMovies()
    }
}

sturct MoviesView: View {
    @ViewContext
    var context

    var body: some View {
        ...
            .refreshable {
                await context.refresh(FetchMoviesTaskAtom().phase)
            }
    }
}
  • Added Refreshable attribute that allows you to implement a custom refresh ability to an atom.
struct RandomIntAtom: ValueAtom, Refreshable, Hashable {
    func value(context: Context) -> Int {
        0
    }

    func refresh(context: RefreshContext) async -> Int {
        try? await Task.sleep(nanoseconds: 3 * 1_000_000_000)
        return .random(in: 0..<100)
    }
}

sturct RandomIntView: View {
    @ViewContext
    var context

    var body: some View {
        ...
            .refreshable {
                await context.refresh(RandomIntAtom())
            }
    }
}

What's Changed

Full Changelog: 0.4.2...0.5.0

0.4.2

29 Sep 07:15
e4d1404
Compare
Choose a tag to compare

What's Changed

  • Add lookup function to AtomTestContext by @ra1028 in #81
  • Reduce testing duration on CI by @ra1028 in #82
  • Maintenance for example apps by @ra1028 in #83
  • Apply inlinable to all methods of AtomTestContext by @ra1028 in #84

Full Changelog: 0.4.1...0.4.2

0.4.1

21 Sep 10:55
d3ee4f6
Compare
Choose a tag to compare

What's Changed

  • Add support for Xcode 14.3.1 and drop support for lower by @ra1028 in #79
  • Add a new testing interface - wait(for:timeout:until) by @ra1028 in #80

Full Changelog: 0.4.0...0.4.1

0.4.0

30 Jun 06:45
825e377
Compare
Choose a tag to compare

⚠️ This version contains quite a lot of breaking changes. Please check the following pull requests to see what's changed if you encounter compilation failures.

What's Changed

  • Update development tools to be latest versions by @ra1028 in #39
  • Drop support for Swift5.6 and corresponding Xcode version by @ra1028 in #40
  • Cache spm binaries on CI by @ra1028 in #41
  • Add asynchronous init in AsyncPhase by @ra1028 in #35
  • Remove unnecessary @mainactor s by @ra1028 in #38
  • Parallelize unit tests on CI by @ra1028 in #42
  • Minor Refactoring by @ra1028 in #43
  • Allow more interactions in updated side effect by @ra1028 in #44
  • Rename AtomRelay to AtomScope by @ra1028 in #45
  • Make store object public and support maintaining it manually by @ra1028 in #46
  • Add API time leeway in example app by @ra1028 in #48
  • Handle KeepAlive as a marker protocol by @ra1028 in #50
  • Fix snapshots to be taken when the atom is marked as KeepAlive by @ra1028 in #49
  • Fix bug that KeepAlive is not effective by @ra1028 in #51
  • Minor improvements to the example app. by @ra1028 in #52
  • Update docc by @ra1028 in #53
  • Scoped override by @ra1028 in #47
  • Add Override section to README by @ra1028 in #54
  • Minor refactoring by @ra1028 in #55
  • Refactor voice memo example by @ra1028 in #56
  • Add better descriptions for AtomScope's observe and override methods by @ra1028 in #57
  • Add coordinator instance to UpdatedContext by @ra1028 in #58
  • Do not dig into parents in any case if atom is overridden by @ra1028 in #59
  • Modify accessor by @ra1028 in #60
  • Internal refactoring by @ra1028 in #61
  • Add changes modifier by @ra1028 in #62
  • Internal minor refactoring by @ra1028 in #63
  • Rename AtomTextContext/waitUntilNextUpdate to waitForUpdate by @ra1028 in #64
  • Flatten scoped stores by @ra1028 in #65
  • Move restore function to ViewContext by @ra1028 in #66
  • Internal refactoring by @ra1028 in #67
  • Change default timeout interval of AtomTestContext/waitForUpdate by @ra1028 in #68
  • Remove redundant lookupOverride from reset by @ra1028 in #69
  • Use #fileID instead of #file by @ra1028 in #70
  • Reduce process redundancy by @ra1028 in #71
  • Make the default timeout interval nil by @ra1028 in #72
  • Exclusively cancel refresh by @ra1028 in #73
  • Update documentation by @ra1028 in #74

Full Changelog: 0.3.0...0.4.0