Document the current signature appearance and preview pipeline
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #114 来自 @thaibao-byte —— 已关闭,未合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- php, python, typescript
调研方向
Create developer_manual/architecture/signature-appearance.rst and update developer_manual/architecture.rst to link to it. Start by tracing the listed policy, preview, signing-handler, service, and test files; use implementation and tests to verify each documented claim, especially current variables, render modes, and renderer differences. Build and review the Sphinx manual, check cross-references, and include rendered-page screenshots in the PR description.
由索引模型根据 Issue 内容生成。
描述
Goal
Document the current LibreSign signature appearance, footer/template, preview and PDF rendering pipeline so contributors can understand the existing behavior before the future reusable appearance contract is defined.
This issue documents behavior that already exists.
Do not design the future template format, fix Unicode rendering, change the editor, or add AI-assisted authoring.
This documentation will be used as factual input by LibreSign/libresign#9061.
Why this is a good first issue
The current behavior is already implemented and covered by code/tests.
The contributor does not need to decide:
- what the future template language should be;
- whether LibreSign should use Twig, HTML, JSON/AST or another representation;
- how #8155 should be fixed;
- how AI generation should work;
- how the editor should be redesigned.
The task is to trace the existing data flow and document it accurately using the sources listed below.
If a behavior cannot be confirmed, do not guess. Comment on this issue with the unresolved point.
Documentation destination
Create:
developer_manual/architecture/signature-appearance.rst
Do not move or rename:
developer_manual/architecture.rst
Update developer_manual/architecture.rst so its "Where to go next" section links to the new page.
Update the developer manual toctree only as needed so Sphinx includes the page.
Do not reorganize unrelated documentation.
Sources to inspect
Policy/editor configuration
Inspect the existing signature footer/appearance settings, including at least:
src/views/Settings/PolicyWorkbench/settings/signature-footer/model.tssrc/views/Settings/PolicyWorkbench/settings/signature-footer/realDefinition.tssrc/views/Settings/PolicyWorkbench/settings/signature-footer/SignatureFooterRuleEditor.vue- related policy definitions/providers under
lib/Service/Policy/Provider/
Document only currently supported settings and behavior.
Preview path
Inspect at least:
lib/Controller/SignatureStampPreviewController.phplib/Service/SignatureStampPreview/SignatureStampPreviewNativeService.php- related classes under
lib/Service/SignatureStampPreview/
Trace:
- where preview input comes from;
- how values/placeholders are resolved;
- how appearance data is built;
- what preview output represents.
Final signing/rendering path
Inspect at least:
lib/Handler/SignEngine/PhpNativeHandler.phplib/Handler/SignEngine/Pkcs12Handler.php- any appearance/XObject DTO/builder classes used by the native path.
Document the responsibility boundary between LibreSign and the signing library.
Do not document private library behavior that LibreSign does not rely on.
Current variables/elements
Inspect:
lib/Service/SignerElementsService.php- signature-text/template services used by the current appearance path;
- relevant policy/model definitions.
Create a verified inventory of current variables/placeholders or render elements that are actually supported.
Do not invent aliases or planned variables.
Tests
Use current tests as behavioral evidence.
Inspect at least:
tests/php/Unit/Service/SignatureStampPreviewNativeServiceTest.phptests/php/Unit/Controller/SignatureStampPreviewControllerTest.phptests/php/Unit/Handler/SignEngine/PhpNativeHandlerTest.php- relevant frontend/Playwright tests for signature footer/template editing.
Use tests to confirm edge cases and renderer behavior.
Known limitation
Read #8155.
Document it only as a current known limitation where relevant.
Do not propose or implement the fix in this documentation task.
Required page structure
The new page must use this structure.
1. What a signature appearance is
Explain the distinction between:
- the cryptographic/digital signature;
- the optional visible appearance rendered in the PDF.
Do not imply that a visible appearance is required for signature validity.
Cross-reference existing documentation if this distinction is already explained elsewhere.
2. Current configuration sources
Document where current appearance/footer settings come from.
Explain the role of Policy Workbench and any user/request-specific inputs that actually exist.
Do not describe planned configuration.
3. Current data flow
Provide a concise flow diagram or ordered list covering the current path from configuration/input to preview/final rendering.
The diagram must be based on verified code.
For example, identify boundaries such as:
policy/configuration -> appearance values -> preview/render builder -> signing handler -> PDF appearance
Do not use this example literally if the code shows a different boundary.
4. Preview pipeline
Explain:
- preview controller/service responsibility;
- how sample/preview signer/document data is used;
- what preview is intended to represent;
- important differences between preview and final signing, if verified.
5. Final PDF rendering
Explain:
- where final appearance rendering is triggered;
- the responsibility of
PhpNativeHandler; - how appearance/XObject data reaches the signing engine;
- renderer-specific behavior that LibreSign currently depends on.
6. Current variables and render modes
Provide a verified table containing, where applicable:
- variable/element name;
- meaning;
- source value;
- where it is consumed;
- relevant limitation.
Also document current render modes exposed by SignerElementsService or equivalent source.
Do not list anything that cannot be confirmed in code/tests.
7. Validation and escaping
Document current validation/escaping/sanitization behavior that is explicitly implemented.
If the current implementation has no generic sanitizer for a particular input, say only what can be verified; do not claim a stronger security guarantee.
8. Unicode and font limitations
Document #8155 as a current limitation of the relevant native rendering path.
State observed/current behavior and scope.
Do not choose a future font/encoding strategy.
9. Renderer differences
Document only differences between supported signing/rendering paths that are relevant to visible appearance behavior and are confirmed by code/tests.
Do not attempt to make engines identical in this issue.
10. Testing map
Explain which existing tests cover:
- template/policy model;
- preview behavior;
- final native rendering;
- relevant browser/editor behavior.
Point to representative test files.
11. Related architecture
Cross-reference:
- the main developer architecture page;
- testing documentation;
- relevant PDF/signing documentation if it already exists.
Do not duplicate those pages.
Writing requirements
Write for a developer who understands PHP/TypeScript/PDF concepts but has not traced LibreSign's appearance pipeline before.
Use these rules:
- explain product/domain concepts before class names;
- describe current behavior in present tense;
- distinguish visible appearance from digital-signature validity;
- do not narrate the research process;
- do not describe #9061's future contract as implemented;
- do not recommend a future template language;
- keep code excerpts very small and only when they clarify a public/internal contract;
- every technical claim must be traceable to current code/tests;
- use cross-references instead of repeating general signing/PDF concepts;
- use synthetic example values only.
Evidence rule
Before documenting a behavior, confirm it through current implementation, tests or repository guidance.
If two render paths behave differently:
- document the difference if verified and relevant;
- do not "normalize" the description;
- do not modify production behavior;
- comment on this issue if it is unclear whether the difference is intentional.
Screenshots
Because this PR changes rendered documentation, the pull request must include screenshots of the rendered page. Repository-wide contribution guidance for this rule is tracked by #46; this issue's screenshot requirement applies even if #46 is still open.
For this page:
- include at least one screenshot showing the new page title and current-pipeline overview;
- include focused screenshots for tables/diagrams if they are not readable in the first image;
- screenshots are PR review evidence and do not need to be committed into the manual unless an image is itself required by the documentation.
Do not include personal/customer data.
Out of scope
Do not:
- modify LibreSign application code;
- fix #8155;
- add or remove template variables;
- change render modes;
- redesign Policy Workbench;
- choose a future template grammar;
- change preview behavior;
- change PDF/XObject rendering;
- implement AI-assisted authoring;
- restructure unrelated documentation.
Validation
Before opening the PR:
- build the developer manual using the repository's documented build flow;
- verify the new page is reachable from the developer architecture documentation;
- verify Sphinx cross-references resolve;
- verify every named source path/class exists;
- compare the page against current tests to ensure it does not overstate behavior;
- review the rendered page;
- include required screenshots in the PR description.
Done when
-
developer_manual/architecture/signature-appearance.rstexists. - The main architecture page links to it.
- The visible-appearance concept and current configuration sources are documented.
- The preview and final rendering pipelines are documented.
- Current variables/elements and render modes are inventoried from code.
- Current validation/escaping behavior is documented without overclaiming.
- #8155 is documented as a current limitation, not solved here.
- Representative tests are mapped to the documented behavior.
- Sphinx build/checks pass.
- The PR includes screenshots of the rendered documentation.
- 主要语言
- Python
- 星标
- 3
- 派生
- 6
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 10
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LibreSign/documentation 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
LibreSign/documentation#104 · 1 条评论 ·
维护者通常 1 天内回复
-
good first issue
难度 3/5 1-2 天 新手友好度 55/100
LibreSign/documentation#115 ·
维护者通常 1 天内回复
-
good first issue
难度 4/5 3-5 天 新手友好度 56/100
LibreSign/documentation#112 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
LibreSign/documentation#111 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 30/100
LibreSign/documentation#67 ·
维护者通常 1 天内回复
查看 LibreSign/documentation 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
aws-samples/sample-per-model-bedrock#243 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
FuRongJun-1999/dsh-memory#404 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 68/100
PennyLaneAI/catalyst#3337 ·
维护者通常 1 天内回复
-
Workflow.schedule stops when a cron deadline passes before sleep可能已有人在做 @HuaTNA 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复