Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows overwriting default line columns #188

Merged
merged 6 commits into from
Oct 21, 2019
Merged

Allows overwriting default line columns #188

merged 6 commits into from
Oct 21, 2019

Conversation

inoda
Copy link
Contributor

@inoda inoda commented Oct 18, 2019

This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Oct 18, 2019

CLA assistant check
All committers have signed the CLA.

@inoda
Copy link
Contributor Author

inoda commented Oct 18, 2019

This addresses an issue I opened: #187

Example usage:

	cell1 := pdfInvoice.NewColumn("Description")
	cell2 := pdfInvoice.NewColumn("Amount")
	cell2.Alignment = creator.CellHorizontalAlignmentRight
	pdf.SetColumns([]*creator.InvoiceCell{cell1, cell2})

@gunnsth gunnsth requested a review from adrg October 21, 2019 00:04
@gunnsth gunnsth changed the base branch from master to development October 21, 2019 00:05
Copy link
Collaborator

@adrg adrg left a comment

Choose a reason for hiding this comment

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

Looks good to me. This method should ideally be used before adding any lines to the table. Otherwise, it could produce unwanted results (if the number of columns does not match the number of cells in a line). However, it's the responsibility of the user, so I think it's ok. It's very easy to construct a slice of columns by using the NewColumn method of the invoice.

@inoda
Copy link
Contributor Author

inoda commented Oct 21, 2019

@adrg @gunnsth I updated the code comment to reflect that potential issue! How long before this is merged and usable? (we are blocked by this)

@codecov
Copy link

codecov bot commented Oct 21, 2019

Codecov Report

Merging #188 into development will decrease coverage by 5.49%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff               @@
##           development     #188     +/-   ##
==============================================
- Coverage        57.57%   52.07%   -5.5%     
==============================================
  Files              189      189             
  Lines            34460    34462      +2     
==============================================
- Hits             19839    17945   -1894     
- Misses           12073    14177   +2104     
+ Partials          2548     2340    -208
Impacted Files Coverage Δ
creator/invoice.go 88.43% <0%> (-0.43%) ⬇️
internal/e2etest/memory_measure.go 0% <0%> (-100%) ⬇️
internal/e2etest/validate.go 0% <0%> (-70%) ⬇️
model/flatten.go 0% <0%> (-64.23%) ⬇️
internal/e2etest/utils.go 0% <0%> (-60%) ⬇️
annotator/field_appearance.go 10.87% <0%> (-39.75%) ⬇️
contentstream/processor.go 17.07% <0%> (-34.46%) ⬇️
extractor/text.go 40.54% <0%> (-24.95%) ⬇️
model/colorspace.go 10.92% <0%> (-17.07%) ⬇️
model/functions.go 18.76% <0%> (-16.78%) ⬇️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eef3b8f...ae15375. Read the comment docs.

@gunnsth gunnsth merged commit ddbb567 into unidoc:development Oct 21, 2019
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.

5 participants