-
Notifications
You must be signed in to change notification settings - Fork 233
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
base: v2-exp
Are you sure you want to change the base?
Conversation
…427) Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/charmbracelet/x/releases) - [Commits](charmbracelet/x@ansi/v0.4.2...ansi/v0.4.3) --- updated-dependencies: - dependency-name: github.com/charmbracelet/x/ansi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…428) Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.4.3 to 0.4.5. - [Release notes](https://github.com/charmbracelet/x/releases) - [Commits](charmbracelet/x@ansi/v0.4.3...ansi/v0.4.5) --- updated-dependencies: - dependency-name: github.com/charmbracelet/x/ansi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: border size getters when implicit borders are present When a border style is set and no borders have been explicitly enabled or disabled, a border is implicitly applied to all sides of the block. Prior to this fix border size getters would incorrectly return 0 when an implicit border is set. This revision corrects that behavior. * refactor: remove redundant conditional check * Update get.go * test: add border tests Co-authored-by: @qualidafial --------- Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com> Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com> Co-authored-by: bashbunni <bunni@bashbunni.dev>
…442) Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.4.5 to 0.5.0. - [Release notes](https://github.com/charmbracelet/x/releases) - [Commits](charmbracelet/x@ansi/v0.4.5...ansi/v0.5.0) --- updated-dependencies: - dependency-name: github.com/charmbracelet/x/ansi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…443) Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.5.0 to 0.5.2. - [Release notes](https://github.com/charmbracelet/x/releases) - [Commits](charmbracelet/x@ansi/v0.5.0...ansi/v0.5.2) --- updated-dependencies: - dependency-name: github.com/charmbracelet/x/ansi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Height(8). | ||
Width(columnWidth + 1) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
@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 That makes this change breaking despite it being the intended behaviour for edit: Will include this in v2 since it is breaking |
included tests for these changes that fail on
master
but pass on this branch :)