Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(axis): add tickLabelPadding prop #217
feat(axis): add tickLabelPadding prop #217
Changes from 19 commits
f3032fe
be36cb1
451ecfb
c092953
ab3869a
9bfa9b1
0a3f443
b5dee48
2dfb614
929b0ac
0f39133
edb1f4b
83ee9b7
2dab12a
7bba2fa
f8e8f5f
1507d9c
fac9f17
776239a
d8dd8f4
83fcc7d
725177f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can we rename this parameter name to
themeAxisConfig
to make it clearer where this is coming from? I think eventually we'll want to think about how to better merge spec-specific and theme-general styles but for now, would be nice to update the parameter name.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.
Thank you for helping me with this! The commit with the changes in naming and improving axis_utils test is addressed in commit d8dd8f4
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.
@markov00 What do you think about doing some validation to prevent negative padding and if the supplied padding argumen is less than 1, set the padding to 1 instead? And we could also surface this in our configuration warnings once we have those. We are already accounting for padding in the computation of the label and if the user specifies a negative padding, then the text box would not be wide enough for the label.
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.
Yes I'm ok to add some validation here to prevent negative padding.
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.
Added commit edb1f4b to address
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.
test added in 1507d9c to address
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.
Just to confirm - should we set the padding to 1 when it's specified by the user at 0? Or should the validation only catch negative values? Thanks!
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.
Clarified in zoom with Emma about this 👌
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.
I'd say generally comments as simple as this can be left for tests. Meaning you should create test cases that validate this line of code. That way if someone removes these lines of code, the tests break.
Not saying you can't leave comments, but do so for more complex code that requires explanation.
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.
Ok! I think I wrote one that gets to the issue in commit
1507d9c
. Let me know what you think thanks!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.
FYI Github will auto link and format the commit hash when you just put the hash or short hash like this 1507d9c but when you wrap the hash in backticks, or anything else for that matter, it doesn't create the link like this
1507d9c
. Here is a link to all the url fun https://help.github.com/en/articles/autolinked-references-and-urlsYou can also paste code snippets by selecting code lines, use shift+click for multiple lines, and select
copy permalink
Then you will get something like this...
elastic-charts/package.json
Lines 14 to 16 in f2b90df
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.
improved comment in commit d8dd8f4