Refactor Layout component and improve badge styling and visuals#41
Merged
sumitsahoo merged 5 commits intomainfrom Apr 10, 2026
Merged
Refactor Layout component and improve badge styling and visuals#41sumitsahoo merged 5 commits intomainfrom
sumitsahoo merged 5 commits intomainfrom
Conversation
…ry representation
There was a problem hiding this comment.
Pull request overview
This PR removes the project’s direct dependency on @pdf-lib/fontkit and updates the UI layout header styling so the privacy badge (and related header elements) can adopt category-specific accent colors based on the currently active tool.
Changes:
- Removed
@pdf-lib/fontkitfrom dependencies/lockfile and eliminated fontkit registration calls in PDF operations. - Added category→accent mapping in
App.tsxand passed the computedbadgeAccentintoLayout. - Updated
Layoutto apply the provided accent classes (and optional logo filter) to the privacy badge, logo, and GitHub link.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/pdf-operations.ts | Removes fontkit import/registration; continues using standard fonts only. |
| src/components/Layout.tsx | Accepts badgeAccent and applies dynamic accent styling to header elements. |
| src/App.tsx | Computes badgeAccent from the active tool’s category and passes it into Layout. |
| README.md | Removes Fontkit from the documented tech stack. |
| package.json | Drops @pdf-lib/fontkit dependency. |
| pnpm-lock.yaml | Removes @pdf-lib/fontkit entries from lockfile. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
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.
This pull request removes the dependency on
@pdf-lib/fontkitfrom the project and updates the UI to dynamically color certain elements based on the active tool's category. The most significant changes are grouped below:Dependency removal and code cleanup:
@pdf-lib/fontkitfrompackage.jsonand cleaned up all related references inpnpm-lock.yaml, as well as imports and usage insrc/utils/pdf-operations.ts. The PDF operations now rely solely on standard fonts, removing the need for custom fontkit registration. [1] [2] [3] [4] [5] [6] [7]README.mdto remove mention of fontkit in the "Font Support" section.UI enhancements:
src/App.tsxto compute abadgeAccentobject based on the active tool's category, mapping to specific background, border, text colors, and optional logo filter. This is passed to theLayoutcomponent.Layoutcomponent (src/components/Layout.tsx) to accept and use the newbadgeAccentprop, applying the accent colors and logo filter to the privacy badge, logo, and GitHub link for a more dynamic and visually cohesive UI. [1] [2] [3] [4]