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

fix!: style size to include borders #451

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

bashbunni
Copy link
Member

@bashbunni bashbunni commented Dec 2, 2024

included tests for these changes that fail on master but pass on this branch :)

@bashbunni bashbunni linked an issue Dec 2, 2024 that may be closed by this pull request
@aymanbagabas aymanbagabas changed the title fix: fix style size to include borders fix: style size to include borders Dec 2, 2024
Height(8).
Width(columnWidth + 1)
Copy link
Member Author

@bashbunni bashbunni Dec 2, 2024

Choose a reason for hiding this comment

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

we don't need to do this anymore because the +1 before was to account for the border on one side

@@ -282,7 +281,7 @@ func main() {
listItem("Pomelo"),
),
),
list.Width(columnWidth).Render(
Copy link
Member Author

Choose a reason for hiding this comment

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

all columns have the same width now

@bashbunni
Copy link
Member Author

bashbunni commented Dec 3, 2024

@meowgorithm Should this change be part of v2 given it may break some layouts?

This change causes a lot of existing examples to be off by 1 or two depending on if the border is only on one side or not. Authors are currently working around by having x +/- 1 or x +/- 2 when working with bordered content. You can see this in our layout example.

That makes this change breaking despite it being the intended behaviour for Width...

edit: Will include this in v2 since it is breaking

@bashbunni bashbunni changed the title fix: style size to include borders fix!: style size to include borders Dec 3, 2024
@bashbunni bashbunni added the v2 label Dec 3, 2024
@bashbunni bashbunni changed the base branch from master to v2-exp December 16, 2024 15:49
@bashbunni bashbunni changed the base branch from v2-exp to master December 16, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix!: Style's Width doesn't include border size
1 participant