Repository navigation
[migrate] Upgrade Bootstrap 6 ecosystem #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TechQuery
wants to merge
3
commits into
main
Choose a base branch
from
upgrade-bootstrap-6-fontawesome-7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,214
−5,225
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # 项目编程规范 | ||
|
|
||
| ## 理解需求 | ||
|
|
||
| - 实现前先阅读 Issue 及其示例。遵循指定的 API、数据模型和导出类型;先核实已安装依赖的实际接口,必要时升级依赖,不要擅自替换成无关 API。 | ||
| - 在整个仓库中搜索相关用法,并一致地落实适用改动。保留现有行为、功能和源码链接;删除空文件、未使用代码、调试输出,以及没有实际效果的配置改动。 | ||
|
|
||
| ## 数据与错误处理 | ||
|
|
||
| - 将可复用的数据发现、排序和分页逻辑放入共享工具函数。保持工具通用,不要把特定内容目录或页面硬编码进去。 | ||
| - 构建时页面应使用框架提供的静态生成 API。缺少必需内容、生成路径无效及其他构建错误都应明确暴露;仅在应用可以恢复时捕获错误,避免静默回退或空的 `catch` 块。 | ||
| - 使用类型安全检查和可选链明确处理可选数据。只有在缺失数据属于预期情况时,才显示有意义的占位内容。 | ||
|
|
||
| ## React、TypeScript 与内容 | ||
|
|
||
| - 使用依赖实际导出的类型和 API。为组件声明明确的属性类型,对象属性应使用解构;不要重复导出依赖本身的类型。 | ||
| - 保持组件职责清晰且可复用:将重复 UI 提取为符合领域职责的组件,由父组件决定布局;渲染 MobX 可观察状态的组件应使用 `@observer` 装饰器。 | ||
| - 列表项应使用稳定且唯一的业务标识作为 `key`;对于可能变化或重排的集合,不要使用数组索引。 | ||
| - 使用语义化且易访问的 HTML:集合使用列表,名称与对应值使用描述列表,日期使用带 `dateTime` 属性的 `<time>`。 | ||
| - 所有面向用户的文本都必须接入 i18n,并为全部受支持语言添加对应翻译:`en-US`、`zh-CN` 和 `zh-TW`。 | ||
|
|
||
| ## 样式与依赖 | ||
|
|
||
| - 优先复用现有 Idea-React 组件、Bootstrap 工具类、响应式断点、共享样式和项目资源,避免重复实现或编写不必要的自定义 CSS。页面专用样式应保持局部,全局样式只用于真正全局的规则。 | ||
| - 修改全局样式或主题变量时,检查所有受影响的用法,避免重复规则,并确保框架组件变体及链接文字对比度正常。优先复用已有 Markdown 样式,不要重新实现。 | ||
| - 添加或替换共享工具前,优先选择成熟的项目依赖,并核实其维护成熟度、导出 API 和运行时行为。避免重复依赖或重复引入已由全局提供的资源。 | ||
| - 项目命令应兼容 NPM,开发时优先使用 PNPM。不要提交 `package-lock.json`、`yarn.lock`;项目锁文件为 `pnpm-lock.yaml`。 | ||
|
|
||
| ## 可靠性与隐私 | ||
|
|
||
| - 合并前清理临时 `console` 调试输出。不要用看似成功的回退逻辑掩盖失败。 | ||
| - 如果遥测或会话回放会采集 URL,必须在所有采集入口(包括回放数据)中一并脱敏敏感查询参数。 | ||
|
|
||
| ## 验证 | ||
|
|
||
| - 改动后运行相关检查:使用 `npm test` 执行 lint 和 TypeScript 校验;涉及应用行为、静态生成或生产打包时,运行 `pnpm build`。 | ||
| - 修改 UI 或全局样式后,检查实际渲染结果,包括共享组件变体和响应式布局。 |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 25384
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 6340
Web query:
mobx-restful-table 3.0.0-rc.0 SearchableInput onChange implementation githubResult:
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 6448
Script executed:
curl -L --max-time 20 -fsS https://unpkg.com/mobx-restful-table@3.0.0-rc.0/source/SearchableInput.tsx | nl -baRepository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 7177
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 275
Script executed:
curl -L --max-time 20 -fsS https://unpkg.com/mobx-react-helper@0.5.4/src/FormComponent.ts | nl -baRepository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 2902
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 4714
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 426
Script executed:
Repository: FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io
Length of output: 2362
Restore the eager
markedimport.If the
markedchunk fails to load after the file download, the editor retains metadata but shows no content. The rejection can also trigger a global alert. Restore the eager import so opening the file does not require another chunk request.