Skip to content

Refactor stateType from String to NavigationFlowStateType enum#850

Merged
JunDangIntuit merged 4 commits intomainfrom
Refactor-stateType-from-String-to-enum-in-iOS-NavigationBaseState
Apr 22, 2026
Merged

Refactor stateType from String to NavigationFlowStateType enum#850
JunDangIntuit merged 4 commits intomainfrom
Refactor-stateType-from-String-to-enum-in-iOS-NavigationBaseState

Conversation

@JunDangIntuit
Copy link
Copy Markdown
Contributor

  • Add NavigationFlowStateType enum in its own file (NavigationFlowStateType.swift), matching the JVM project structure (NavigationFlowStateType.kt).
  • Use an unknown(String) case with associated value for forward-compatibility: unrecognized state types from JS are preserved rather than discarded, with an assertionFailure in debug builds to catch contract mismatches early.
  • added unit tests

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

… enum

- Add `NavigationFlowStateType` enum in its own file (`NavigationFlowStateType.swift`),
  matching the JVM project structure (`NavigationFlowStateType.kt`).
- Use an `unknown(String)` case with associated value for forward-compatibility:
  unrecognized state types from JS are preserved rather than discarded, with an
  assertionFailure in debug builds to catch contract mismatches early.
- added unit tests
@JunDangIntuit JunDangIntuit requested a review from a team as a code owner April 21, 2026 19:04
KVSRoyal
KVSRoyal previously approved these changes Apr 22, 2026
@@ -0,0 +1,53 @@
import Foundation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Seems like some of the tests are failing CI/CD though?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests passed, may you review again, thanks

… enum

- Add `NavigationFlowStateType` enum in its own file (`NavigationFlowStateType.swift`),
  matching the JVM project structure (`NavigationFlowStateType.kt`).
- Use an `unknown(String)` case with associated value for forward-compatibility:
  unrecognized state types from JS are preserved rather than discarded, with an
  assertionFailure in debug builds to catch contract mismatches early.
- added unit tests
…nBaseState' of github.com:player-ui/player into Refactor-stateType-from-String-to-enum-in-iOS-NavigationBaseState
@JunDangIntuit JunDangIntuit changed the title PLAYA-10223 Refactor stateType from String to NavigationFlowStateType enum Refactor stateType from String to NavigationFlowStateType enum Apr 22, 2026
@JunDangIntuit JunDangIntuit merged commit 21f4b09 into main Apr 22, 2026
16 checks passed
@JunDangIntuit JunDangIntuit deleted the Refactor-stateType-from-String-to-enum-in-iOS-NavigationBaseState branch April 22, 2026 17:20
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.

2 participants