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

Maroto V2 - Thread #257

Closed
johnfercher opened this issue Sep 13, 2023 · 12 comments
Closed

Maroto V2 - Thread #257

johnfercher opened this issue Sep 13, 2023 · 12 comments
Assignees

Comments

@johnfercher
Copy link
Owner

johnfercher commented Sep 13, 2023

Hello, I'm creating this issue to address discussions about the Maroto V2 project.

Site: https://maroto.io/
Main Branch: v2
Roadmap: https://github.com/users/johnfercher/projects/1

@johnfercher johnfercher changed the title Maroto V2 - Open Discussion Maroto V2 - Thread Sep 13, 2023
@johnfercher johnfercher linked a pull request Sep 13, 2023 that will close this issue
@johnfercher johnfercher removed a link to a pull request Sep 13, 2023
@johnfercher johnfercher linked a pull request Sep 16, 2023 that will close this issue
@midhunmohan
Copy link

Set Password for document is in the backlog ?

@johnfercher
Copy link
Owner Author

Added @midhunmohan set metadata methods

@johnfercher
Copy link
Owner Author

@midhunmohan is was added the password. https://maroto.io/#/v2/features/protection?id=protection

@midhunmohan
Copy link

when using BreakLineStrategy, will there be any option for auto height to the row ? something like dynamically adjusted

row.New(4).Add( text.NewCol(2, longText, props.Text{Size: 6, Align: align.Center, BreakLineStrategy: breakline.DashStrategy}).WithStyle(colStyle), )

@johnfercher
Copy link
Owner Author

johnfercher commented Oct 9, 2023

I tried implement this and we have another try in this pr #302. But it is not that simple. I'm consider to create a function like GetTextHeight("text") that the users can pass into height value.

@colearendt
Copy link

colearendt commented Nov 26, 2023

Are background color and TableList present in v2 yet? I am having a hard time finding them 😮

It looks like this approach might work, but still struggling to see how to set the background color for a cell

m.AddRows(text.NewRow(10, fmt.Sprintf("Table with %d Columns", gridSum), props.Text{Style: fontstyle.Bold}))
var headers []core.Col
var contents []core.Col
for i := 0; i < gridSum; i++ {
headers = append(headers, text.NewCol(1, fmt.Sprintf("H %d", i), props.Text{Style: fontstyle.Bold, Top: 1.5, Left: 1.5}))
contents = append(contents, text.NewCol(1, fmt.Sprintf("C %d", i), props.Text{Top: 1, Left: 1.5, Size: 9}))
}
m.AddRow(8, headers...)
m.AddRow(8, contents...)

@johnfercher
Copy link
Owner Author

johnfercher commented Nov 26, 2023

@colearendt, the v2 uses a new approach to do this, you can see in this link: https://maroto.io/#/v2/features/list?id=list

@pka420
Copy link

pka420 commented Nov 26, 2023

Hey guys, just noticed there is no docs on the official go website:

https://pkg.go.dev/

I have no idea how to get something published there, but I really like this library and would like to have some docs for each function and type.

Thanks!

@colearendt
Copy link

colearendt commented Nov 27, 2023

@colearendt, the v2 uses a new approach to do this, you can see in this link: https://maroto.io/#/v2/features/list?id=list

Thanks! That works great!

Worth noting that I am seeing trouble on your website using Chrome. Works on my phone though

image image

It looks like the same approach is what is expected for Border too? Although I cannot seem to get that to work?

	shadeColor := &props.Color{
		Red:   238,
		Green: 238,
		Blue:  228,
	}

	blackColor := &props.Color{
		Red:   255,
		Green: 255,
		Blue:  255,
	}
	
	m.AddRows(
		row.New(6).Add(
			col.New(2).Add(),
			col.New(2).Add(text.New("Hi", props.Text{Align: "CM"})).WithStyle(&props.Cell{BorderColor: blackColor, BorderThickness: 10, BorderType: border.Full, LineStyle: linestyle.Solid}),
			col.New(3).Add(text.New("Hi", props.Text{Align: "CM"})),
			col.New(3).Add(text.New("Hi", props.Text{Align: "CM"})),
			col.New(2).Add(),
		).WithStyle(&props.Cell{BackgroundColor: shadeColor, BorderColor: blackColor, BorderThickness: 10, BorderType: border.Full, LineStyle: linestyle.Solid}),
	)

@johnfercher
Copy link
Owner Author

@colearendt could you open an issue about this?

@colearendt
Copy link

Done! #374

And the website issue, which seems to be Brave related (Chrome proper works fine): #373

(Although it looks like I have an update available - I will pull that and close if it resolves)

@johnfercher
Copy link
Owner Author

I will close this because I will create a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants