-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning up and renaming of various FAQ sections (#3729)
# Description and Motivation This PR provides consistent naming of the FAQ sections and organizes the components in the appropriate directories. The Community Safety FAQ styling has been updated for the demographic details question, and the content for the instructional videos question has been updated to route to our Data Visualization Guides video series. Also, a secondary button was created for the app. ## Has this been tested? How? tests passing ## Screenshots (if appropriate) > ### Old > ![Desktop - Old](https://github.com/user-attachments/assets/8409f43c-44fa-458e-9ba5-4642e3f5957b) > ### New > ![Desktop - New](https://github.com/user-attachments/assets/888f8efb-a59a-468c-8d1c-6786081e6270) ![old-new](https://github.com/user-attachments/assets/119af45c-7068-420e-b395-d2a5453afff3) ## Types of changes - New content or feature - Refactor / chore ## New frontend preview link is below in the Netlify comment 😎
- Loading branch information
Showing
23 changed files
with
446 additions
and
348 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
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
Binary file not shown.
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
73 changes: 41 additions & 32 deletions
73
frontend/src/pages/Policy/policyComponents/DatasetList.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 |
---|---|---|
@@ -1,43 +1,52 @@ | ||
import type React from 'react' | ||
import React from 'react' | ||
import { CheckRounded, BlockRounded } from '@mui/icons-material' | ||
import HetTerm from '../../../styles/HetComponents/HetTerm' | ||
|
||
interface DatasetItem { | ||
label: string | ||
included: boolean | ||
} | ||
|
||
interface Dataset { | ||
datasetName: string | ||
datasetNameDetails?: string | ||
items: DatasetItem[] | ||
} | ||
|
||
interface DatasetListProps { | ||
datasets: Array<{ | ||
datasetName: string | ||
items: Array<{ | ||
label: string | ||
included: boolean | ||
}> | ||
}> | ||
datasets: Dataset[] | ||
} | ||
|
||
const DatasetList: React.FC<DatasetListProps> = ({ | ||
datasets, | ||
}) => { | ||
export default function DatasetList({ datasets }: DatasetListProps) { | ||
return ( | ||
<div className='grid grid-cols-2 md:grid-cols-3'> | ||
{datasets.map((dataset) => ( | ||
<div key={dataset.datasetName} className='m-1'> | ||
<p className='text-smallest mb-0'> | ||
<HetTerm>{dataset.datasetName}</HetTerm>: | ||
<div className='grid grid-cols-2 md:grid-cols-3'> | ||
{datasets.map((dataset) => ( | ||
<div key={dataset.datasetName} className='m-1'> | ||
<div className='flex flex-col justify-left my-2'> | ||
<p className='text-text my-0'> | ||
<HetTerm>{dataset.datasetName}</HetTerm> | ||
</p> | ||
<ul className='ml-2 list-none p-0 text-smallest'> | ||
{dataset.items.map((item) => ( | ||
<li key={item.label} className='flex flex-row align-center'> | ||
{item.included ? ( | ||
<CheckRounded className='text-text text-altGreen' /> | ||
) : ( | ||
<BlockRounded className='text-text text-redOrange' /> | ||
)} | ||
<p className='my-0 ml-2'>{item.label}</p> | ||
</li> | ||
))} | ||
</ul> | ||
{dataset.datasetNameDetails && ( | ||
<p className='text-smallest my-0'> | ||
<HetTerm>{dataset.datasetNameDetails}</HetTerm> | ||
</p> | ||
)} | ||
</div> | ||
))} | ||
</div> | ||
|
||
<ul className='ml-2 list-none p-0 text-smallest'> | ||
{dataset.items.map((item) => ( | ||
<li key={item.label} className='flex flex-row align-center'> | ||
{item.included ? ( | ||
<CheckRounded className='text-text text-altGreen' /> | ||
) : ( | ||
<BlockRounded className='text-text text-redOrange' /> | ||
)} | ||
<p className='my-0 ml-2'>{item.label}</p> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
))} | ||
</div> | ||
) | ||
} | ||
|
||
export default DatasetList |
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
Oops, something went wrong.