1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-01 13:47:27 +02:00
unleash.unleash/frontend/src/component/common
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
..
AdminAlert
AnimateOnMount refactor: styles batch 3 (#2821) 2023-01-11 17:44:21 +01:00
Announcer MakeStyles refactor 1-3 (#2835) 2023-01-09 10:41:58 +02:00
ApiError
ApiTokenTable feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
AutocompleteBox refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
Badge Disable and enable strategies - frontend (#3582) 2023-04-26 11:41:24 +02:00
BatchSelectionActionsBar fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
BreadcrumbNav fix: small breadcrumb adjustments (#2893) 2023-01-16 13:09:38 +01:00
CheckmarkBadge feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
Codebox refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
ConditionallyRender
ConstraintAccordion fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
CreateButton feat: revive features (#3344) 2023-03-17 18:21:13 +00:00
DateTimePicker Variants per environment (frontend) (#2453) 2022-11-18 11:43:24 +00:00
Dialogue feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
DividerText fix: remove all warnings (#3055) 2023-02-07 11:20:44 +01:00
DropdownMenu
EnvironmentIcon feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
EnvironmentStrategiesDialog feat: revive features (#3344) 2023-03-17 18:21:13 +00:00
FavoriteIconButton feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
FeatureArchiveDialog UI/bulk stale (#3320) 2023-03-16 14:54:38 +01:00
FeatureStaleDialog
FeatureStatusChip feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
Feedback feat: implement plausible tracking (#3212) 2023-02-28 14:29:14 +01:00
FormTemplate feat: edit change requests (#3573) 2023-04-24 15:32:19 +02:00
GeneralSelect Change requests - add multiple reviewers (#2448) 2022-11-17 11:08:29 +02:00
Gradient
GridCol
GridRow
GuidanceIndicator feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
HelpIcon fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
Highlighter Refactor makestyles 2 2 (#2827) 2023-01-05 16:23:40 +02:00
HtmlTooltip refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
Input add selectable timezone (#2911) 2023-01-30 15:36:42 +01:00
InputCaption fix: validate feature strategy parameters (#1192) 2022-08-04 13:34:30 +02:00
InputListField
InstanceStatus fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
ItemList feat: add SSO mappings to groups (#2175) 2022-10-13 11:34:47 +01:00
Loader Refactor makestyles 2 2 (#2827) 2023-01-05 16:23:40 +02:00
LoginRedirect
MainHeader fix: misc UI/UX fixes, mostly related with favorites (#2683) 2022-12-13 13:19:21 +00:00
Mermaid fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
MessageBanner feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
NoItems Refactor makestyles 2 2 (#2827) 2023-01-05 16:23:40 +02:00
NotFound refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
Notifications fix: notifcations word break (#3403) 2023-03-28 13:27:47 +03:00
OperatorUpgradeAlert feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
PageContent fix: PageContent bodyContainer overflowX (#2852) 2023-01-10 16:46:53 +01:00
PageHeader feat: implement project-scoped segments in project settings (#3335) 2023-03-17 08:23:27 +00:00
PasswordField
PercentageCircle refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
PermissionButton added contraints checking in change request permissions (#2690) 2022-12-14 13:00:51 +01:00
PermissionHOC
PermissionIconButton Feat project segments permissions (#3346) 2023-03-17 17:43:48 +00:00
PermissionSwitch added contraints checking in change request permissions (#2690) 2022-12-14 13:00:51 +01:00
PremiumFeature fix: ensure rel=noreferrer on target=_blank (#3755) 2023-05-12 09:51:33 +01:00
PrettifyLargeNumber linter fixes (#2561) 2022-11-30 10:52:13 +01:00
Proclamation Refactor makestyles 2 2 (#2827) 2023-01-05 16:23:40 +02:00
ProjectSelect
ProtectedRoute
ResponsiveButton feat: revive features (#3344) 2023-03-17 18:21:13 +00:00
ScrollTop
Search E2E test - batch updates (#3392) 2023-03-29 14:47:12 +03:00
SegmentItem refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
SidebarModal feat: edit change requests (#3573) 2023-04-24 15:32:19 +02:00
SkipNavLink fix: header-responsiveness (#3381) 2023-03-24 15:51:28 +02:00
StaleDataNotification refactor: styles batch 3 (#2821) 2023-01-11 17:44:21 +01:00
StrategyItemContainer Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00
StrategySeparator refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
StringTruncator
Table feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
TabNav refactor: light theme colors (#3252) 2023-03-06 12:58:36 +02:00
ThemeMode Feat/dark mode exp (#1137) 2022-08-23 14:20:02 +02:00
ToastRenderer fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
TooltipLink feat: improve variants modal UI/UX (#3307) 2023-03-15 12:22:06 +00:00
TooltipResolver Fix plan upgrade tooltip (#2549) 2022-11-29 10:06:29 +02:00
UpdateButton feat: revive features (#3344) 2023-03-17 18:21:13 +00:00
UserAvatar fix: remove group owner concept (#1210) 2022-08-11 15:34:17 +01:00
VerticalTabs feat: dark theme v1 (#3298) 2023-03-22 16:37:40 +02:00
common.module.scss fix: application name link styling (#3724) 2023-05-09 13:02:32 +00:00
flags.ts
index.jsx fix: url encode application name in links (#2121) 2022-09-30 15:53:02 +02:00
select.tsx
util.ts refactor: remove old components after variants per env (#3110) 2023-02-14 16:03:53 +00:00