Skip to content

feat(policies): add default ink color for the draw signature pad - #9550

Open
no84by wants to merge 1 commit into
LibreSign:mainfrom
no84by:feat/default-ink-color
Open

no84by wants to merge 1 commit into
LibreSign:mainfrom
no84by:feat/default-ink-color

Conversation

@no84by

@no84by no84by commented Nov 18, 2026 •

Copy link
Copy Markdown

Part of #9048 (signature appearance).

Summary

Adds a system-only draw_ink_color policy. Its value is exposed as sign-elements.draw-ink-color in the capabilities and used as the initial pen colour of the draw signature pad. The default stays #000000. Signers can still pick another colour in the pad. Invalid values (anything but #rrggbb) are rejected on save.

How to test

In the admin policy workbench, under signer experience, set "Default ink color for drawn signatures". Open the draw signature tab: the pad and the colour swatch start with that colour, and the picker still changes it.

Validation evidence

  • Focused regression/acceptance test (Vitest for the policy card and Editor, PHPUnit for the policy and capabilities)
  • Relevant lint/type/static-analysis checks (ESLint, vue-tsc, translator hints)
  • OpenAPI regenerated with generate-spec and openapi-typescript
  • CI reviewed

UI / Front-end changes

  • New policy card "Default ink color for drawn signatures"
  • Draw pad starts with the configured colour
  • Screenshots before/after added for user-visible changes
  • Component/unit (Vitest) tests added or updated

API / Back-end changes

  • New policy draw_ink_color, capability sign-elements.draw-ink-color
  • Unit tests added or updated
  • Capabilities updated when applicable
  • API documentation regenerated with composer openapi when necessary

Checklist

  • I have read and followed the contribution guide.
  • The diff does not contain unrelated refactors or generated changes.
  • Commits follow Conventional Commits where applicable.
  • All commits include the required DCO sign-off.

AI (if applicable)

  • The content of this PR was partially or fully generated using AI

Add the system-only draw_ink_color policy. Its value is exposed as
draw-ink-color in the sign-elements capabilities and used as the
initial pen color of the draw signature pad. The default stays black
and signers can still pick another color.

Signed-off-by: no84by <50858621+no84by@users.noreply.github.com>
@no84by

no84by commented Nov 18, 2026

Copy link
Copy Markdown
Author

Screenshots (test instance on main 7a8403d vs this branch, light and dark theme):

Policy card "Default ink color"

Before (light) After (light)
before after
Before (dark) After (dark)
before after

Draw pad starts with the configured colour

Before (light) After (light)
before after
Before (dark) After (dark)
before after

Rule dialog with the colour swatch

Before (light) After (light)
(not present on main) after
Before (dark) After (dark)
(not present on main) after

This branch has not been deployed

No deployments
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