Skip to content

Commit e3e5ca3

Browse files
authored
Lib management improvements (#164)
- Library Management related enhancement - Skip examples in the bundle - Added descriptions to list and search
1 parent fef2bdd commit e3e5ca3

File tree

8 files changed

+142
-114
lines changed

8 files changed

+142
-114
lines changed

docs/index.html

Lines changed: 113 additions & 106 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<title>CircuitPython Online IDE 2</title>
5+
<title>CircuitPython Online IDE</title>
66
<meta
77
name="description"
88
content="A browser-based IDE for CircuitPython supported microcontrollers. No installation needed. Handy and powerful."

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "circuitpython-online-ide",
33
"private": true,
4-
"version": "2.2.2",
4+
"version": "2.2.3",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/components/PagedLibCards.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function PagedLibCards({ libCards = [], itemsPerPage = 20, autoIn
1616
const q = query.trim().toLowerCase();
1717
if (!q) return libCards;
1818
return libCards.filter((card) => {
19-
const fields = [card?.libDisplayName, card?.repoName, card?.abbr];
19+
const fields = [card?.libDisplayName, card?.repoName, card?.abbr, card?.libObj?.pypi_description];
2020
return fields.some((f) =>
2121
String(f || "")
2222
.toLowerCase()

src/docs/About.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## CircuitPython Online IDE
22

3-
Version: 2.2.2
3+
Version: 2.2.3
44

55
[CircuitPython](https://circuitpython.org/) is a version of Python that runs on microcontrollers and single-board computers. Its development is sponsored by [Adafruit](https://www.adafruit.com/).
66

src/docs/Version history.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Version 2.2.3
2+
Released on November 29th, 2025
3+
4+
Significant updates from version 2.2.2 include:
5+
- Library Management related enhancement
6+
- Skip examples in the bundle
7+
- Added descriptions to list and search
8+
19
## Version 2.2.2
210
Released on October 30th, 2025
311

@@ -7,7 +15,6 @@ Significant updates from version 2.2.1 include:
715
- Added CircuitPython upgrade information in the Navigation page.
816
- Re-organized Navigation page
917

10-
1118
## Version 2.2.1
1219
Released on October 30th, 2025
1320

src/utilComponents/LibCardMUI.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ export default function LibCardMUI({
8080
</Tooltip>
8181
</Typography>
8282

83+
{libObj.pypi_description && (
84+
<Typography variant="body2">
85+
<Tooltip title={libObj.pypi_description}>
86+
<Typography variant="span">{libObj.pypi_description}</Typography>
87+
</Tooltip>
88+
</Typography>
89+
)}
90+
8391
<Typography
8492
variant="body2"
8593
sx={{ color: theme.palette.grey[700], display: "flex", alignItems: "left" }}

src/utilHooks/useZipStorage.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,22 +166,25 @@ export function useZipStorage(dbName) {
166166
const zip = await JSZip.loadAsync(buf);
167167
const stripPrefix = computeStripPrefix(zip);
168168

169-
// collect dirs
169+
// collect dirs (only for lib/ paths)
170170
const dirSet = new Set();
171171
for (const [rawPath, zipObj] of Object.entries(zip.files)) {
172172
const orig = rawPath.replace(/\\/g, "/");
173173
if (!orig || orig === stripPrefix) continue;
174174
const stripped = stripPrefix && orig.startsWith(stripPrefix) ? orig.slice(stripPrefix.length) : orig;
175175
if (!stripped) continue;
176176

177+
// Only process paths that start with lib/
178+
if (!stripped.startsWith("lib/")) continue;
179+
177180
if (zipObj.dir) {
178181
const d = stripped.endsWith("/") ? stripped.slice(0, -1) : stripped;
179182
if (d) dirSet.add(d);
180183
} else {
181184
const parts = stripped.split("/");
182185
for (let i = 0; i < parts.length - 1; i++) {
183186
const parent = parts.slice(0, i + 1).join("/");
184-
if (parent) dirSet.add(parent);
187+
if (parent && parent.startsWith("lib/")) dirSet.add(parent);
185188
}
186189
}
187190
}
@@ -195,14 +198,17 @@ export function useZipStorage(dbName) {
195198
});
196199
}
197200

198-
// write files
201+
// write files (only for lib/ paths)
199202
for (const [rawPath, zipObj] of Object.entries(zip.files)) {
200203
if (zipObj.dir) continue;
201204
const orig = rawPath.replace(/\\/g, "/");
202205
if (!orig || orig === stripPrefix) continue;
203206
const stripped = stripPrefix && orig.startsWith(stripPrefix) ? orig.slice(stripPrefix.length) : orig;
204207
if (!stripped) continue;
205208

209+
// Only process paths that start with lib/
210+
if (!stripped.startsWith("lib/")) continue;
211+
206212
await ensureDirsForPath(db, stripped);
207213
const blob = await zipObj.async("blob");
208214
await putEntry(db, {

0 commit comments

Comments
 (0)