Skip to content

Conversation

@Eli-Liebman
Copy link
Collaborator

Description

Adds customizable color provider support for feature state colors in FeaturesTableViewController. Allows developers to customize the colors used for enabled and disabled feature states on a per-feature basis, making it easier to visually distinguish between different types of feature flags (e.g., server-side vs client-side flags).

Practical Example:

  • Server-side feature flags: Blue (enabled) / Orange (disabled)
  • Client-side feature flags: Green (enabled) / Red (disabled)
  • Experimental features: Purple (enabled) / Gray (disabled)

How Has This Been Tested?

Manually tested and ensured that the colors are updated and propagated correctly.

Note on Automated Tests:
I was unable to add or run automated tests as they no longer build due to Nimble being out of date. The specific issue seems to be related to: Quick/Nimble#1061. There are a number of breaking changes over the years so updating is a rather large task that should be handled separately.

Screenshots (if appropriate):

Created with the following:

ClosureFeatureStateColorProvider { feature in
    if feature.key?.hasPrefix("_") == true {
        return FeatureStateColors(enabledColor: .blue, disabledColor: .orange)
    } else {
        return FeatureStateColors.defaultStateColors
    }
}
Simulator Screenshot - iPhone 16 - 2025-11-18 at 15 16 26 Simulator Screenshot - iPhone 16 - 2025-11-18 at 15 18 18 Simulator Screenshot - iPhone 16 - 2025-11-18 at 15 18 08

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

License

I confirm that this contribution is made under an MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@Eli-Liebman Eli-Liebman merged commit c21a1f2 into yahoo:master Nov 20, 2025
0 of 4 checks passed
@Eli-Liebman Eli-Liebman deleted the el/feature-color branch November 20, 2025 19:16
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.

1 participant