-
Notifications
You must be signed in to change notification settings - Fork 0
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
Iterate the pre-check to include an interoperability check #239
base: main
Are you sure you want to change the base?
Changes from all commits
78f75c5
6863a57
ecfbc0f
be4696c
87c1fd1
04f5d43
bff29e3
1f48e43
554efa5
f335252
bc7c55f
d7e6cd1
0084ebe
6c1d443
c8f4dee
1593dc6
e308529
a5de1da
efc5cd0
76a3a76
788c01c
2b4d61e
f085672
0611e02
63d3632
430e061
b583f3b
d1ae3fd
ab9b5ab
7519449
ab2d779
a97945a
b4f926f
608a932
3e24ffb
5ce1e9f
0c8adf4
70b82fa
40a7f09
e235181
9c30b6d
3e4df94
02839c6
c859506
abe8746
ed026f6
98c803d
1fee58d
8a286be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import AccordionItem, { AccordionItemProps } from "./AccordionItem"; | ||
|
||
export default function Accordion({ | ||
items, | ||
boldAppearance, | ||
}: { | ||
items: AccordionItemProps[]; | ||
boldAppearance?: boolean; | ||
}) { | ||
return ( | ||
<div className="bg-white border-b-2 border-b-blue-800"> | ||
{items.map((item, index) => ( | ||
<AccordionItem | ||
key={index} | ||
headline={item.headline} | ||
content={item.content} | ||
id={item.id} | ||
boldAppearance={boldAppearance} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import RichText from "@digitalcheck/shared/components/RichText.tsx"; | ||
import { Add, Remove } from "@digitalservicebund/icons"; | ||
import classNames from "classnames"; | ||
import { ReactNode, useState } from "react"; | ||
|
||
export type AccordionItemProps = { | ||
headline: string; | ||
content?: string | ReactNode; | ||
id?: string; | ||
boldAppearance?: boolean; | ||
}; | ||
|
||
export default function AccordionItem(props: AccordionItemProps) { | ||
const { headline, content, id, boldAppearance } = props; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we destructure in the function()? |
||
const [isExpanded, setIsExpanded] = useState(false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would allow multiple |
||
|
||
return ( | ||
<details | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the implementation through a |
||
onToggle={() => setIsExpanded(!isExpanded)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above comment if this is really necessary. |
||
className="border-t-2 border-t-blue-800 group" | ||
id={id} | ||
> | ||
<summary | ||
role="button" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also seems superfluous, but unsure? |
||
aria-expanded={isExpanded} | ||
className="accordion-summary w-full p-24 flex items-center justify-between hover:bg-blue-200 focus:bg-blue-200 focus:outline focus:outline-4 focus:outline-blue-800 focus-visible:outline focus-visible:outline-4 focus-visible:outline-blue-800 cursor-pointer group-open:bg-blue-200" | ||
> | ||
<div | ||
className={classNames( | ||
"pr-10 font-bold text-left text-16 leading-22 md:text-18 md:leading-24", | ||
{ "text-blue-800": boldAppearance }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does |
||
)} | ||
> | ||
{headline} | ||
</div> | ||
<Add className="w-24 h-24 flex-shrink-0 fill-blue-800 group-open:hidden" /> | ||
<Remove className="w-24 h-24 flex-shrink-0 fill-blue-800 hidden group-open:block" /> | ||
</summary> | ||
<div | ||
className={classNames("p-24 pr-24", { | ||
"pr-48 md:pb-64 md:pr-64 text-18": boldAppearance, | ||
})} | ||
> | ||
{typeof content === "string" ? ( | ||
<RichText markdown={content} /> | ||
) : ( | ||
content | ||
)} | ||
</div> | ||
</details> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const PRE_CHECK_START_BUTTON_ID = "preCheck-start-button"; |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,15 @@ import Background from "@digitalcheck/shared/components/Background"; | |
import Box from "@digitalcheck/shared/components/Box"; | ||
import ButtonContainer from "@digitalcheck/shared/components/ButtonContainer"; | ||
import Container from "@digitalcheck/shared/components/Container"; | ||
import DetailsSummary from "@digitalcheck/shared/components/DetailsSummary.tsx"; | ||
import Heading from "@digitalcheck/shared/components/Heading.tsx"; | ||
import Image from "@digitalcheck/shared/components/Image.tsx"; | ||
import InfoBox from "@digitalcheck/shared/components/InfoBox"; | ||
import InlineNotice from "@digitalcheck/shared/components/InlineNotice"; | ||
import RichText from "@digitalcheck/shared/components/RichText.tsx"; | ||
import { MetaFunction } from "@remix-run/react"; | ||
import Accordion from "components/Accordion.tsx"; | ||
import SupportBanner from "components/SupportBanner"; | ||
import { PRE_CHECK_START_BUTTON_ID } from "resources/constants"; | ||
import { preCheck } from "resources/content"; | ||
import { ROUTE_LANDING, ROUTE_PRECHECK } from "resources/staticRoutes"; | ||
import prependMetaTitle from "utils/metaTitle"; | ||
|
@@ -35,10 +40,19 @@ export default function Index() { | |
></Box> | ||
</Container> | ||
<Container paddingTop="0"> | ||
<div className="ds-stack-16 mb-40"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be solved through |
||
{preCheck.start.hints.map((hint, index) => ( | ||
<DetailsSummary | ||
key={index} | ||
title={hint.title} | ||
content={hint.text} | ||
/> | ||
))} | ||
</div> | ||
<ButtonContainer | ||
buttons={[ | ||
{ | ||
id: "preCheck-start-button", | ||
id: PRE_CHECK_START_BUTTON_ID, | ||
text: preCheck.start.buttonText, | ||
href: preCheck.questions[0].url, | ||
type: "submit", | ||
|
@@ -53,14 +67,6 @@ export default function Index() { | |
/> | ||
</Container> | ||
</Background> | ||
<Container additionalClassNames="max-sm:!p-0"> | ||
<InlineNotice | ||
look="tips" | ||
title={preCheck.start.info.title} | ||
tagName="h2" | ||
content={preCheck.start.info.text} | ||
></InlineNotice> | ||
</Container> | ||
<Container> | ||
<InfoBox | ||
heading={{ | ||
|
@@ -70,6 +76,34 @@ export default function Index() { | |
items={preCheck.start.summary.items} | ||
></InfoBox> | ||
</Container> | ||
<Container paddingTop="0"> | ||
<Background backgroundColor="blue"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<div className="px-64 py-40 flex gap-64 items-center max-sm:flex-col-reverse max-sm:px-16 max-sm:gap-48"> | ||
<div className="md:pl-32 ds-stack-8 gap-20 md:w-1/3"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Classes of the |
||
<Image | ||
url={preCheck.start.info.image.src} | ||
alternativeText={preCheck.start.info.image.alt} | ||
/> | ||
</div> | ||
<div> | ||
<Heading | ||
tagName="h3" | ||
look="ds-heading-03-reg" | ||
text={preCheck.start.info.title} | ||
/> | ||
<RichText markdown={preCheck.start.info.text} /> | ||
</div> | ||
</div> | ||
</Background> | ||
</Container> | ||
<Container> | ||
<Heading | ||
tagName="h2" | ||
look="ds-heading-02-reg text-center mb-64 max-sm:mb-56" | ||
text={preCheck.faq.title} | ||
/> | ||
<Accordion items={preCheck.faq.items} /> | ||
</Container> | ||
<SupportBanner /> | ||
</> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this lead to PR branches (e.g. by
dependabot
) being deployed, too?