1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib
Nuno Góis db61a8a40c
feat: message banner (variants) (#3788)
-
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~~
(50ccf60893);
 - ~~Enterprise needs a PR that will follow soon~~;
 
 

![image](https://github.com/Unleash/unleash/assets/14320932/034ff64f-3020-4ed0-863b-ed1fd9190430)
2023-05-18 09:38:59 +01:00
..
__snapshots__ feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
addons
db fix: block adding a root role to a group with a project role (#3775) 2023-05-16 12:11:32 +02:00
domain/project-health
error fix: add missing options parameter back in (#3770) 2023-05-15 07:19:55 +00:00
features feat: improve frontend config freshness to < 1s (#3749) 2023-05-12 17:52:11 +00:00
middleware Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
openapi feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
proxy feat: improve frontend config freshness to < 1s (#3749) 2023-05-12 17:52:11 +00:00
routes feat: Basic bulk update implementation (#3794) 2023-05-17 12:20:32 +02:00
schema chore: deprecate username on api-tokens (#3616) 2023-05-04 09:56:00 +02:00
segments chore: add additional methods we want exposed (#3771) 2023-05-15 10:23:28 +00:00
services feat: Basic bulk update implementation (#3794) 2023-05-17 12:20:32 +02:00
types feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
util feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
app.test.ts
app.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
create-config.test.ts chore: remove optimal 304 flag (#3665) 2023-05-05 09:18:04 +02:00
create-config.ts feat: improve frontend config freshness to < 1s (#3749) 2023-05-12 17:52:11 +00:00
default-custom-auth-deny-all.ts
internals.ts chore: drop event hook (#3565) 2023-04-21 09:44:18 +02:00
logger.test.ts
logger.ts
metric-events.ts
metrics.test.ts
metrics.ts
server-impl.test.ts chore: drop event hook (#3565) 2023-04-21 09:44:18 +02:00
server-impl.ts Feat: project default strategy (#3644) 2023-04-28 14:59:04 +03:00