-
-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: re-order message banners (#4995)
https://linear.app/unleash/issue/2-1494/re-order-message-banners - Re-orders message banners to fit into this logic: >1. Maintenance banner >2. External message banner(s) - Most likely coming from Unleash >3. Internal message banner(s) - Renames the feature flag to better reflect the feature behavior; - Lays a basic skeleton structure for this new feature;
- Loading branch information
Showing
7 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
frontend/src/component/messageBanners/externalMessageBanners/ExternalMessageBanners.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { MessageBanner } from 'component/common/MessageBanner/MessageBanner'; | ||
|
||
export const ExternalMessageBanners = () => { | ||
// TODO: Implement. If we allow multiple internal message banners, then perhaps we should allow the same for external message banners. | ||
|
||
return <MessageBanner />; | ||
}; |
30 changes: 30 additions & 0 deletions
30
frontend/src/component/messageBanners/internalMessageBanners/InternalMessageBanners.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { MessageBanner } from 'component/common/MessageBanner/MessageBanner'; | ||
import { useUiFlag } from 'hooks/useUiFlag'; | ||
|
||
export const InternalMessageBanners = () => { | ||
const internalMessageBanners = useUiFlag('internalMessageBanners'); | ||
|
||
if (!internalMessageBanners) return null; | ||
|
||
// TODO: Implement. `messageBanners` should come from a `useMessageBanners()` hook. | ||
|
||
const mockMessageBanners = [ | ||
{ | ||
message: 'Test 1', | ||
}, | ||
{ | ||
message: 'Test 2', | ||
}, | ||
{ | ||
message: 'Test 3', | ||
}, | ||
]; | ||
|
||
return ( | ||
<> | ||
{mockMessageBanners.map((messageBanner) => ( | ||
<MessageBanner key={messageBanner.message} /> | ||
))} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters