Closed Oddant1 closed 4 years ago
Maybe the answer, at least in the short term, is to leave the autosize on fit-x
and not have the text box there to change the width. This also allows us to leave the resize on window size change which is definitely a good thing. I'm really not finding any way to keep things sized nicely and consistently while also allowing the user to edit the width.
while also allowing the user to edit the width.
We aren't really looking to allow that - the textbox is just a by-product of how we were doing dynamic sizing via signal. Once upon a time that was the best way to handle dynamic resize in vega. I think that some time later in the 4.x or 5 series of vega they added new options to vega for including a signal directly in the autosize attribute. I bet there's just a better, more succinct way to do this, now.
@thermokarst in that case, my life just got a whole lot easier. Do we still want to leave all those other modifiable settings down there? They don't seem to be breaking anything. And I'm pretty sure I can ditch that textbox pretty easily now that it's not useful.
I think we need everything listed below, except width:
https://github.com/qiime2/q2-longitudinal/pull/154/commits/211098c66dc03949f5d23993f83f55a98f1df273 This should size the plot pretty well overall. I'll look into making it happen without that textbox. Absolute worst case I can call it something like "width (don't change)" I suppose. Or "width (set autosize type to 'pad' before changing)" those get a bit too long though.
EDIT: Making the name that long actually seriously breaks things :joy:
https://github.com/qiime2/q2-longitudinal/pull/154/commits/f02690b2d55cb11dfa2b25aa36ed277b8be4461d Turns out you can just remove the binding to the textbox and it still works just fine.
@thermokarst I'm not seeing any other viz's that use vega
@thermokarst I believe the js changes were also rolled back here, but do you want me to also role back the other changes I made while trying to make the viz work.
@thermokarst I believe the js changes were also rolled back here
Sorry, I realize where the caching was coming from - I was navigating to the PR via my notifications. The notification I was clicking on was an old when. Sorry for that!
do you want me to also role back the other changes
Yes please!
band aids #153 band aids #155
fit-x
topad
. Onfit-x
it was impossible to effectively resize the plot within the editor. I think if I just reduce the default width this issue may be resolved.EDIT: In regards to number 2, the plot being too wide or not outside the vega editor is now entirely dependent on monitor resolution. This is obviously not ideal.