Player 1.0#865
Draft
KetanReddy wants to merge 61 commits into
Draft
Conversation
…rom core (#786) <!-- Describe what's changing, why, and any other background info. Make sure to add: - Tests - Documentation Updates --> # What 1. Remove `set` and `delete` from core `ReadOnlyDataController`. They previously just logged an error and did nothing. Omitting `set` and `delete` is a cleaner API. This is outside the scope of the original issue but was discussed with @KetanReddy 2. Introduce a `ReadOnlyDataController` on iOS. This wraps the core version of the same. A `CompletedState` on iOS will now include this controller. 3. For parity, add a public `makeReadOnly()` to the iOS `DataController`. It's not used on iOS, however. # Why #219 We should have parity across all platforms. This updates ios to match the same public API as the core for the Read-Only Data Controller. The read-only version of the data controller was introduced to allow users to access data / evaluate bindings after a flow has ended. ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [x] `N/A` (this is part of the major release) ### Does your PR have any documentation updates? - [ ] Updated docs - [x] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
--------- Co-authored-by: Jeremy Jessup <jeremy_jessup@intuit.com>
Closes #220 ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [ ] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [ ] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
Closes #360 Fixes this in a much less intensive way that originally proposed by just forcing circular dependencies to resolve to the workspace version of the package. For now this is going to have to be a manual process and only works for JavaScript dependencies but solves for the current scope of the issues. This also technically isn't a breaking change so this could go out separately not as part of the 1.0 work. ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [x] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [x] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
Closes #790 All platforms now support registering plugins with a player after it has been instantiated. ## JVM (HeadlessPlayer) Added registerPlugin(plugin: Plugin) that appends to the plugins list and applies the plugin appropriately (RuntimePlugin, JSPluginWrapper, or PlayerPlugin). ## Android (AndroidPlayer) - Added registerPlugin(plugin: Plugin) that delegates to the underlying HeadlessPlayer for standard plugins, or stores and applies AndroidPlayerPlugin instances directly. ## iOS (HeadlessPlayer / HeadlessPlayerImpl) - Added registerPlugin(_ plugin: NativePlugin) as a protocol requirement with a default implementation. Concrete implementations (e.g. HeadlessPlayerImpl) track registered plugins in a mutable plugins list. ## React (ReactPlayer) - Updated registerPlugin to accept both ReactPlayerPlugin and PlayerPlugin, calling apply on the core player and applyReact on the React player as appropriate. TODO: - [ ] Update Migration Guide ### Change Type (required) Indicate the type of change your pull request is: - [x] `patch` - [ ] `minor` - [ ] `major` - [ ] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [ ] No Update needed - [ ] Unable to update docs
…igationFlowStateType
<!-- Describe what's changing, why, and any other background info. Make sure to add: - Tests - Documentation Updates --> During the recent plugin audit by player devs, we discovered that the following plugins have unnecessary ios and/or jvm wrappers around core-only functionality: 1. `common-expressions` 2. `common-types` 3. `computed-properties` 4. `stage-revert-data` This PR removes the unnecessary wrappers. A note has been added to the plugins' docs to document this context and hopefully remind us not to re-add these unnecessary wrappers in the future. Plugins 1-3 are also now loaded with the core reference assets plugin. `stage-revert-data` is not. That plugin requires `attributes.commitTransitions` to be present (i.e. errors without it). Our demo isn't set up like that and I didn't want to change it. ADDITIONALLY: 1. Looks like `fast-sort` got dropped from the `package.json` when I merged from `main`, so this restores it. 2. There was also some required linting (no changes to the pnpm-lock file other than `fast-sort`) so that got added to this. ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [x] `N/A` Part of 1.0 ### Does your PR have any documentation updates? - [x] Updated docs - [ ] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
… into tools-majors
Pulls in changes from the 1.0 for all new tooling scopes ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [ ] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [ ] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
* error controller * fix test failure * add middleware and update controller clear functions * update metadata * update middleware with auth symbol * doc update * error controller navigation (#775) * error controller navigation * address comments and update doc * Error controller mobile exposure (#783) * Error controller expose to iOS/Android * add render-time and async node error recovery pattern (#802) * add asset error recovery via asyncNodePlugin on web and android * fix test errors * fix async test * comment last broken test for now * finish ios implementation of error recovery * add errors with metadata to error controller on react and android * re-enable react player test. fail player state from error controller if no transition available. * update ResolverStage to be an enum * fix android build errors * finish ios error recovery implementation * format kt and add ts tests * fix mock package build * fix throwable serializer. Improve react state management during errors * remove throwing asset. fix error severity in jvm * revert delete of one jvm test. use local data model in error middleware. fix ios tests * revert change to player config. fix swift errorcontroller tests * fix swiftlint error * Update core/player/src/controllers/error/utils/isErrorWithMetadata.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * Update plugins/async-node/core/src/utils/getNodeFromError.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * Update core/player/src/controllers/error/utils/__tests__/isErrorWithMetadata.test.ts Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * make resolvererror public in player core * update reference asset plugin tests * update error middleware to export binding prefix * add tests for useSubscriber hook * fix eslint error * update testing for async node plugin. fix issue with recursive search of async nodes on error * add react player tests for error handling * add error tests for resolver changes * fix test and lint errors * update lockfile * add additional throwable serializer tests for new functionality * replace hasErrorTransition function with getErrorTransitionState reused across the flow instance and error controller * update error docs for async node plugin * format kt files to fix lint issues * ignore jvm testutils in codecov report * separate JSError class in kt and code cleanup * fix hermes ThrowablSserializerTest * fix type name in heremes ThrowableSerializerTest * make JSErrorException constructor internal. use mapserializer in throwableserializer * update JSValueError to serialize to and deserialize from JS objects * code cleanup on JSValueError * start replacing PlayerError type with real error * fix j2v8 toInvokable. match error serialization to core changes on swift/kotlin * kt lint format and fix swiftuiplayer test compile * update const string enums in ios. clean up logging in error controller core * fix test errors * remove hasMetadata from ErrorWithMetadata. make JSKeys an enum with string constants * cleanup kotlin implementation * change enum namespaces for constants to structs * remove encodable from HookWithResult generic --------- Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com> * rebase * fix test failure * update doc and migration guide * mobile update enum, invokable and doc * fix build failure cause by merge * fix merge issue * update controlledasset with errortypes * ExternalStateViewModifierPlugin ios fix * fix ios build * update swift comment * update clearAllMocks with specific mockclear --------- Co-authored-by: Thomas Marmer <marmerthomas@gmail.com> Co-authored-by: Ketan Reddy <KetanReddy@users.noreply.github.com>
This reverts commit ebbac1b.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
<!-- Describe what's changing, why, and any other background info. Make sure to add: - Tests - Documentation Updates --> Merge latest `main` into `player-1-dot-zero` ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [ ] `patch` - [ ] `minor` - [ ] `major` - [x] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [x] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
<!-- Describe what's changing, why, and any other background info. Make sure to add: - Tests - Documentation Updates --> SwiftUIPlayer.swift Removed redundant clearExceptionHandler() method — cleanup already handled in unload() Removed unnecessary ctx.setObject(nil, forKeyedSubscript: "player") call Added inline comments clarifying the purpose of each nullification step in unload() ### Change Type (required) Indicate the type of change your pull request is: <!-- We use semantic versioning: https://semver.org/. Review that documentation for more detailed guidelines. --> - [x] `patch` - [ ] `minor` - [ ] `major` - [ ] `N/A` ### Does your PR have any documentation updates? - [ ] Updated docs - [x] No Update needed - [ ] Unable to update docs <!-- In an effort to standardize our process and code, please make sure you include documentation and/or update any existing documentation. Please refer to our site https://player-ui.github.io/latest/about, and include any neccesary information that would be helpful to coders, developers, and learners. If you are unable to update the current documents, please create an issue for us to get back to it. --> <!-- To include release notes in the automatic changelong, just add a level 1 markdown header below and include any markdown notes to go into the changelog: https://intuit.github.io/auto/docs/generated/changelog#additional-release-notes Example: # Release Notes Added new plugin, to use it: ```typescript const plugin = new Plugin(...) ``` -->
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #865 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Change Type (required)
Indicate the type of change your pull request is:
patchminormajorN/ADoes your PR have any documentation updates?
Release Notes
Full release notes are available on the doc site