Repository navigation
Conversation
Fixes OpenSignLabs#2264 Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
|
@alfonsodg is attempting to deploy a commit to the prafull 's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🟡 Changes recommended
Tailwind tokens still duplicate font definitions instead of consuming shared data, leaving the single-source-of-truth requirement unmet.
1 open issue
What changed in this PR
This PR introduces a shared font registry for OpenSign’s widget UI and typed-signature rendering, and adds matching Tailwind font tokens.
Changes:
- Replaces hardcoded UI fonts across six widget components with
UI_FONT. - Centralizes signature choices and defaults used by the modal, Redux state, and rendering utilities.
- Adds Tailwind
font-uiandfont-signaturetokens.
| File | Description |
|---|---|
apps/OpenSign/tailwind.config.js |
Adds UI and signature font tokens. |
apps/OpenSign/src/redux/reducers/widgetSlice.js |
Uses the shared signature default in initial state. |
apps/OpenSign/src/constant/Utils.js |
Uses the shared default for signature rendering and saving. |
apps/OpenSign/src/constant/fonts.js |
Defines UI, signature, and document font constants. |
apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx |
Uses shared font choices and defaults. |
apps/OpenSign/src/components/pdf/PrefillWidgetsModal.jsx |
Uses the shared UI font for date input. |
apps/OpenSign/src/components/pdf/PlaceholderType.jsx |
Uses the shared UI font for widget styles. |
apps/OpenSign/src/components/pdf/Placeholder.jsx |
Uses the shared UI font for placeholders. |
apps/OpenSign/src/components/pdf/CellsWidget.jsx |
Uses the shared UI font for cells. |
apps/OpenSign/src/components/bulksend/components/RenderWidgets.jsx |
Uses the shared UI font for bulk-send date input. |
Review effort: Balanced
Comment on lines
+7
to
+8
| ui: ["Arial", "sans-serif"], | ||
| signature: ["Fasthand", "cursive"], |
4 tasks
This branch has not been deployed
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.

Problem
Fonts were hardcoded in six different components, and the typed-signature font
list was duplicated between the modal and the canvas rendering, so the
preview and the final document could use different fonts.
Affected files
apps/OpenSign/src/constant/fonts.jsapps/OpenSign/tailwind.config.jsapps/OpenSign/src/components/pdf/Placeholder.jsxapps/OpenSign/src/components/pdf/PlaceholderType.jsxapps/OpenSign/src/components/pdf/CellsWidget.jsxapps/OpenSign/src/components/pdf/PrefillWidgetsModal.jsxapps/OpenSign/src/components/pdf/WidgetsValueModal.jsxapps/OpenSign/src/components/bulksend/components/RenderWidgets.jsxFix
A single font registry holds the UI font, the signature font list and the
default signature font, and the Tailwind theme exposes the matching font
tokens.
Acceptance criteria