From cd7525a5cb1914b17d5a921f856382cbe8d76b8e Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Tue, 19 Nov 2024 11:29:10 +1300 Subject: [PATCH] fix(dropdown): fix checkbox icon not showing in dropdown --- .changeset/new-bees-punch.md | 5 ++++ .github/workflows/release.yml | 41 +++++++++++++++++++++++++++------ src-tauri/Cargo.lock | 2 +- src/components/search-input.tsx | 38 +++++++++++++++++++++++++++--- 4 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 .changeset/new-bees-punch.md diff --git a/.changeset/new-bees-punch.md b/.changeset/new-bees-punch.md new file mode 100644 index 0000000..c0b8bee --- /dev/null +++ b/.changeset/new-bees-punch.md @@ -0,0 +1,5 @@ +--- +"clippr": patch +--- + +Fixed how check icon was not shown in dropdown diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75a1e20..8ab7c61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,13 +39,40 @@ jobs: - name: Build the app run: pnpm tauri build - - name: Get Changelog Entry - id: get-changelog + - name: Get Latest Release PR Content + id: get-pr-content + shell: pwsh run: | - CHANGELOG_CONTENT=$(awk '/^## / {count++} count==1 {print} count>1 {exit}' CHANGELOG.md | sed '1d') - echo "changelog<> $GITHUB_OUTPUT - echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + try { + # Get PR content and explicitly convert the output to string before parsing + $prs = (gh pr list --search "author:app/github-actions is:merged" --json number,title,body --limit 1) | Out-String + $pr = $prs | ConvertFrom-Json + if ($pr) { + $prBody = $pr[0].body + $lines = $prBody -split '\r?\n' + $contentStartIndex = 0 + foreach ($index in 0..($lines.Count-1)) { + if ($lines[$index] -match '### ') { + $contentStartIndex = $index + break + } + } + $releaseNotes = ($lines | Select-Object -Skip $contentStartIndex) -join "`n" + $releaseNotes = $releaseNotes -replace '####\s', '### ' -replace '###\s', '## ' + $releaseNotes = $releaseNotes.Trim() + echo "content<> $env:GITHUB_OUTPUT + echo $releaseNotes >> $env:GITHUB_OUTPUT + echo "EOF" >> $env:GITHUB_OUTPUT + } else { + echo "No recent changeset PR found" + exit 1 + } + } catch { + echo "Error processing PR content: $_" + exit 1 + } + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release uses: softprops/action-gh-release@v1 @@ -54,6 +81,6 @@ jobs: src-tauri/target/release/bundle/msi/*.msi src-tauri/target/release/bundle/nsis/*.exe src-tauri/target/release/Clippr.exe - body: ${{ steps.get-changelog.outputs.changelog }} + body: ${{ steps.get-pr-content.outputs.content }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 22a3424..5b9ee8d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "Clippr" -version = "1.5.0" +version = "1.6.0" dependencies = [ "active-win-pos-rs", "base64 0.22.1", diff --git a/src/components/search-input.tsx b/src/components/search-input.tsx index 82b831a..28ca549 100644 --- a/src/components/search-input.tsx +++ b/src/components/search-input.tsx @@ -145,9 +145,26 @@ export const SearchInput: Component = (props) => { {(sort) => ( )} @@ -190,7 +207,7 @@ export const SearchInput: Component = (props) => { {(type) => ( )}