-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "\U0001F41B Bug Report" | ||
description: Report an issue or possible bug | ||
labels: [] | ||
assignees: [] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## Quick Checklist | ||
Thank you for taking the time to file a bug report! Please fill out this form as completely as possible. | ||
✅ I am using the **latest version of the Bag of Tricks** | ||
✅ I have searched all issues here to see if this has already been reported | ||
- type: textarea | ||
id: bug-description | ||
attributes: | ||
label: Describe the Bug | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: bug-expectation | ||
attributes: | ||
label: What's the expected result? | ||
description: Describe what you expect to happen. | ||
validations: | ||
required: true | ||
- type: input | ||
id: bug-reproduction | ||
attributes: | ||
label: Link to Minimal Reproducible Example | ||
description: '**A minimal reproduction is required** so that others can help debug your issue.' | ||
placeholder: 'https://github.com/you/your-minimal-repo' | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: will-pr | ||
attributes: | ||
label: Participation | ||
options: | ||
- label: I am willing to submit a pull request for this issue. | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Issue or feature request | ||
url: https://github.com/martrapp/astro-vtbot/issues/new/choose | ||
about: Report bugs or request a new trick for the bag using this link. | ||
- name: GitHub Discussions | ||
url: https://github.com/martrapp/astro-vtbot/discussions | ||
about: Does the issue involve a lot of explanation, or are you not sure how it can be split into actionable tasks? Consider starting a discussion first. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- 🙌 Thanks for contributing to the astro-vtbot package! --> | ||
### Description | ||
|
||
- Summarize your changes in one or two sentences. | ||
- Don't forget `npm changeset` | ||
|
||
### Tests | ||
|
||
- How was this change tested? | ||
|
||
|
||
### Docs & Examples | ||
|
||
- Does your change here require changes to the astro-vtbot-website? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export function deriveCSSSelector(element: Element, useIds = true) { | ||
let path: string[] = []; | ||
while (element && element.nodeType === Node.ELEMENT_NODE) { | ||
let selector = element.nodeName.toLowerCase(); | ||
if (useIds && element.id) { | ||
selector = '#' + element.id; | ||
path.unshift(selector); | ||
break; | ||
} else { | ||
let sibling = element; | ||
let nth = 1; | ||
while ((sibling = sibling.previousElementSibling as Element)) { | ||
if (sibling.nodeName.toLowerCase() === selector) nth++; | ||
} | ||
if (nth !== 1) { | ||
selector += ':nth-of-type(' + nth + ')'; | ||
} | ||
} | ||
path.unshift(selector); | ||
element = element.parentNode as Element; | ||
} | ||
return path.join(' > '); | ||
} |