Skip to content

Commit

Permalink
Merge branch 'main' into android-testutils
Browse files Browse the repository at this point in the history
  • Loading branch information
mrigankmg committed Feb 8, 2025
2 parents a871c36 + 75ed389 commit 5592d91
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 178 deletions.
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
# 0.10.3-next.1 (Tue Feb 04 2025)

### Release Notes

#### Update to explicitly call out the default value for dataPath ([#584](https://github.com/player-ui/player/pull/584))

Updated docs for Shared Constants Plugin to highlight the default dataPath used for overriding values

---

#### 🐛 Bug Fix

- Support Smoother Experience When Loading a Viewless Flow on iOS [#570](https://github.com/player-ui/player/pull/570) ([@nancywu1](https://github.com/nancywu1))
- Update to explicitly call out the default value for dataPath [#584](https://github.com/player-ui/player/pull/584) ([@A1shK](https://github.com/A1shK))

#### Authors: 2

- [@A1shK](https://github.com/A1shK)
- [@nancywu1](https://github.com/nancywu1)

---

# 0.10.3-next.0 (Fri Jan 31 2025)

#### 🐛 Bug Fix

- Hermes tracker update [#580](https://github.com/player-ui/player/pull/580) ([@brocollie08](https://github.com/brocollie08))

#### Authors: 1

- [@brocollie08](https://github.com/brocollie08)

---

# 0.10.2 (Wed Jan 29 2025)

### Release Notes

#### Fix Duplicate Date in Title for `next` Changelog Entries ([#569](https://github.com/player-ui/player/pull/569))

fix duplicate date in title for next changelogs

#### Fix Binding Instantiation of Escaped Numerical Bindings ([#565](https://github.com/player-ui/player/pull/565))

Fixed instantiation of `BindingInstance`s with escaped numerical segments

---

#### 🐛 Bug Fix

- Release main [#581](https://github.com/player-ui/player/pull/581) ([@intuit-svc](https://github.com/intuit-svc))
- Check scope active for awaiting player [#578](https://github.com/player-ui/player/pull/578) ([@brocollie08](https://github.com/brocollie08))
- iOS: JavascriptCore Exceptions when finding classes [#577](https://github.com/player-ui/player/pull/577) ([@hborawski](https://github.com/hborawski))
- Broken links fix for docs [#573](https://github.com/player-ui/player/pull/573) ([@chetanddesai](https://github.com/chetanddesai))
- J2V8 Config from Consumer [#576](https://github.com/player-ui/player/pull/576) ([@brocollie08](https://github.com/brocollie08))
- Only mutate ManagedPlayerViewModel.loadingState on main thread [#566](https://github.com/player-ui/player/pull/566) ([@ap-for-work](https://github.com/ap-for-work) [@hborawski](https://github.com/hborawski))
- Fix Binding Instantiation of Escaped Numerical Bindings [#565](https://github.com/player-ui/player/pull/565) ([@KetanReddy](https://github.com/KetanReddy))

#### 📝 Documentation

- Fix Duplicate Date in Title for `next` Changelog Entries [#569](https://github.com/player-ui/player/pull/569) ([@KetanReddy](https://github.com/KetanReddy))

#### Authors: 6

- [@ap-for-work](https://github.com/ap-for-work)
- [@brocollie08](https://github.com/brocollie08)
- [@intuit-svc](https://github.com/intuit-svc)
- Chetan Desai ([@chetanddesai](https://github.com/chetanddesai))
- Harris Borawski ([@hborawski](https://github.com/hborawski))
- Ketan Reddy ([@KetanReddy](https://github.com/KetanReddy))

---

# 0.10.2-next.4 (Wed Jan 22 2025)

#### 🐛 Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1
0.10.2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const constantsPlugin = new ConstantsPlugin({
prop2: "B",
},
namespace: "constants",
dataPath: "data.constants",
dataPath: "data.props",
});

const player = new Player({
Expand All @@ -42,12 +42,12 @@ constantsPlugin.getConstants("prop1"); // 'A'

### Overriding Values in Content

The `dataPath` configuration option enables content to override specific values for a particular flow:
By default, data can be provided in the `constants` path of the `data` object to override the constants that the plugin was initialized with. This can be overridden though via the `dataPath` configuration option. In the above example, `dataPath` was initialized with the path `data.props` therefore the following code snippet could be used to override the `prop1` constant:

```json
{
"data": {
"constants": {
"props": {
"prop1": "B"
}
}
Expand All @@ -56,6 +56,17 @@ The `dataPath` configuration option enables content to override specific values

using a similar query for `prop1`, the value in the content takes precidence and would return `B`.

If no `dataPath` is defined, then it defaults to `constants` and you can still do this
```json
{
"data": {
"constants": {
"prop1": "B"
}
}
}
```

### Fallback Values

Any query can also specify an optional _default_ value to return:
Expand Down
1 change: 1 addition & 0 deletions ios/demo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ swift_library(
"//plugins/common-expressions/ios:PlayerUICommonExpressionsPlugin",
"//plugins/expression/ios:PlayerUIExpressionPlugin",
"//plugins/external-action/ios:PlayerUIExternalActionPlugin",
"//plugins/external-action/swiftui:PlayerUIExternalActionViewModifierPlugin",
"//plugins/metrics/swiftui:PlayerUIMetricsPlugin",
"//plugins/console-logger/ios:PlayerUIPrintLoggerPlugin",
"//plugins/pending-transaction/swiftui:PlayerUISwiftUIPendingTransactionPlugin",
Expand Down
10 changes: 10 additions & 0 deletions ios/demo/Sources/FlowManagerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PlayerUI
import PlayerUISwiftUI
import PlayerUIReferenceAssets
import PlayerUIMetricsPlugin
import PlayerUIExternalActionViewModifierPlugin

/**
SwiftUI View to wrap the `ManagedPlayer` and handle the result
Expand All @@ -34,6 +35,15 @@ public struct FlowManagerView: View {
ReferenceAssetsPlugin(),
MetricsPlugin { (render, _, flow) in
print("Render: \(render?.duration ?? 0 )ms | Request \(flow?.flow.requestTime ?? 0)ms")
},
ExternalActionViewModifierPlugin<ExternalStateSheetModifier> { (state, _, transition) in

return AnyView(
Text("External State")
.onDisappear {
transition("Next")
}
)
}
],
flowManager: ConstantFlowManager(flowSequence),
Expand Down
10 changes: 10 additions & 0 deletions ios/demo/Sources/PluginsAndPlayerCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public struct PluginsAndPlayerCollection: View {
FlowManagerView(flowSequence: [.firstFlow, .assetErrorFlow], navTitle: "Error Asset Flow")
.padding(padding)
}.accessibility(identifier: "Error Asset Flow")

NavigationLink("Multi Action state before multi view flow") {
FlowManagerView(flowSequence: [.firstFlowAction, .secondFlowAction, .multiViewTransitionFlow, .secondFlow], navTitle: "Multi Action state before multi view flow")
.padding(padding)
}.accessibility(identifier: "Multi Action state before multi view flow")

NavigationLink("External Action transition flow") {
FlowManagerView(flowSequence: [.externalActionFlow, .secondFlow], navTitle: "External Action transition flow")
.padding(padding)
}.accessibility(identifier: "External Action transition flow")
} header: {
Text("Managed Player")
}
Expand Down
Loading

0 comments on commit 5592d91

Please sign in to comment.