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(axis_title): remove whitespace with empty axis title #226

Merged
merged 1 commit into from
Jun 5, 2019

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jun 3, 2019

Summary

fix #225

This PR remove the whitespace left from an undefined title axis spec.
The whitespace is kept if the title prop is any string also an empty one. Only if it's undefined, the occupied space is removed.

Jun-03-2019 23-48-34

The Styling->margins and paddings storybook story is updated with this change. Switch the show label on axis title checkboxs to add or remove the axis title from the chart configuration

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility, including a check against IE11
  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

The whitespace left from an undefined title is removed from the computation of the axis dimension,
removing the unneccessary whitespace occupied by an empty title label

fix elastic#225
@markov00 markov00 added bug Something isn't working :axis Axis related issue labels Jun 3, 2019
@markov00 markov00 requested a review from emmacunningham June 3, 2019 22:09
@codecov-io
Copy link

codecov-io commented Jun 3, 2019

Codecov Report

Merging #226 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
+ Coverage   97.81%   97.81%   +<.01%     
==========================================
  Files          35       35              
  Lines        2563     2564       +1     
  Branches      559      573      +14     
==========================================
+ Hits         2507     2508       +1     
  Misses         49       49              
  Partials        7        7
Impacted Files Coverage Δ
src/lib/axes/axis_utils.ts 100% <100%> (ø) ⬆️
src/lib/utils/dimensions.ts 80.64% <100%> (+0.31%) ⬆️

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 c566e2c...f381fca. Read the comment docs.

@angorayc
Copy link

angorayc commented Jun 4, 2019

@markov00 Thank you very much for the update! Btw your coverage reports looks very nice!

Copy link
Contributor

@emmacunningham emmacunningham left a comment

Choose a reason for hiding this comment

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

tested locally and code LGTM

@markov00 markov00 merged commit 74198dc into elastic:master Jun 5, 2019
@markov00 markov00 deleted the empty-title-no-space branch June 5, 2019 12:14
markov00 pushed a commit that referenced this pull request Jun 5, 2019
## [4.2.7](v4.2.6...v4.2.7) (2019-06-05)

### Bug Fixes

* **axis_title:** remove whitespace with empty axis title ([#226](#226)) ([74198dc](74198dc)), closes [#225](#225)
@markov00
Copy link
Member Author

markov00 commented Jun 5, 2019

🎉 This PR is included in version 4.2.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jun 5, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:axis Axis related issue bug Something isn't working released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove title space if title is empty
4 participants