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

feat: add showSearch toggle #480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Open the `config.json` file and configure the radar to your needs.

| Attribute | Description |
| ---------------- | ------------------------------------------------------- |
| showSearch | Render the radar search on the header? |
| showChart | Render the radar visualization on the homepage? |
| showTagFilter | Render the tag filter below the radar? |
| showQuadrantList | Render the items below the radar? |
Expand Down
1 change: 1 addition & 0 deletions data/config.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"logoFile": "logo.svg",
"jsFile": "",
"toggles": {
"showSearch": false,
"showChart": true,
"showTagFilter": true,
"showQuadrantList": true,
Expand Down
19 changes: 10 additions & 9 deletions src/components/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import styles from "./Navigation.module.css";

import IconOverview from "@/components/Icons/Overview";
import IconQuestion from "@/components/Icons/Question";
import { getLabel } from "@/lib/data";
import IconSearch from "@/components/Icons/Search";
import { getLabel, getToggle } from "@/lib/data";

export function Navigation() {
return (
Expand All @@ -22,14 +23,14 @@ export function Navigation() {
<span className={styles.label}>{getLabel("pageOverview")}</span>
</Link>
</li>
{/*
<li className={styles.item}>
<Link href="/overview">
<IconSearch className={styles.icon} />
<span className={styles.label}>{getLabel("pageSearch")}</span>
</Link>
</li>
*/}
{getToggle("showSearch") && (
<li className={styles.item}>
<Link href="/overview">
<IconSearch className={styles.icon} />
<span className={styles.label}>{getLabel("pageSearch")}</span>
</Link>
</li>
)}
</ul>
</nav>
);
Expand Down