Huge bump of versions + husky + fixed DropDown key issue and pointer (#628)

* Bump lint-staged

* Check

* Check

* Added husky

* Check

* Check

* Check

* Check

* Check

* Check

* Check

* Check

* Fix husky

* Used * instead **/* in lint-staged

* Bump tailwindcss and related

* Added @tailwindcss/vite and removed postcss

* Added lint into staged

* Bump @babel/core and updated .prettierignore

* Removed tailwind.config.cjs

* Added ThemeInit

* Added cursor-pointer to Help dropdown

* Bump react-router

* Removed @types/uuid and react-router-dom

* Bump diff2html, prettier, @typescript-eslint/eslint-plugin, @typescript-eslint/parser

* removed vite-plugin-html-config and @babel/core

* removed "@eslint/eslintrc" and "@eslint/js"

* Removed redundant link

* Returned plugins and source to index.css

* Set dark to false in tailwindcss

* Fixed storybook

* Fixed useGetLatestVersion with correct gcTime: 0 option

* Added eslint-plugin-prettier

* Removed spaces

* ClustersList.tsx improved and type fixes for another files

* Repository.tsx improved

* Huge fix of types

* Huge fix of types missed

* Fixed type of SingleValue

* Added cursor pointer
This commit is contained in:
yuri-sakharov
2025-11-29 18:49:51 +02:00
committed by GitHub
parent 1129651e6c
commit 7572f00f7c
65 changed files with 1476 additions and 1893 deletions
@@ -11,7 +11,7 @@ import {
} from "react-icons/bs";
import { Release, ReleaseRevision } from "../../data/types";
import StatusLabel, { DeploymentStatus } from "../common/StatusLabel";
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { useNavigate, useParams, useSearchParams } from "react-router";
import {
useGetReleaseInfoByType,
useGetLatestVersion,
@@ -91,14 +91,14 @@ export default function RevisionDetails({
refetch: refetchLatestVersion,
isLoading: isLoadingLatestVersion,
isRefetching: isRefetchingLatestVersion,
} = useGetLatestVersion(release.chart_name, { cacheTime: 0 });
} = useGetLatestVersion(release.chart_name);
const [showTestsResults, setShowTestResults] = useState(false);
const { setShowErrorModal } = useAlertError();
const {
mutate: runTests,
isLoading: isRunningTests,
isPending: isRunningTests,
data: testResults,
} = useTestRelease({
onError: (error) => {
@@ -306,7 +306,7 @@ export default function RevisionDetails({
function RevisionTag({ caption, text }: RevisionTagProps) {
return (
<span className="bg-revision p-1 rounded px-2 text-sm">
<span className="bg-revision p-1 rounded-sm px-2 text-sm">
<span>{caption}:</span>
<span className="font-bold"> {text}</span>
</span>
@@ -326,7 +326,7 @@ const Rollback = ({
const [showRollbackDiff, setShowRollbackDiff] = useState(false);
const revisionInt = parseInt(revision || "", 10);
const { mutate: rollbackRelease, isLoading: isRollingBackRelease } =
const { mutate: rollbackRelease, isPending: isRollingBackRelease } =
useRollbackRelease({
onSuccess: () => {
navigate(
@@ -421,7 +421,7 @@ const Rollback = ({
}, [data, isLoading, fetchedDataSuccessfully]);
return (
<div className="flex flex-col space-y-4">
<div className="flex flex-col gap-4">
{isLoading ? (
<div className="flex gap-2 text-sm">
<Spinner />
@@ -454,9 +454,7 @@ const Rollback = ({
const Uninstall = () => {
const [isOpen, setIsOpen] = useState(false);
const { namespace = "", chart = "" } = useParams();
const { data: resources } = useGetResources(namespace, chart, {
enabled: isOpen,
});
const { data: resources } = useGetResources(namespace, chart, isOpen);
const uninstallMutation = useMutation({
mutationKey: ["uninstall", namespace, chart],
@@ -497,7 +495,7 @@ const Uninstall = () => {
id: "1",
callback: uninstallMutation.mutate,
variant: ModalButtonStyle.info,
isLoading: uninstallMutation.isLoading,
isLoading: uninstallMutation.isPending,
},
]}
containerClassNames="w-[800px]"
@@ -1,7 +1,7 @@
import { ChangeEvent, useMemo, useState, useRef, useEffect } from "react";
import { Diff2HtmlUI } from "diff2html/lib/ui/js/diff2html-ui-slim.js";
import { useGetReleaseInfoByType } from "../../API/releases";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import useCustomSearchParams from "../../hooks/useCustomSearchParams";
import parse from "html-react-parser";
@@ -134,7 +134,7 @@ function RevisionDiff({
return (
<div>
<div className="flex mb-3 p-2 border border-revision flex-row items-center justify-between w-full bg-white rounded">
<div className="flex mb-3 p-2 border border-gray-200 border-revision flex-row items-center justify-between w-full bg-white rounded-sm">
<div className="flex items-center">
<input
checked={viewMode === "view"}
@@ -186,7 +186,7 @@ function RevisionDiff({
<div>
Diff with specific revision:
<input
className="border ml-2 border-gray-500 w-10 p-1 rounded-sm"
className="border ml-2 border-gray-500 w-10 p-1 rounded-xs"
type="text"
value={specificVersion}
onChange={(e) => setSpecificVersion(Number(e.target.value))}
@@ -201,7 +201,7 @@ function RevisionDiff({
type="checkbox"
onChange={handleUserDefinedCheckbox}
checked={!!userDefinedValue}
className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"
className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"
/>
<label
htmlFor="user-define-only-checkbox"
@@ -215,7 +215,9 @@ function RevisionDiff({
{isLoading ? <Spinner /> : ""}
{viewMode === VIEW_MODE_VIEW_ONLY && content ? (
<div className="bg-white overflow-x-auto w-full p-3 relative">
<pre className="bg-white rounded font-sf-mono">{parse(content)}</pre>
<pre className="bg-white rounded-sm font-sf-mono">
{parse(content)}
</pre>
</div>
) : (
""
@@ -1,5 +1,5 @@
import { useMemo, useState } from "react";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import hljs from "highlight.js";
import { RiExternalLinkLine } from "react-icons/ri";
@@ -32,19 +32,19 @@ export default function RevisionResource({ isLatest }: Props) {
cellPadding={6}
className="border-spacing-y-2 font-semibold border-separate w-full text-xs "
>
<thead className="bg-zinc-200 font-bold h-8 rounded">
<thead className="bg-zinc-200 font-bold h-8 rounded-sm">
<tr>
<td className="pl-6 rounded">RESOURCE TYPE</td>
<td className="pl-6 rounded-sm">RESOURCE TYPE</td>
<td>NAME</td>
<td>STATUS</td>
<td>STATUS MESSAGE</td>
<td className="rounded"></td>
<td className="rounded-sm"></td>
</tr>
</thead>
{isLoading ? (
<Spinner />
) : (
<tbody className="bg-white mt-4 h-8 rounded w-full">
<tbody className="bg-white mt-4 h-8 rounded-sm w-full">
{resources?.length ? (
resources
.sort(function (a, b) {
@@ -65,7 +65,7 @@ export default function RevisionResource({ isLatest }: Props) {
))
) : (
<tr>
<div className="bg-white rounded shadow display-none no-charts mt-3 text-sm p-4">
<div className="bg-white rounded-sm shadow-sm display-none no-charts mt-3 text-sm p-4">
Looks like you don&apos;t have any resources.{" "}
<RiExternalLinkLine className="ml-2 text-lg" />
</div>
@@ -100,11 +100,11 @@ const ResourceRow = ({
return (
<>
<tr className="min-w-[100%] min-h[70px] text-sm py-2">
<td className="pl-6 rounded text-sm font-normal w-48">{kind}</td>
<td className="pl-6 rounded-sm text-sm font-normal w-48">{kind}</td>
<td className="font-bold text-sm w-56">{name}</td>
<td>{reason ? <Badge type={badgeType}>{reason}</Badge> : null}</td>
<td className="rounded text-gray-100">
<div className="flex flex-col space-y-1 flex-start">
<td className="rounded-sm text-gray-100">
<div className="flex flex-col gap-1 flex-start">
{message && (
<div className="text-gray-500 font-thin">{message}</div>
)}
@@ -113,7 +113,7 @@ const ResourceRow = ({
)}
</div>
</td>
<td className="rounded">
<td className="rounded-sm">
{isLatest && reason !== "NotFound" ? (
<div className="flex justify-end items-center mr-36">
<Button className="px-1 text-xs" onClick={toggleDrawer}>
@@ -183,7 +183,7 @@ const DescribeResource = ({
<div className="flex items-center gap-4 pr-4">
<a
href="https://www.komodor.com/helm-dash/?utm_campaign=Helm%20Dashboard%20%7C%20CTA&amp;utm_source=helm-dash&amp;utm_medium=cta&amp;utm_content=helm-dash"
className="bg-primary text-white p-1.5 text-sm flex items-center rounded"
className="bg-primary text-white p-1.5 text-sm flex items-center rounded-sm"
target="_blank"
rel="noreferrer"
>
@@ -207,7 +207,7 @@ const DescribeResource = ({
) : (
<div className="h-full overflow-y-auto ">
<pre
className="bg-white rounded p-4 font-medium text-base font-sf-mono"
className="bg-white rounded-sm p-4 font-medium text-base font-sf-mono"
style={{ overflow: "unset" }}
dangerouslySetInnerHTML={{
__html: yamlFormattedData,
@@ -1,5 +1,5 @@
import { BsArrowDownRight, BsArrowUpRight } from "react-icons/bs";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import { compare } from "compare-versions";
import { ReleaseRevision } from "../../data/types";
@@ -40,7 +40,7 @@ export default function RevisionsList({
}
onClick={() => changeRelease(release.revision)}
key={release.revision}
className={`flex flex-col border rounded-md mx-5 p-2 gap-4 cursor-pointer ${
className={`flex flex-col border border-gray-200 rounded-md mx-5 p-2 gap-4 cursor-pointer ${
release.revision === selectedRevision
? "border-revision-dark bg-white"
: "border-revision-light bg-body-background"