Uh oh!
There was an error while loading. Please reload this page.
feat(grid,list,core,i18n): 导出文件名本地化 + 导入模板中文化修复 - #2491
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
baozhoutao
commented
Jul 14, 2026
ContributorAuthor
新增:导出文件名带上当前视图名(842a766)格式: 真机 UI 实测(console :5180 + showcase 后端 :3000,hook
规则:
实现: 测试:export-filename 15/15、plugin-list 149、plugin-grid 194、plugin-view 28、app-shell views 90 文件/698 用例全过。UI 截图(In Progress 网格 + 导出弹层)已在开发会话留存。 |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
5 tasks
…te i18n fixes
- core: new buildExportFileName(ext, {prefix,label,objectName}, now?) and
sanitizeFileNameBase(raw) — '<display label>-<yyyymmdd-hhmmss>.<ext>',
exportOptions.fileNamePrefix still wins.
- plugin-grid ObjectGrid + plugin-list ListView: all export paths (server
streamed and client fallback) name downloads through buildExportFileName.
- plugin-grid ImportWizard: template example row prefers the option display
label over the ASCII slug (server import coercion accepts both); template
filename localized via new i18n key grid.import.templateFileName
(zh: '{{object}}-导入模板', en fallback '{{object}}-import-template').
- i18n: add zh translation for grid.import.templateFileName.Exports from different saved views of the same object used to download with identical names (任务-20260714-153045.csv). The filename now reads <object label>-<view label>-<timestamp>.<ext>, e.g. 任务-In Progress-20260714-153045.csv. - buildExportFileName gains ExportFileNameParts.viewLabel: appended after the object base, skipped when it duplicates the base (case-insensitive) or when an explicit fileNamePrefix is configured, combined base capped at 80 chars - ObjectGrid + ListView pass schema.label/title as viewLabel - app-shell ObjectView stamps viewDef.label onto the ListView schema (it never propagated before); plugin-view ObjectView does the same on its renderListView path
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 freeto 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.
背景
用户反馈:
contracts.csv这种裸对象名,希望优化为「对象显示名-时间戳」(如任务-20260714-153045.xlsx)。prepare/active),模板文件名也是英文。服务端配套 PR:framework#2911(Content-Disposition 本地化 + 系统字段标签内置回退,"Owner"→「所有者」在那边修)。
变更
@object-ui/corebuildExportFileName(ext, { prefix, label, objectName }, now?)与sanitizeFileNameBase(raw):生成「显示名-yyyymmdd-hhmmss.扩展名」;exportOptions.fileNamePrefix配置仍优先;非法文件名字符清洗但保留 Unicode(中文不丢)。@object-ui/plugin-grid/@object-ui/plugin-listbuildExportFileName,浏览器落盘名从contracts.csv变为合同-20260714-153045.csv。导入模板(ImportWizard)
准备中)而非 slug(prepare);服务端导入 coercion 对 label/value 都接受,回填不受影响。grid.import.templateFileName(zh{{object}}-导入模板,en 回退{{object}}-import-template),经sanitizeFileNameBase清洗。测试
FormulaFunctionsDATEFORMAT 时区环境性失败,与本 PR 无关(diff 未触及)。a.download捕获真实落盘名):任务-20260714-064550.csv;导出 XLSX →任务-20260714-064607.xlsx。任务-导入模板.csv;模板内容表头「所有者,标题 *,项目 *,…,创建时间,…」,示例行 select 值为显示标签(Backlog/Low)而非 slug。追加(842a766):导出文件名带上当前视图名
用户第三轮诉求「文件名称中能加上视图名称么」——同一对象不同保存视图的导出此前完全同名。
<对象显示名>-<视图名>-<时间戳>.<扩展名>,如任务-In Progress-20260714-082725.csv。buildExportFileName新增viewLabel:fileNamePrefix配置后不追加视图名;视图名与对象名重复(大小写不敏感)时省略;组合 base 截断 80 字符。viewDef.label写进传给 ListView 的 schema,现已传递(顺带让 overlay 详情标题显示视图名)。关联 issue:objectstack-ai/objectstack#2916(服务端 PR framework#2911 合并即关闭)