From 37299173c8fcaf88d44b1a54baf7ddc03aa20ca6 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 23 Aug 2024 17:42:07 +0800 Subject: [PATCH] fix: ci and tootip portal Signed-off-by: Innei --- .github/workflows/build.yml | 13 +++++++++++- .github/workflows/lint.yml | 4 +++- .../ui/typography/EllipsisWithTooltip.tsx | 20 ++++++++++--------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e0f02a6f..f5de8a30e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,10 @@ on: tag_version: description: "Tag Version" required: true +# https://docs.github.com/en/enterprise-cloud@latest/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: VITE_WEB_URL: ${{ vars.VITE_WEB_URL }} VITE_API_URL: ${{ vars.VITE_API_URL }} @@ -28,11 +32,18 @@ jobs: os: [macos-latest, ubuntu-latest, windows-latest] steps: - - name: Check out Git repository + - name: Check out Git repository Fully uses: actions/checkout@v4 + if: github.event.inputs.tag_version != '' || github.ref_type == 'tag' with: fetch-depth: 0 lfs: true + - name: Check out Git repository + uses: actions/checkout@v4 + if: github.event.inputs.tag_version == '' && github.ref_type != 'tag' + with: + fetch-depth: 1 + lfs: true - name: Cache pnpm modules uses: actions/cache@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 314c64f60..86e8f6735 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,9 @@ on: branches: [main] name: CI Typecheck and Lint - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: name: Lint and Typecheck diff --git a/src/renderer/src/components/ui/typography/EllipsisWithTooltip.tsx b/src/renderer/src/components/ui/typography/EllipsisWithTooltip.tsx index 8e9c08708..558f62540 100644 --- a/src/renderer/src/components/ui/typography/EllipsisWithTooltip.tsx +++ b/src/renderer/src/components/ui/typography/EllipsisWithTooltip.tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from "react" import { Tooltip, TooltipContent, + TooltipPortal, TooltipTrigger, } from "../tooltip" @@ -70,15 +71,16 @@ export const EllipsisTextWithTooltip = (props: EllipsisProps) => { {Content} - - e.stopPropagation()} - > - {children} - - - + + + e.stopPropagation()} + > + {children} + + + ) }