From 2cba43780873abf60230ff1e6f42758fe422fc66 Mon Sep 17 00:00:00 2001 From: Deniz Date: Thu, 23 Nov 2023 16:41:41 -0800 Subject: [PATCH 1/2] sort by ISO --- src/construct/coverage.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/construct/coverage.py b/src/construct/coverage.py index 25a7cf5c..b898e3e9 100644 --- a/src/construct/coverage.py +++ b/src/construct/coverage.py @@ -305,6 +305,9 @@ def main(): spec["link"] = get_document_status_link(spec["ISO"]) SPEC_INFO.append(spec) + # Sort by ISO + SPEC_INFO = sorted(SPEC_INFO, key=lambda x: x["ISO"]) + # Detailed information about boxes BOXES = { "count": len(files["boxes"]), From 1eafd88927877ccbf09c130023b27f0276a4ed8d Mon Sep 17 00:00:00 2001 From: Deniz Date: Thu, 23 Nov 2023 16:42:50 -0800 Subject: [PATCH 2/2] Fix visual bugs in SearchComponent --- conformance-search/src/components/Chip.tsx | 41 ++++++++++------- .../src/components/Input/Dropdown.tsx | 2 +- .../Input/variants/ContainerInput.tsx | 45 ++++++++++++------- .../SearchComponent/SearchComponent.tsx | 2 +- 4 files changed, 57 insertions(+), 33 deletions(-) diff --git a/conformance-search/src/components/Chip.tsx b/conformance-search/src/components/Chip.tsx index ad331191..1fbf6e6b 100644 --- a/conformance-search/src/components/Chip.tsx +++ b/conformance-search/src/components/Chip.tsx @@ -1,8 +1,10 @@ +import { Tooltip } from "@mui/material"; import clsx from "clsx"; import React from "react"; export default function Chip({ children, + alt, type, className, active, @@ -10,33 +12,40 @@ export default function Chip({ onClick }: { children: React.JSX.Element | string; - type: string; + alt?: string; className?: string; + type?: string | undefined; active?: boolean; score?: number; onClick?: () => void; }) { return ( - + + + ); } Chip.defaultProps = { active: false, + alt: "", className: "", onClick: () => {}, - score: 0 + score: 0, + type: undefined }; diff --git a/conformance-search/src/components/Input/Dropdown.tsx b/conformance-search/src/components/Input/Dropdown.tsx index ea81e1f4..7c85b27b 100644 --- a/conformance-search/src/components/Input/Dropdown.tsx +++ b/conformance-search/src/components/Input/Dropdown.tsx @@ -141,7 +141,7 @@ function Dropdown( return (
{dropdownSection({ diff --git a/conformance-search/src/components/Input/variants/ContainerInput.tsx b/conformance-search/src/components/Input/variants/ContainerInput.tsx index 9b1a5b99..ee8738fd 100644 --- a/conformance-search/src/components/Input/variants/ContainerInput.tsx +++ b/conformance-search/src/components/Input/variants/ContainerInput.tsx @@ -150,26 +150,41 @@ export default function ContainerInput({
0 && "mr-2" + "flex-row flex-nowrap shadow-sm", + parsed.length > 0 && "mr-2 flex", + parsed.length === 0 && "hidden" )} > - {parsed.map((value, i) => ( + {parsed.length > 4 && ( 1 && "rounded-r-none", - i === parsed.length - 1 && "rounded-r-sm", - i > 0 && - parsed.length > 1 && - "rounded-none border-l-1 border-neutral-500" - )} - type={value[0] === "$" ? "fourcc" : "type"} + alt={parsed + .slice(0, parsed.length - 4) + .map((value) => value.substring(1)) + .join(".")} + className="rounded-l-sm" > - {value.substring(1)} + … - ))} + )} + {parsed.slice(-4).map((value, idx) => { + const i = parsed.length > 4 ? idx + 1 : idx; + return ( + 1 && "rounded-r-none", + i === parsed.length - 1 && "rounded-r-sm", + i > 0 && + parsed.length > 1 && + "rounded-none border-l-1 border-neutral-500" + )} + type={value[0] === "$" ? "fourcc" : "type"} + > + {value.substring(1)} + + ); + })}