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
image: improve layout defaults #4307
image: improve layout defaults #4307
Changes from 2 commits
5c42db8
8184a8d
d71c3b3
97a8d24
2053c58
2b0d3c3
2306880
6ad80ab
8ef17c3
d1eca2c
31dbc8e
29cf98f
4233619
408b46b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
null
isn't a validscaleanchor
value. Please remove all thescalanchor: 'null'
lines from the mocks. If you want to test thatscaleanchor: null
does the right thing, use a jasmine test.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.
... this mean you'll have to update a few baselines, I hope you don't mind.
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.
Done in d71c3b3
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, thanks to the new baselines I realised that the
constrain
default is'range'
.If I recall correctly, both @emmanuelle and @nicolaskruchten prefered the look of
constrain: 'domain'
for image traces.Personally, I think
constrain: 'range'
looks just fine and it's probably not worth adding more smart (aka magic) defaults in this case.Would it be ok to keep
constrain: 'range'
as default here?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.
Mmm 🤔 I'm not sure. I think
constrain: 'domain'
looks a bit better when a singleimage
trace is present. I don't know how I feel about adding some more magic defaults. I'll let @emmanuelle and @nicolaskruchten chime in.@etpinard About the smart defaults in
image
, where should we document them? I guess within the trace description in itsindex.js
file?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.
Yep, in the
image/index.js
description would be 👌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.
Done in 2b0d3c3
Let's wait on @emmanuelle and @nicolaskruchten about
constrain: 'domain'