Skip to content

Improve Script Editor resource browsing and previews (UI/UX improvement) - #1758

Open
cyfung1031 wants to merge 1 commit into
scriptscat:mainfrom
cyfung1031:codex/improve-script-editor-resources
Open

cyfung1031 wants to merge 1 commit into
scriptscat:mainfrom
cyfung1031:codex/improve-script-editor-resources

Conversation

@cyfung1031

@cyfung1031 cyfung1031 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Checklist / 检查清单

  • Fixes mentioned issues / 修复已提及的问题
  • Code reviewed by human / 代码通过人工检查
  • Changes tested / 已完成测试

N/A — No issue was supplied for this change.

Description / 描述

  • Clarifies resource identity: @resource keeps its declared name; @require and @require-css show a basename derived from the source URL, with the full URL visible and searchable.
  • Adds a lazy View dialog that reads only ScriptCat’s cached resource chunk. Text stays inert, raster previews use a cleaned-up object URL, and automatic preview is capped at 1 MiB; Download remains available for large and unsupported content.
  • Preserves the Resources/DataPanel layout and adds an accessible View action with mobile-sized hit targets. New labels are present in all ten locales.

Screenshots / 截图

resources-pr-contact-sheet

Validation

  • Focused Vitest suites: 35 tests passed.
  • pnpm run typecheck, pnpm run check:i18n, and pnpm run lint passed.
  • pnpm run build completed with the existing bundle-size and Monaco dynamic-require warnings.
  • Browser verification covered resource identity/search, cached text preview, inert HTML/SVG, large and unsupported states, raster image preview, mobile layout, and a completed download. The captured console also contains setup-time 404s before the throwaway profile’s favicon service was disabled and a router warning after direct hash navigation; the headed download session’s console was not captured.
  • pnpm run test:e2e was not run as explicitly requested.

@cyfung1031 cyfung1031 changed the title Improve Script Editor resource browsing and previews Improve Script Editor resource browsing and previews (UI/UX improvement) Sep 21, 2026
@cyfung1031

cyfung1031 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-09-21 at 17 24 09 Screenshot 2026-09-21 at 17 24 41 Screenshot 2026-09-21 at 17 26 38 Screenshot 2026-09-21 at 17 26 27

感覺不錯。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant