From 32d8a011c783ef7d787bcce1a457df97fae273e3 Mon Sep 17 00:00:00 2001 From: granny Date: Sat, 30 Mar 2024 03:43:51 -0700 Subject: [PATCH 01/10] chore: remove inline styling & use clsx consistently --- src/components/Config.tsx | 33 +++++++++---------- .../ConfigurationStructureDiagram.tsx | 15 ++++++--- src/components/Projects.tsx | 2 +- src/components/StartScriptGenerator.tsx | 9 ++--- src/css/configuration-explorer-layout.css | 1 + src/css/custom.css | 6 ++++ src/theme/DocCard/index.tsx | 2 +- 7 files changed, 39 insertions(+), 29 deletions(-) diff --git a/src/components/Config.tsx b/src/components/Config.tsx index 3d08022b9..0ca912068 100644 --- a/src/components/Config.tsx +++ b/src/components/Config.tsx @@ -6,6 +6,7 @@ import VersionFormattedCode from "./VersionFormattedCode"; import Link from "@docusaurus/Link"; import useBrokenLinks from "@docusaurus/core/lib/client/exports/useBrokenLinks"; import Admonition from "@theme/Admonition"; +import clsx from "clsx"; const INDENT_SIZE = 30; @@ -163,16 +164,23 @@ const YamlNodeWithDescription = ({ return (
-
+
-
+
{parseDescriptionForVersioning(node.description.toString())} @@ -246,14 +251,10 @@ const YamlTreeNode = ({
-
+
{parseItalics(name)} {removeTrailingSpaces(separator)}
@@ -265,11 +266,7 @@ const YamlTreeNode = ({ /> {warning && (
- {warning.message}

} - /> + {warning.message}

} />
)} {renderYamlData( diff --git a/src/components/ConfigurationStructureDiagram.tsx b/src/components/ConfigurationStructureDiagram.tsx index d6f8e1c58..d13b709bd 100644 --- a/src/components/ConfigurationStructureDiagram.tsx +++ b/src/components/ConfigurationStructureDiagram.tsx @@ -1,6 +1,7 @@ import React, { useState } from "react"; import "@site/src/css/configuration-explorer-layout.css"; import { Icon } from "@iconify/react"; +import clsx from "clsx"; const folderIcon = "mdi:folder"; const fileIcon = "mdi:file"; @@ -138,10 +139,12 @@ export default function ConfigurationStructureDiagram(): JSX.Element { {level > 0 && }
Description:
diff --git a/src/components/Projects.tsx b/src/components/Projects.tsx index e17fbfd66..6db432fc4 100644 --- a/src/components/Projects.tsx +++ b/src/components/Projects.tsx @@ -49,7 +49,7 @@ function Project(project: Project) { to={`https://github.com/${project.repo}`} > {project.title} - {project.eol && } + {project.eol && }

{project.description}

diff --git a/src/components/StartScriptGenerator.tsx b/src/components/StartScriptGenerator.tsx index 1b8fba169..658a488de 100644 --- a/src/components/StartScriptGenerator.tsx +++ b/src/components/StartScriptGenerator.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useState, useRef } from "react"; import "@site/src/css/start-script-generator.css"; +import clsx from "clsx"; const markerPoints = [4, 8, 12, 16, 20]; @@ -177,7 +178,7 @@ const StartScriptGenerator: React.FC = () => {
{point}GB
@@ -207,7 +208,7 @@ const StartScriptGenerator: React.FC = () => { {Object.values(FLAGS).map((flag) => (
{ setSelectedFlag(flag); setDropdownVisible(false); @@ -224,7 +225,7 @@ const StartScriptGenerator: React.FC = () => {
- + {
- + + ) : isInternalUrl(item.href) ? ( "📄️" ) : ( From 5e1251a86ed7fc2f2e31f3c89ed43486a5a846df Mon Sep 17 00:00:00 2001 From: granny Date: Sat, 30 Mar 2024 04:41:20 -0700 Subject: [PATCH 02/10] remove two more internal styles --- src/components/Config.tsx | 6 ++---- src/css/custom.css | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Config.tsx b/src/components/Config.tsx index 0ca912068..7d85480b7 100644 --- a/src/components/Config.tsx +++ b/src/components/Config.tsx @@ -164,9 +164,8 @@ const YamlNodeWithDescription = ({ return (
-
+
{parseDescriptionForVersioning(node.description.toString())} From e330a84f5bcf77ce5fe5dfd1840b3a33105b919b Mon Sep 17 00:00:00 2001 From: granny Date: Thu, 4 Apr 2024 19:06:08 -0700 Subject: [PATCH 10/10] remove duplicate margin class, it doesn't actually do anything --- src/components/Config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Config.tsx b/src/components/Config.tsx index e4d8a3a53..fcfef3212 100644 --- a/src/components/Config.tsx +++ b/src/components/Config.tsx @@ -167,7 +167,7 @@ const YamlNodeWithDescription = ({ id={createUrlHash(parentKey, name)} className={clsx("config-tagged-for-algolia", !root && "config-node-indent-size")} > -
+