Skip to content

Commit 1da86cf

Browse files
authored
chore: Improves bug reporting and StackBlitz integration (#109)
* chore: improve bug reporting and stackblitz integration Enhances the bug reporting process by providing a structured YAML template with clear guidelines and required information. Adds a bug reproduction guideline to improve bug reports quality. Adds stackblitz publish workflow to allow faster user contributions. Updates node version to 24. * fix ci * try compact * add config * update template * fix react template * fix root
1 parent 32d873d commit 1da86cf

19 files changed

+485
-55
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: '🐛 Bug Report'
2+
description: Create a report to help us improve
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
**Before Submitting Your Bug Report...**
8+
9+
This form is specifically for reporting bugs in PixiJS Layout. If you have questions about usage
10+
or aren't sure whether you've encountered a bug, please try these resources first:
11+
12+
- Check the [official documentation](https://pixijs.com/)
13+
- Join our [Discord community](https://discord.gg/CPTjeb28nH) for help
14+
15+
Please search existing issues before submitting - your bug may have already been reported or fixed in the development branch.
16+
- type: input
17+
id: version
18+
attributes:
19+
label: PixiJS Layout version
20+
validations:
21+
required: true
22+
- type: input
23+
id: version
24+
attributes:
25+
label: PixiJS version
26+
validations:
27+
required: true
28+
- type: input
29+
id: reproduction-link
30+
attributes:
31+
label: Link to minimal reproduction
32+
description: |
33+
To help us fix your bug quickly, please provide a minimal code example that demonstrates the issue.
34+
35+
**Recommended platforms:**
36+
- [StackBlitz](https://stackblitz.com/edit/pixijs-layout)
37+
38+
**Keep it minimal:** Include only the essential code needed to reproduce the bug. Check our [Bug Reproduction Guidelines](https://github.com/pixijs/layout/tree/main/.github/bug-repro-guidelines.md) for best practices.
39+
40+
⚠️ **Important:** Issues without a valid reproduction link will be closed. Please don't submit placeholder or unrelated links.
41+
placeholder: Reproduction Link
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: steps-to-reproduce
46+
attributes:
47+
label: Steps to reproduce
48+
description: |
49+
Please provide clear, step-by-step instructions on how to trigger the bug after opening your reproduction link.
50+
51+
Well-written steps help us identify and fix the issue faster. You can use [Markdown](https://guides.github.com/features/mastering-markdown/) to format your instructions with lists and code blocks.
52+
placeholder: Steps to reproduce
53+
validations:
54+
required: true
55+
- type: textarea
56+
id: expected
57+
attributes:
58+
label: What is expected?
59+
validations:
60+
required: true
61+
- type: textarea
62+
id: actually-happening
63+
attributes:
64+
label: What is actually happening?
65+
validations:
66+
required: true
67+
- type: textarea
68+
attributes:
69+
label: Environment
70+
value: |
71+
- **Browser & Version**: *e.g. Chrome 108*
72+
- **OS & Version**: *e.g. Ubuntu 22.04*
73+
validations:
74+
required: true
75+
- type: textarea
76+
id: additional-comments
77+
attributes:
78+
label: Any additional comments?
79+
description: e.g. some background/context of how you ran into this bug or possible solutions.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discord Chat
4+
url: https://discord.gg/CPTjeb28nH
5+
about: Ask questions and discuss with other PixiJS users in real time.
6+
- name: Open Collective
7+
url: https://opencollective.com/pixijs/donate
8+
about: Love PixiJS? Please consider supporting us via Open Collective.

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: '💡 Feature Request'
2+
description: I have a great idea for PixiJS Layout!
3+
title: 'Feature Request: '
4+
labels: ['Feature Request']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for creating a feature request!
10+
11+
Before opening an issue **please** check if a similar issue exists by
12+
searching existing issues (<https://github.com/pixijs/layout/issues>).
13+
14+
Before submitting please read:
15+
16+
Contributors guide: <https://github.com/pixijs/layout/blob/main/.github/CONTRIBUTING.md>
17+
Code of Conduct: <https://github.com/pixijs/layout/blob/main/.github/CODE_OF_CONDUCT.md>
18+
- type: textarea
19+
attributes:
20+
label: Description
21+
validations:
22+
required: true

.github/bug-repo-guidelines.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Bug Reproduction Guidelines
2+
3+
A bug reproduction is runnable code that demonstrates exactly how a bug occurs. Think of it as a recipe that helps us recreate and fix the problem you're experiencing.
4+
5+
### Why text descriptions aren't enough
6+
7+
While detailed descriptions are helpful, they can't replace actual code because:
8+
9+
- Technical problems are difficult to describe precisely without missing crucial details
10+
- The real cause might be something you didn't think to mention
11+
- Only runnable code gives us the complete context we need to debug effectively
12+
13+
### Make it runnable, not just visual
14+
15+
Screenshots and videos show us *that* a bug exists, but not *why* it happens. We need runnable code to understand the root cause and fix it properly.
16+
17+
**Note:** Videos or GIFs can be helpful supplements for explaining complex interactions that are hard to describe in words.
18+
19+
### Keep it minimal
20+
21+
Please don't link to your entire project and ask us to find the bug. Here's why:
22+
23+
- **Time constraints:** Hunting bugs in large, unfamiliar codebases is extremely time-consuming
24+
- **Unclear source:** The issue might be in your application code rather than PixiJS itself
25+
- **Focus:** We need to isolate the exact problem to fix it efficiently
26+
27+
**What "minimal" means:** Include only the essential code needed to trigger the bug. Strip away everything unrelated to the specific issue you're reporting.
28+
29+
### Creating your reproduction
30+
31+
Choose the platform that best fits your needs:
32+
33+
- [StackBlitz](https://stackblitz.com/edit/pixijs-layout)

.github/workflows/main.yml renamed to .github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Use Node.js
1313
uses: actions/setup-node@v4
1414
with:
15-
node-version: 20
15+
node-version: 24
1616
cache: npm
1717

1818
- name: Cache Dependencies
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Stackblitz Publish
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{github.workflow}} - ${{github.ref}}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 24
21+
cache: npm
22+
23+
- name: Cache Dependencies
24+
id: node-modules-cache
25+
uses: actions/cache@v4
26+
with:
27+
path: node_modules
28+
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-modules-
31+
32+
- name: Install Dependencies
33+
if: steps.node-modules-cache.outputs.cache-hit != 'true'
34+
shell: bash
35+
run: npm ci --ignore-scripts --no-audit --no-fund
36+
37+
# `npm rebuild` will run all those post-install scripts for us.
38+
- name: Rebuild
39+
shell: bash
40+
run: npm rebuild
41+
42+
- name: Build
43+
run: npm run build:lib
44+
45+
- name: Publish
46+
run: npx pkg-pr-new@latest publish './' --template '.stackblitz/*'

.stackblitz/js/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/index.js"></script>
12+
</body>
13+
</html>

.stackblitz/js/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "layout-js",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "vite build",
8+
"preview": "vite preview"
9+
},
10+
"dependencies": {
11+
"@pixi/layout": "latest",
12+
"pixi.js": "latest"
13+
},
14+
"devDependencies": {
15+
"vite": "^7.0.4"
16+
}
17+
}

0 commit comments

Comments
 (0)