Skip to content

Commit 0b51b6e

Browse files
committed
Merge remote-tracking branch 'origin/main' into update-dependencies-23731605265
2 parents 82c60aa + a96fd69 commit 0b51b6e

3 files changed

Lines changed: 87 additions & 93 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
pull_request:
66
branches: [main]
77

8-
permissions:
9-
contents: read
10-
pull-requests: write
11-
128
jobs:
139
lint-and-check:
1410
runs-on: ubuntu-latest
@@ -36,76 +32,3 @@ jobs:
3632

3733
- name: Type check
3834
run: pnpm check
39-
40-
fly_preview:
41-
if: github.event.pull_request.draft == false
42-
runs-on: ubuntu-latest
43-
needs: [lint-and-check]
44-
env:
45-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
46-
concurrency:
47-
group: pr-${{ github.event.pull_request.number }}
48-
49-
steps:
50-
- name: Checkout
51-
uses: actions/checkout@v4
52-
53-
- name: Find existing comment
54-
uses: peter-evans/find-comment@v3
55-
id: fc
56-
with:
57-
issue-number: ${{ github.event.pull_request.number }}
58-
comment-author: 'github-actions[bot]'
59-
body-includes: '<!-- fly-preview-counterslayer -->'
60-
61-
- name: Create or update comment (deploying)
62-
uses: peter-evans/create-or-update-comment@v3
63-
with:
64-
comment-id: ${{ steps.fc.outputs.comment-id }}
65-
issue-number: ${{ github.event.pull_request.number }}
66-
edit-mode: replace
67-
body: |
68-
<!-- fly-preview-counterslayer -->
69-
### Fly Preview Deployment - In Progress :rocket:
70-
71-
Deploying preview to [Fly.io](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)...
72-
73-
- name: Deploy preview
74-
uses: superfly/fly-pr-review-apps@1.3.0
75-
with:
76-
name: pr-${{ github.event.pull_request.number }}-counterslayer
77-
config: fly.dev.toml
78-
org: siege-perilous
79-
80-
- name: Find comment after deploy
81-
uses: peter-evans/find-comment@v3
82-
id: fc2
83-
with:
84-
issue-number: ${{ github.event.pull_request.number }}
85-
comment-author: 'github-actions[bot]'
86-
body-includes: '<!-- fly-preview-counterslayer -->'
87-
88-
- name: Update comment (success)
89-
uses: peter-evans/create-or-update-comment@v3
90-
with:
91-
comment-id: ${{ steps.fc2.outputs.comment-id }}
92-
issue-number: ${{ github.event.pull_request.number }}
93-
edit-mode: replace
94-
body: |
95-
<!-- fly-preview-counterslayer -->
96-
### Fly Preview Deployment - Completed :white_check_mark:
97-
98-
- [Preview](https://pr-${{ github.event.pull_request.number }}-counterslayer.fly.dev) - [Fly Dashboard](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)
99-
100-
- name: Update comment (failure)
101-
if: failure()
102-
uses: peter-evans/create-or-update-comment@v3
103-
with:
104-
comment-id: ${{ steps.fc2.outputs.comment-id }}
105-
issue-number: ${{ github.event.pull_request.number }}
106-
edit-mode: replace
107-
body: |
108-
<!-- fly-preview-counterslayer -->
109-
### Fly Preview Deployment - Failed :x:
110-
111-
Check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.

.github/workflows/fly-preview.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Fly Preview
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
fly_preview:
13+
if: github.event.pull_request.draft == false
14+
runs-on: ubuntu-latest
15+
environment: ${{ github.event.pull_request.head.repo.full_name != github.repository && 'preview' || '' }}
16+
env:
17+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
18+
concurrency:
19+
group: pr-${{ github.event.pull_request.number }}
20+
21+
steps:
22+
- name: Checkout PR head
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
27+
- name: Find existing comment
28+
uses: peter-evans/find-comment@v3
29+
id: fc
30+
with:
31+
issue-number: ${{ github.event.pull_request.number }}
32+
comment-author: 'github-actions[bot]'
33+
body-includes: '<!-- fly-preview-counterslayer -->'
34+
35+
- name: Create or update comment (deploying)
36+
uses: peter-evans/create-or-update-comment@v3
37+
with:
38+
comment-id: ${{ steps.fc.outputs.comment-id }}
39+
issue-number: ${{ github.event.pull_request.number }}
40+
edit-mode: replace
41+
body: |
42+
<!-- fly-preview-counterslayer -->
43+
### Fly Preview Deployment - In Progress :rocket:
44+
45+
Deploying preview to [Fly.io](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)...
46+
47+
- name: Deploy preview
48+
uses: superfly/fly-pr-review-apps@1.3.0
49+
with:
50+
name: pr-${{ github.event.pull_request.number }}-counterslayer
51+
config: fly.dev.toml
52+
org: siege-perilous
53+
54+
- name: Find comment after deploy
55+
uses: peter-evans/find-comment@v3
56+
id: fc2
57+
with:
58+
issue-number: ${{ github.event.pull_request.number }}
59+
comment-author: 'github-actions[bot]'
60+
body-includes: '<!-- fly-preview-counterslayer -->'
61+
62+
- name: Update comment (success)
63+
uses: peter-evans/create-or-update-comment@v3
64+
with:
65+
comment-id: ${{ steps.fc2.outputs.comment-id }}
66+
issue-number: ${{ github.event.pull_request.number }}
67+
edit-mode: replace
68+
body: |
69+
<!-- fly-preview-counterslayer -->
70+
### Fly Preview Deployment - Completed :white_check_mark:
71+
72+
- [Preview](https://pr-${{ github.event.pull_request.number }}-counterslayer.fly.dev) - [Fly Dashboard](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)
73+
74+
- name: Update comment (failure)
75+
if: failure()
76+
uses: peter-evans/create-or-update-comment@v3
77+
with:
78+
comment-id: ${{ steps.fc2.outputs.comment-id }}
79+
issue-number: ${{ github.event.pull_request.number }}
80+
edit-mode: replace
81+
body: |
82+
<!-- fly-preview-counterslayer -->
83+
### Fly Preview Deployment - Failed :x:
84+
85+
Check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.

src/lib/components/EditorPanel.svelte

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,8 @@
8585
}
8686
8787
function handleCounterParamsChange(newParams: CounterTrayParams) {
88-
// Find any counter tray to update (for backwards compatibility with tray-specific params)
89-
for (const layer of project.layers) {
90-
for (const box of layer.boxes) {
91-
for (const tray of box.trays) {
92-
if (isCounterTray(tray)) {
93-
updateTrayParams(tray.id, newParams);
94-
return;
95-
}
96-
}
97-
}
98-
for (const tray of layer.looseTrays) {
99-
if (isCounterTray(tray)) {
100-
updateTrayParams(tray.id, newParams);
101-
return;
102-
}
103-
}
88+
if (selectedTray && isCounterTray(selectedTray)) {
89+
updateTrayParams(selectedTray.id, newParams);
10490
}
10591
}
10692

0 commit comments

Comments
 (0)