woocommerce-ios
woocommerce-ios copied to clipboard
Introduce BetaFeature and automatic UI for beta features configuration
Closes: #7013
Description
Following on the changes from #7012, this introduces a new BetaFeature where we can easily encapsulate all the details of any new experimental flag. It then replaces BetaFeaturesViewController with a new SwiftUI-based BetaFeaturesConfigurationViewController, which generates all its content automatically by iterating through all the defined beta features.
Note that the UI has changed slightly while porting this to SwiftUI, as having the descriptions on the footer felt more natural (and simpler) than adding a second row, and this is more of a proposal than a fully polished PR, but we can discuss and tweak that part.
I considered replacing the existing code that reads beta feature and deleting the relevant actions, but that would probably double the size the PR (at least), so maybe for a future one.
Testing instructions
- Go to Settings > Experimental features
- Toggle the features and check that their values persist
- Verify that toggling add-ons sends an analytics event
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
- [x] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
You can test the changes from this Pull Request by:
- Clicking here or scanning the QR code below to access App Center
- Then installing the build number
pr7014-ae0fb46on your iPhone
| Warnings | |
|---|---|
| :warning: | This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone |
| :warning: | PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible. |
Generated by :no_entry_sign: dangerJS

