Repository navigation
feat(ui-plugins): add Sheet To App (sheet-to-app) - #250
Open
ppppp2005-p wants to merge 10 commits into
Open
ppppp2005-p wants to merge 10 commits into
ppppp2005-p wants to merge 10 commits into
Conversation
Author
|
ZCode desktop demo (ZCode 4.0.0, macOS arm64) sheet-to-app-demo.mp4How this was tested:
演示说明:本地 marketplace 安装 → 正式运行 |
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin type (required) / 插件类型(必填)
Affected plugin name(s) / 涉及的插件名称:
sheet-to-app(UI Plugin, new)What / 改动内容
New community UI plugin Sheet To App / 表格转小应用: an inventory, booking or customer spreadsheet becomes a single-file offline web app with search, filters and validated forms.
Tools:
app_new,app_update,app_refresh,app_check,app_list.app_state,app_sheets.How it works:
.xlsxvia ExcelJS (date cells becomeYYYY-MM-DD, formulas use their cached results), CSV/TSV with GB18030 fallback. Duplicate headers get suffixes.src/schema.ts):Y-M-D/Y/M/D/Y年M月D日, validated), email / phone (header hint or value share), url, longtext (average > 60 chars), select (few distinct short values), text.f<n>for Chinese headers). The first 7 non-longtext fields are listed.src/app.ts; about 20 KB for the 15-row sample): one HTML file with inline CSS and vanilla JS. Config and seed data are embedded as JSON (<escaped).<dialog>form with validation and unique-key checks; highlight rule.app_refresh(load new data / keep mine). zh/en UI..sheet-to-app/apps.json.Panel:
srcdoc, no scripts) of the first 15 rows.Network / API / side effects: none. No API keys. Writes
apps/<id>/index.htmland.sheet-to-app/apps.json; the spreadsheet is never modified. No hooks. The output folder can later be uploaded to a static host such as Cloudflare Pages; that is not part of this PR.Testing:
samples/sheet/make-sheets.mjs): inventory CSV with Chinese headers and planted problems, an updated version (column added and removed, rows added and removed), and a bookings .xlsx with a bad email.file://:app_refreshafter the sheet changes → banner → load new data.A ZCode Desktop demo recording is attached in the comments. / ZCode 桌面版演示录屏见评论。
Self-check / 自查清单
external_plugins/<name>/categoryis set (productivity)version0.1.0 in bothplugin.jsonandmarketplace.jsonREADME.md(EN) andREADME_CN.md(中文) both provided and equivalentdescription_i18nhas bothenandzh-CNpython3 scripts/validate.pyandpython3 scripts/build_dist.pypass locallysheet/库存表.csvinto the offline appkucunand then refresh it from an updated sheet; the agent ranapp_new(4 data problems found) → replaced the CSV →app_refresh(15 → 16 rows, column changes, 1 problem left); a second short task ranapp_checkon the existing app with the panel shown; demo video in the comments)