-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
added fill_percent to params for insert, swap and remove #946
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
Conversation
@cldougl ready for a 👀 |
hey @Kully this looks good, I'm trying out some examples now! Are these changes intended to be backwards compatible? |
CHANGELOG.md
Outdated
@@ -2,6 +2,10 @@ | |||
All notable changes to this project will be documented in this file. | |||
This project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
## [2.4.2] - UNRELEASED |
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 would say this is more of added functionality than a bug fix (do you agree?) so I think it should be version 2.5.0 based on: https://semver.org/
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 agree they are not bug fixes. The question I have now about my message below is if we consider these points as backwards-compatible. Functionally the API is the same and produces dashboards that look the same. I just had to modify a test or two.
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.
Is there no way to add this functionality as an option rather than the default so that it remains backwards compatible?
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 don't think it's worth it. There was a technical issue with, before, using pixels as the metric for slicing up the boxes (since it was always in half) but the new param uses percentage to insert the boxes next to a pre-existing box
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 got it 👍
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.
@Kully did you get a chance to update this to 2.5.0
and update plotly/version.py
as well?
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.
no thank you for reminding me
As far as I know, yes. There are a couple technically non-backwards compatible things:
|
@@ -440,7 +434,7 @@ def insert(self, box, side='above', box_id=None): | |||
my_dboard.insert(box_1, 'left', 1) | |||
my_dboard.insert(box_1, 'below', 2) | |||
my_dboard.insert(box_1, 'right', 3) | |||
my_dboard.insert(box_1, 'above', 4) | |||
my_dboard.insert(box_1, 'above', 4, fill_percent=30) |
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.
does this output for the example look correct to you @Kully ? Not sure right/left
or above/below
is working
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.
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.
@Kully running on your branch in python 2.7 I get the desired output but in python 3.6 I get:
We should make this consistent across python versions.
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.
wow, that's interesting -
I'll investigate that (and probably need to add better tests)
@cldougl Now the API auto-sizes very similarly to the dashboard GUI. Ready for I believe a final look. |
@Kully for python 2.7 and 3.6 I am getting this preview from the example: Can you confirm that is correct? That is not what I was expecting from
|
@Kully can you also add an example of the easiest way to add 4 vertical boxes of the same height? |
|
Yes this is correct. This is perhaps the weakest point in the API currently. Does this make sense? |
I am going to edit |
💃 |
This PR accomplishes:
fill_percent
#TODO
s fromdashboard_objs.py
re: #711