address comments

Signed-off-by: jrusso1020 <jrusso@brex.com>
This commit is contained in:
jrusso1020
2021-11-26 10:50:13 -05:00
parent ed5bef529e
commit fa683cab7d
8 changed files with 104 additions and 82 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@@ -53,3 +53,31 @@ You can do so by including the following lines in the last step of your
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip3 install cookiecutter
```
### Customizing the ScaffolderPage with Grouping and Filtering
Once you have more than a few software templates you may want to customize your
`ScaffolderPage` by grouping and surfacing certain templates together. You can
accomplish this by creating `swimLanes` and passing them to your
`ScaffolderPage` like below
```
<ScaffolderPage
extraSwimlanes={[
{
title: "Recommended",
filter: entity =>
entity?.metadata?.tags?.includes('recommended') ?? false,
},
]}
/>
```
This code will group all templates with the 'recommended' tag together at the
top of the page above any other templates not filtered by this swimlane or
others.
You can also further customize swimlanes by passing in a `titleComponent`
instead of a `title` which will be a component to use as the header instead of
just the default `ContentHeader` with the `title` set as it's value.
![Grouped Templates](../../assets/software-templates/grouped-templates.png)