chore: splitting icons into standalone components#55
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the release GitHub Actions workflow to call a reusable workflow, while also adding a “Buy Me a Coffee” link to the UI with theme support.
Changes:
- Switch
.github/workflows/release.ymlto use a reusable workflow with inputs and inherited secrets. - Add a Buy Me a Coffee URL constant and surface it in the status bar with a themed color token.
- Adjust mobile UI behavior in
EditorTabs.vue(GitHub link/divider visibility).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/index.css |
Adds CSS variable mapping/color to theme the new Buy Me a Coffee link. |
src/constants/urls.ts |
Introduces URLS.BUY_ME_A_COFFEE for external linking. |
src/components/layout/StatusBar.vue |
Updates GitHub link hover styling and adds a new Buy Me a Coffee icon/link. |
src/components/layout/EditorTabs.vue |
Makes the divider + GitHub repo link conditional for mobile. |
.github/workflows/release.yml |
Replaces inline release steps with a reusable workflow call. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| :href="URLS.BUY_ME_A_COFFEE" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80" |
There was a problem hiding this comment.
This class list uses transition-colors, but the hover effect changes opacity (hover:opacity-80) rather than color. Switch to transition-opacity (or add an actual color transition) to match the behavior.
| class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80" | |
| class="transition-opacity flex items-center gap-1 group text-ide-bmc hover:opacity-80" |
|
|
||
| <div class="w-px h-3 bg-ide-border mx-1"></div> | ||
| <div v-if="isMobile" class="w-px h-3 bg-ide-border mx-1"></div> | ||
|
|
There was a problem hiding this comment.
There appears to be trailing whitespace on this blank line (shows up in the diff as a line with spaces). Please remove it to keep formatting/lint clean.
| gh release create $NEW_VERSION \ | ||
| --target main \ | ||
| -t $NEW_VERSION | ||
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main |
There was a problem hiding this comment.
The reusable workflow is referenced by branch (@main). For security and supply-chain safety, pin reusable workflow references to an immutable tag or commit SHA so a future change on main cannot unexpectedly alter your release process.
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main | |
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@<40-character-commit-sha> |
.github/workflows/release.yml
Outdated
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: "Update Dev Container Index" | ||
| run: bash ./scripts/update-data.sh | ||
|
|
||
| - name: "Bump to new version" | ||
| id: bump | ||
| run: | | ||
| _version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }}) | ||
|
|
||
| echo "new_version=$_version" >> $GITHUB_OUTPUT | ||
| echo "New version: $_version" | ||
|
|
||
| - name: "Create Pull Request" | ||
| id: cpr | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ secrets.RELEASE_PAT }} | ||
| title: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| body: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| branch: "release-${{ env.NEW_VERSION }}" | ||
| delete-branch: true | ||
| env: | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
|
|
||
| - name: "Auto-merge PR" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" | ||
|
|
||
| - name: "Wait for PR to merge" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| timeout-minutes: 3 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }} | ||
| run: | | ||
| while true; do | ||
| STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}') | ||
| if [ "$STATE" == "MERGED" ]; then | ||
| echo "PR merged." | ||
| break | ||
| fi | ||
| if [ "$STATE" == "CLOSED" ]; then | ||
| echo "PR closed without merging." | ||
| exit 1 | ||
| fi | ||
| echo "State: $STATE. Waiting 3s..." | ||
| sleep 3 | ||
| done | ||
|
|
||
| - name: "Release" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| env: | ||
| # https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
| run: | | ||
| gh release create $NEW_VERSION \ | ||
| --target main \ | ||
| -t $NEW_VERSION | ||
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main | ||
| with: | ||
| version: ${{ github.event.inputs.version || 'patch' }} | ||
| pre_release_command: "bash ./scripts/update-data.sh" | ||
| timeout_minutes: 5 | ||
| secrets: inherit No newline at end of file |
There was a problem hiding this comment.
PR title indicates this is about the GitHub Actions release workflow, but this PR also adds UI/CSS changes (Buy Me a Coffee link and theme variable). Either split these into separate PRs or update the PR title/description so the scope matches what's being changed.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| class="icon-base" | ||
| v-bind="$attrs" |
There was a problem hiding this comment.
v-bind="$attrs" on the <svg> root can cause attributes/listeners to be applied twice because Vue already falls through non-prop attributes to the root element by default. This can lead to duplicated event handler invocation (e.g., a passed @click) and confusing attribute merging. Consider removing the explicit v-bind="$attrs", or set defineOptions({ inheritAttrs: false }) and keep the manual binding (one or the other, not both).
| v-bind="$attrs" |
| <span>UTF-8</span> | ||
| <a | ||
| :href="URLS.REPO_URL" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="hover:text-ide-accent transition-colors flex items-center gap-1 group" | ||
| title="GitHub Profile" | ||
| class="hover:text-ide-text-bright transition-colors flex items-center gap-1 group" | ||
| title="GitHub Repository" | ||
| > | ||
| <svg | ||
| class="w-3.5 h-3.5 opacity-70 group-hover:opacity-100" | ||
| fill="currentColor" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path | ||
| d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-11.999-12-11.999z" | ||
| /> | ||
| </svg> | ||
| <IconGithub size="14" class="opacity-70 group-hover:opacity-100" /> | ||
| </a> |
There was a problem hiding this comment.
This icon-only link relies on title for labeling. For accessibility, provide an explicit accessible name (e.g., aria-label="GitHub Repository") so screen readers and non-hover devices have a reliable label.
| <a | ||
| :href="URLS.BUY_ME_A_COFFEE" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80" | ||
| title="Buy me a coffee" | ||
| > | ||
| <IconCoffee size="14" /> | ||
| </a> |
There was a problem hiding this comment.
This icon-only link relies on title for labeling. For accessibility, add an aria-label (e.g., "Buy me a coffee") so the link has a reliable accessible name across screen readers and touch devices.
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: "Update Dev Container Index" | ||
| run: bash ./scripts/update-data.sh | ||
|
|
||
| - name: "Bump to new version" | ||
| id: bump | ||
| run: | | ||
| _version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }}) | ||
|
|
||
| echo "new_version=$_version" >> $GITHUB_OUTPUT | ||
| echo "New version: $_version" | ||
|
|
||
| - name: "Create Pull Request" | ||
| id: cpr | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ secrets.RELEASE_PAT }} | ||
| title: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| body: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| branch: "release-${{ env.NEW_VERSION }}" | ||
| delete-branch: true | ||
| env: | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
|
|
||
| - name: "Auto-merge PR" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" | ||
|
|
||
| - name: "Wait for PR to merge" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| timeout-minutes: 3 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }} | ||
| run: | | ||
| while true; do | ||
| STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}') | ||
| if [ "$STATE" == "MERGED" ]; then | ||
| echo "PR merged." | ||
| break | ||
| fi | ||
| if [ "$STATE" == "CLOSED" ]; then | ||
| echo "PR closed without merging." | ||
| exit 1 | ||
| fi | ||
| echo "State: $STATE. Waiting 3s..." | ||
| sleep 3 | ||
| done | ||
|
|
||
| - name: "Release" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| env: | ||
| # https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
| run: | | ||
| gh release create $NEW_VERSION \ | ||
| --target main \ | ||
| -t $NEW_VERSION | ||
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main | ||
| with: | ||
| version: ${{ github.event.inputs.version || 'patch' }} | ||
| pre_release_command: "bash ./scripts/update-data.sh" | ||
| timeout_minutes: 5 | ||
| secrets: inherit |
There was a problem hiding this comment.
The reusable workflow is referenced via @main, which is mutable and increases supply-chain risk. Prefer pinning to a tag or (ideally) a specific commit SHA so the release pipeline can’t change unexpectedly.
| - minor | ||
| - major | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: "release" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: "Update Dev Container Index" | ||
| run: bash ./scripts/update-data.sh | ||
|
|
||
| - name: "Bump to new version" | ||
| id: bump | ||
| run: | | ||
| _version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }}) | ||
|
|
||
| echo "new_version=$_version" >> $GITHUB_OUTPUT | ||
| echo "New version: $_version" | ||
|
|
||
| - name: "Create Pull Request" | ||
| id: cpr | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ secrets.RELEASE_PAT }} | ||
| title: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| body: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}" | ||
| branch: "release-${{ env.NEW_VERSION }}" | ||
| delete-branch: true | ||
| env: | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
|
|
||
| - name: "Auto-merge PR" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" | ||
|
|
||
| - name: "Wait for PR to merge" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| timeout-minutes: 3 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }} | ||
| run: | | ||
| while true; do | ||
| STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}') | ||
| if [ "$STATE" == "MERGED" ]; then | ||
| echo "PR merged." | ||
| break | ||
| fi | ||
| if [ "$STATE" == "CLOSED" ]; then | ||
| echo "PR closed without merging." | ||
| exit 1 | ||
| fi | ||
| echo "State: $STATE. Waiting 3s..." | ||
| sleep 3 | ||
| done | ||
|
|
||
| - name: "Release" | ||
| if: steps.cpr.outputs.pull-request-number != '' | ||
| env: | ||
| # https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | ||
| NEW_VERSION: ${{ steps.bump.outputs.new_version }} | ||
| run: | | ||
| gh release create $NEW_VERSION \ | ||
| --target main \ | ||
| -t $NEW_VERSION | ||
| uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main | ||
| with: | ||
| version: ${{ github.event.inputs.version || 'patch' }} | ||
| pre_release_command: "bash ./scripts/update-data.sh" | ||
| timeout_minutes: 5 | ||
| secrets: inherit |
There was a problem hiding this comment.
This workflow no longer sets permissions/concurrency locally. For reusable workflows, the called workflow’s GITHUB_TOKEN permissions are constrained by the caller, and missing concurrency can allow overlapping releases. Consider reintroducing explicit permissions (e.g., contents/pull-requests write if needed) and a release concurrency group here to avoid relying on repo defaults.
No description provided.