Skip to content

Commit cfbe9bb

Browse files
committed
fix(issue): symbols shows original folder (#22)
1 parent 2359f9b commit cfbe9bb

7 files changed

Lines changed: 134 additions & 7 deletions

File tree

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Bug Report
2+
description: Report a bug with GitHub Icons
3+
labels: [bug]
4+
body:
5+
- type: dropdown
6+
id: browser
7+
attributes:
8+
label: Browser
9+
options:
10+
- Chrome
11+
- Firefox
12+
- Safari
13+
- Edge
14+
- Brave
15+
- Arc
16+
- Other
17+
validations:
18+
required: true
19+
20+
- type: input
21+
id: browser-version
22+
attributes:
23+
label: Browser version
24+
placeholder: e.g. 124.0.6367.91
25+
validations:
26+
required: true
27+
28+
- type: input
29+
id: extension-version
30+
attributes:
31+
label: Extension version
32+
placeholder: e.g. 0.6.0
33+
validations:
34+
required: true
35+
36+
- type: dropdown
37+
id: icon-theme
38+
attributes:
39+
label: Icon theme
40+
description: Which icon theme were you using when the bug occurred?
41+
options:
42+
- All themes
43+
- Material Design
44+
- VS Code Icons
45+
- Seti
46+
- Symbols
47+
- Catppuccin
48+
- Great Icons
49+
validations:
50+
required: true
51+
52+
- type: dropdown
53+
id: github-area
54+
attributes:
55+
label: GitHub area
56+
description: Where on GitHub does the bug occur?
57+
options:
58+
- File tree (main view)
59+
- Sidebar
60+
- Pull request file list
61+
- Search results
62+
- Other
63+
validations:
64+
required: true
65+
66+
- type: textarea
67+
id: description
68+
attributes:
69+
label: Description
70+
description: What happened and what did you expect?
71+
validations:
72+
required: true
73+
74+
- type: textarea
75+
id: steps
76+
attributes:
77+
label: Steps to reproduce
78+
description: How can we reproduce the issue?
79+
placeholder: |
80+
1. Go to ...
81+
2. Click on ...
82+
3. See ...
83+
validations:
84+
required: true
85+
86+
- type: textarea
87+
id: screenshots
88+
attributes:
89+
label: Screenshots
90+
description: If applicable, add screenshots to help illustrate the issue.
91+
validations:
92+
required: false
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: What feature or improvement would you like to see?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: use-case
15+
attributes:
16+
label: Use case
17+
description: Why would this be useful? What problem does it solve?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: screenshots
23+
attributes:
24+
label: Screenshots / mockups
25+
description: If applicable, add visuals to help explain your idea.
26+
validations:
27+
required: false

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ jobs:
8686

8787
- name: Publish to Firefox Add-ons
8888
run: |
89+
echo '{"version": {"license": "MIT"}}' > amo-metadata.json
8990
npx web-ext sign \
9091
--channel=listed \
9192
--source-dir=output/firefox-mv2 \
9293
--api-key=${{ secrets.AMO_JWT_ISSUER }} \
93-
--api-secret=${{ secrets.AMO_JWT_SECRET }}
94+
--api-secret=${{ secrets.AMO_JWT_SECRET }} \
95+
--amo-metadata=amo-metadata.json
9496
continue-on-error: true

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "chrome-github-icons",
33
"description": "Cross-browser extension that replaces GitHub file icons with Material Design icons.",
44
"private": true,
5-
"version": "0.6.0",
5+
"version": "0.6.1",
66
"type": "module",
77
"scripts": {
88
"sync:assets": "tsx scripts/copy-icons.ts",

src/icon-engine/resolver.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,21 @@ function resolveDirectoryCandidates(filename: string): string[] {
126126
}
127127

128128
function resolveDirectoryIconId(manifest: Manifest, filename: string, query: IconQuery): string | undefined {
129-
const folderNames = query.isRoot ? query.isOpen ? manifest.rootFolderNamesExpanded : manifest.rootFolderNames : query.isOpen ? manifest.folderNamesExpanded : manifest.folderNames;
129+
const folderNames = query.isRoot
130+
? query.isOpen ? (manifest.rootFolderNamesExpanded ?? manifest.rootFolderNames) : manifest.rootFolderNames
131+
: query.isOpen ? (manifest.folderNamesExpanded ?? manifest.folderNames) : manifest.folderNames;
130132
for (const candidate of resolveDirectoryCandidates(filename)) {
131133
const match = resolveExactMatch(folderNames, candidate);
132134
if (match) {
133135
return match;
134136
}
135137
}
136138

137-
return query.isRoot ? query.isOpen ? manifest.rootFolderExpanded : manifest.rootFolder : query.isOpen ? manifest.folderExpanded : manifest.folder;
139+
if (query.isRoot) {
140+
return query.isOpen ? (manifest.rootFolderExpanded ?? manifest.rootFolder) : manifest.rootFolder;
141+
}
142+
143+
return query.isOpen ? (manifest.folderExpanded ?? manifest.folder) : manifest.folder;
138144
}
139145

140146
function resolveFileIconId(manifest: Manifest, filename: string): string | undefined {

ssmver.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "0.6.0"
1+
version = "0.6.1"
22

33
[settings]
44
mode = "branch"

0 commit comments

Comments
 (0)