mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
-
https://linear.app/unleash/issue/2-546/fetch-the-payload-from-a-real-feature-flag
-
https://linear.app/unleash/issue/2-547/adapt-ui-to-use-the-feature-flag-information-were-fetching
Tackles the 2 tasks above.
Adapts our `FlagResolver` logic to support variants, so we can use them
for our message banner project but also anything else in the future.
Also adapts MessageBanner to the new logic.
- Add support for variants in `FlagResolver`;
- Adapt `MessageBanner` to a variants flag;
- Adds `sticky` support for the `MessageBanner`;
- Adds our first variants flag to `uiConfig` and `experimental`:
`messageBanner`;
- Adds a `variant-flag-schema` to make it easy to represent the variant
output that we specify in `uiConfig`;
- Adapts `experimental` to be able to represent default variants while
still maintaining type safety;
- Adds helpers to make it easy to use variants in our project, such as
`getVariantValue` and the `useVariant` hook;
- Adapts and adds new tests in `flag-resolver.test.ts`;
### Notes
- ~~The `as PayloadType` assertions need
https://github.com/Unleash/unleash-client-node/pull/454 since it
includes https://github.com/Unleash/unleash-client-node/pull/452~~
(
|
||
---|---|---|
.. | ||
apiUtils.ts | ||
arraysHaveSameItems.test.ts | ||
arraysHaveSameItems.ts | ||
calculatePercentage.ts | ||
cleanConstraint.test.ts | ||
cleanConstraint.ts | ||
createFeatureStrategy.test.ts | ||
createFeatureStrategy.ts | ||
createLocalStorage.ts | ||
cyclicIterator.test.ts | ||
cyclicIterator.ts | ||
env.test.ts | ||
env.ts | ||
formatAccessText.test.ts | ||
formatAccessText.ts | ||
formatConstraintValue.ts | ||
formatDate.ts | ||
formatPath.test.ts | ||
formatPath.ts | ||
formatUnknownError.test.ts | ||
formatUnknownError.ts | ||
getFeatureMetrics.ts | ||
getFeatureTypeIcons.ts | ||
instanceTrial.test.ts | ||
instanceTrial.ts | ||
nonEmptyArray.ts | ||
objectId.test.ts | ||
objectId.ts | ||
oneOf.ts | ||
operatorsForContext.ts | ||
paginate.test.ts | ||
paginate.ts | ||
parseParameter.test.ts | ||
parseParameter.ts | ||
projectFilterGenerator.ts | ||
removeEmptyStringFields.test.ts | ||
removeEmptyStringFields.ts | ||
routePathHelpers.ts | ||
search.ts | ||
sortStrategyParameters.test.ts | ||
sortStrategyParameters.ts | ||
sortTypes.test.ts | ||
sortTypes.ts | ||
storage.ts | ||
strategyNames.tsx | ||
testIds.ts | ||
testRenderer.tsx | ||
testServer.ts | ||
unknownify.ts | ||
validateParameterValue.test.ts | ||
validateParameterValue.ts | ||
variants.ts |