1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/component
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
..
addons
admin fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
application
archive fix: fix deleting feature from global archive (#3786) 2023-05-17 16:19:19 +03:00
changeRequest Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00
common feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
context
demo refactor: rename demo img assets (#3795) 2023-05-17 08:47:19 +00:00
environments fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
events
feature feat: Bulk enabled disable (#3797) 2023-05-18 06:07:56 +00:00
feedback fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
layout feat: demo ui-ux improvements (#3634) 2023-04-27 08:15:17 +01:00
loginHistory
maintenance
menu fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
playground/Playground
project feat: Bulk enabled disable (#3797) 2023-05-18 06:07:56 +00:00
providers feat: enable dark mode for all (#3614) 2023-04-25 10:13:06 +02:00
segments Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00
splash
strategies chore: remove deprecated strategies and allow deprecate default (#3575) 2023-04-21 11:42:36 +02:00
tags fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
user feat: authorization middleware (#3464) 2023-04-06 11:46:54 +02:00
App.tsx feat: demo ui-ux improvements (#3634) 2023-04-27 08:15:17 +01:00
InitialRedirect.tsx clear warnings (#3053) 2023-02-07 08:41:23 +01:00