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

feature/Bottom padding for text in automatic row calculation #478

Merged

Conversation

blanchardglen
Copy link
Contributor

Description

This feature adds a Bottom parameter to the prop.Text similar to the Top parameter.

Only used as part of the new AutoRow feature to give some extra spacing to the bottom of the text. This has a dual purpose:

  1. Add padding to the bottom of text rows
  2. Expand the automatic calculation of the font height especially for descending glyphs

Checklist

check with "x", ONLY IF APPLIED to your change

  • All methods associated with structs has func (<first letter of struct> *struct) method() {} name style.
  • Wrote unit tests for new/changed features.
  • Followed the unit test when,should naming pattern.
  • All mocks created with m := mocks.NewConstructor(t).
  • All mocks using m.EXPECT().MethodName() method to mock methods.
  • Updated docs/doc.go and docs/*
  • Updated example_test.go.
  • Updated README.md
  • New public methods/structs/interfaces has comments upside them explaining they responsibilities
  • Executed make dod with none issues pointed out by golangci-lint

Copy link
Collaborator

@Fernando-hub527 Fernando-hub527 left a comment

Choose a reason for hiding this comment

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

Very good!!

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.03%. Comparing base (884d352) to head (1da080f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/props/text.go 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #478      +/-   ##
==========================================
- Coverage   87.18%   87.03%   -0.15%     
==========================================
  Files          61       61              
  Lines        2315     2319       +4     
==========================================
  Hits         2018     2018              
- Misses        265      268       +3     
- Partials       32       33       +1     
Flag Coverage Δ
unittests 87.03% <20.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnfercher johnfercher merged commit cd422ec into johnfercher:master Sep 30, 2024
3 of 5 checks passed
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.

4 participants