Repository navigation
feat(user-guide): 随包使用教程与首次新手引导 - #252
Merged
Merged
Conversation
新增 dsh-plugins/user-guide(@eduwork/dsh-user-guide),在 /eduwork-user-guide/ 提供离线教程,ECNU#233 的「应用 → 使用教程」菜单随之出现。首次进入工作台(输入框已出现、没有其他模态窗口)时播放一次 8 步引导,看完或跳过记入 volatile 的 tourSeen。产品名、是否自动播放与步骤可由发行版配置覆盖。账户菜单入口仅在发行版提供 accountMenuEntries 时注册。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
feat(user-guide): 随包使用教程与首次新手引导
背景
#233 在「应用」菜单加了「使用教程」入口,但只在宿主提供
/eduwork-user-guide/路由时显示,公版目前没有提供这个路由的插件。本 PR 补上这个插件,并加入首次启动的新手引导。改动
新增
dsh-plugins/user-guide(@eduwork/dsh-user-guide,条目 ideduwork-user-guide),加入config/distributions/generic.json与config/assembly.eduwork.json,测试接入validate-local-web。/eduwork-user-guide/只读提供guide/下的静态页(公版教程,内容取自docs/USER_GUIDE.md,无截图)。页面不运行脚本、不加载网络资源;路径限定在guide/内,拒绝..、隐藏文件与未知类型,带nosniff和default-src 'none'CSP。在应用内面板打开,跟随应用深浅色。brand-settings-native写入ui-onboarding的上游欢迎说明关闭后再开始。看完或跳过都会写入 volatile 的tourSeen,在教程面板里可以重新播放。目标按无障碍标签和按钮文字查找,找不到目标时卡片居中显示,引导不会卡住。productName(面板标题与文案中的{product})、autoStart、steps(按顺序替换内置步骤;沿用内置 id 时只覆盖给出的字段,新步骤用 CSSselector指定目标)。accountMenuEntries服务时才注册入口,公版不依赖它。测试
node --test dsh-plugins/user-guide/test/*.test.mjs:18 项通过,覆盖路径穿越、响应头、tour.json、卡片定位、步骤覆盖、首次播放的各项条件(未加载、已看过、关闭自动播放、无输入框、有模态窗口)、Esc 与卸载。tests/eduwork-assembly-policy、distribution-config-patches、configuration-documentation、eduwork-source-audit、user-guide-menu均通过。audit-eduwork-distribution --edition generic --verify-receipt:errors: [];source-receipt.json已刷新,createdAt未变。在本分支装配的 macOS 测试包上走过一遍:新手引导在首次进入工作台时播放,各步挖亮位置正确;「应用 → 使用教程」能打开教程面板。
🤖 Generated with Claude Code