Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature (ui): Add an MMDL Notification Banner on Mako Homepage #925

Merged
merged 24 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
59b8cbd
feature: merged with main
RanyeM Dec 12, 2024
438908c
feature: added mmdl banner based on if user is signed in
RanyeM Dec 12, 2024
5cb7f8e
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 12, 2024
80dbb15
fix: removed docs
RanyeM Dec 12, 2024
fe07aec
fix: faq pops out into another tab and formatted code
RanyeM Dec 12, 2024
62b9002
fix: PR comments
RanyeM Dec 12, 2024
1f4491f
fix: removed localstorage
RanyeM Dec 12, 2024
a7c325a
fix: updated changes and removed svg
RanyeM Dec 13, 2024
88e581f
fix: updated changes and removed svg
RanyeM Dec 13, 2024
47033b2
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 17, 2024
4a1aa05
Improve button text vertical spacing
charmcitygavin Dec 17, 2024
5a8b447
Replace missing bun.lockb file
charmcitygavin Dec 17, 2024
6ff2f49
Make tests more specific
charmcitygavin Dec 17, 2024
8208306
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 18, 2024
86b931b
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 19, 2024
a9e6d13
Don't display banner on FAQ page
charmcitygavin Dec 19, 2024
43abfcb
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 19, 2024
19e0cd8
Resolve a11y errors by using a landmark wrapper
charmcitygavin Dec 19, 2024
a748545
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 19, 2024
5215917
Prevent mobile menu from overlapping alert banner
charmcitygavin Dec 19, 2024
8adf432
Ensure there's no gap between mobile menu and edge
charmcitygavin Dec 19, 2024
e8f415f
Clean up mobile menu layout
charmcitygavin Dec 19, 2024
18b26b7
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 31, 2024
84bafe3
Merge branch 'main' into add-mmdl-banner
charmcitygavin Dec 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed bun.lockb
RanyeM marked this conversation as resolved.
Outdated
Show resolved Hide resolved
Binary file not shown.
41 changes: 41 additions & 0 deletions react-app/src/components/Banner/MMDLSpaBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { useState } from "react";
import { Cross2Icon } from "@radix-ui/react-icons";
import { InfoCircledIcon } from "@radix-ui/react-icons";
const MMDLAlertBanner = () => {
const [isVisible, setIsVisible] = useState(true);
const handleDismiss = () => {
setIsVisible(false);
};
if (!isVisible) return null;
return (
<div className="bg-[#E1F3F8] grid md:grid-cols-[min-content_auto_min-content] md:grid-rows-[auto_auto] grid-cols-[auto_auto] gap-4 md:gap-x-4 border-l-[8px] border-[#00A6D2] p-3">
<InfoCircledIcon className="w-10 h-10" aria-hidden="true" />
<div className="flex gap-x-4 flex-grow">
<div className="flex flex-col flex-grow">
<h3 className="font-bold text-black text-lg break-words">
MMDL SPA forms available in OneMAC
</h3>
<p className="text-black leading-normal break-words">
Medicaid Alternative Benefit Plan, Premium and Cost Sharing, and CHIP Eligibility SPA
templates and implementation guides are now available in OneMAC. New submissions for
these SPA types are submitted through the OneMAC system effective [add date].
</p>
</div>
</div>
<div className="flex space-x-4 col-start-2 md:col-start-auto">
<a
href="/faq#mmdl-section"
target="_blank"
rel="noopener noreferrer"
className="border-2 border-black rounded h-[38px] px-4 text font-bold text-center whitespace-nowrap"
>
Go to FAQs
</a>
<button onClick={handleDismiss} aria-label="Dismiss" className="rounded-full w-6 h-6">
<Cross2Icon className="w-full h-full" aria-hidden="true" />
</button>
</div>
</div>
);
};
export default MMDLAlertBanner;
2 changes: 2 additions & 0 deletions react-app/src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import config from "@/config";
import { ScrollToTop, SimplePageContainer, UserPrompt, Banner } from "@/components";
import { isFaqPage, isProd } from "@/utils";
import MMDLAlertBanner from "@/components/Banner/MMDLSpaBanner";

/**
* Custom hook that generates a list of navigation links based on the user's status and whether the current page is the FAQ page.
Expand Down Expand Up @@ -153,6 +154,7 @@ export const Layout = () => {
<div className="min-h-full flex flex-col">
<ScrollToTop />
<UserPrompt />
{user?.user && <MMDLAlertBanner />}
RanyeM marked this conversation as resolved.
Show resolved Hide resolved
<UsaBanner isUserMissingRole={user?.user && customUserRoles === undefined} />
<nav data-testid="nav-banner-d" className="bg-primary">
<div className="max-w-screen-xl mx-auto px-4 lg:px-8">
Expand Down
Loading