Skip to content

Feat/checkbox [DO NOT MERGE]#552

Open
johnfercher wants to merge 2 commits intomasterfrom
feat/checkbox
Open

Feat/checkbox [DO NOT MERGE]#552
johnfercher wants to merge 2 commits intomasterfrom
feat/checkbox

Conversation

@johnfercher
Copy link
Copy Markdown
Owner

@johnfercher johnfercher commented Mar 15, 2026

Description

Captura de Tela 2026-03-14 às 22 12 50

Related Issue

Checklist

check with "x", ONLY IF APPLIED to your change

  • All methods associated with structs has func (<first letter of struct> *struct) method() {} name style.
  • Wrote unit tests for new/changed features.
  • Followed the unit test when,should naming pattern.
  • All mocks created with m := mocks.NewConstructor(t).
  • All mocks using m.EXPECT().MethodName() method to mock methods.
  • Updated docs/doc.go and docs/*
  • Updated example_test.go.
  • Updated README.md
  • New public methods/structs/interfaces has comments upside them explaining they responsibilities
  • Executed make dod with none issues pointed out by golangci-lint

vamshi1188 and others added 2 commits March 14, 2026 21:56
Introduces a new Checkbox component rendered using shapes instead of
Unicode characters or PDF form fields.

- Adds checkbox component and props
- Implements rendering in gofpdf provider
- Includes unit tests, examples, and golden tests
- Addresses issue #488

This component is visual-only by design and aligns with Maroto v2 layout philosophy.
@johnfercher
Copy link
Copy Markdown
Owner Author

Hey @vamshi1188, unfortunately the checkbox feature is not working properly with the grid system.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 61.83206% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.68%. Comparing base (a961168) to head (a61313c).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
internal/providers/gofpdf/checkbox.go 10.42% 43 Missing ⚠️
pkg/props/checkbox.go 91.90% 1 Missing and 2 partials ⚠️
internal/providers/gofpdf/provider.go 33.34% 2 Missing ⚠️
pkg/components/checkbox/checkbox.go 95.13% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   88.06%   86.68%   -1.37%     
==========================================
  Files          61       64       +3     
  Lines        2360     2491     +131     
==========================================
+ Hits         2078     2159      +81     
- Misses        246      293      +47     
- Partials       36       39       +3     
Flag Coverage Δ
unittests 86.68% <61.84%> (-1.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johnfercher
Copy link
Copy Markdown
Owner Author

I did part of it yesterday, can you add that checkmark that you added in your version? I guess you only have to change this part: https://github.com/johnfercher/maroto/blob/master/internal/providers/gofpdf/checkbox.go

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.

2 participants