Skip to content

Add common layout components for PDF#3782

Merged
andreia-ferreira merged 9 commits into
masterfrom
andreia/3739/layout
Jun 11, 2026
Merged

Add common layout components for PDF#3782
andreia-ferreira merged 9 commits into
masterfrom
andreia/3739/layout

Conversation

@andreia-ferreira

Copy link
Copy Markdown
Collaborator

Towards #3715

(Split from #3774)
This PR focuses on adding the building blocks for the PDF document: PageHeaderLayout (to display the survey name, job and date+time at the top), PageFooterLayout (to display the data collector information and the page number at the bottom), QrBlockLayout (to display the QR code embedding the geometry), TableLayout (with all the submission data) and their unit tests.

It also adds the following helpers:

  • PdfConfig for dimensions and margins
  • PdfGeometry for utilities and classes which handle calculations and measurements

@shobhitagarwal1612 PTAL?

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.60%. Comparing base (b825349) to head (0c7574d).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3782      +/-   ##
============================================
+ Coverage     66.31%   66.60%   +0.28%     
- Complexity     1660     1684      +24     
============================================
  Files           387      392       +5     
  Lines         10059    10145      +86     
  Branches       1290     1295       +5     
============================================
+ Hits           6671     6757      +86     
  Misses         2711     2711              
  Partials        677      677              
Files with missing lines Coverage Δ
...g/groundplatform/feature/pdf/render/PdfGeometry.kt 100.00% <100.00%> (ø)
...form/feature/pdf/render/layout/PageFooterLayout.kt 100.00% <100.00%> (ø)
...form/feature/pdf/render/layout/PageHeaderLayout.kt 100.00% <100.00%> (ø)
...latform/feature/pdf/render/layout/QrBlockLayout.kt 100.00% <100.00%> (ø)
...dplatform/feature/pdf/render/layout/TableLayout.kt 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shobhitagarwal1612 shobhitagarwal1612 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the package structure, right now PageHeaderLayout, TableLayout, etc live in components package. Since components usually implies actual UI rendering code (like @Composable functions), and these classes are purely math models, would it make more sense to move these classes one level up (or maybe org.groundplatform.feature.pdf.render.layout or model)?

@andreia-ferreira

Copy link
Copy Markdown
Collaborator Author

@shobhitagarwal1612 thanks for the review 🙏 I have applied the suggestions, including renaming the layout components package, it is now org.groundplatform.feature.pdf.render.layout. Ready for another look!

@shobhitagarwal1612 shobhitagarwal1612 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@andreia-ferreira andreia-ferreira merged commit c167392 into master Jun 11, 2026
18 checks passed
@andreia-ferreira andreia-ferreira deleted the andreia/3739/layout branch June 11, 2026 14:13
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