-
Notifications
You must be signed in to change notification settings - Fork 326
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
chore: Use maximum available space in ui.inline instead of hardcoded constant. #1974 #2152
Conversation
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.
Only one fix is needed and it's good to go, @mturoci !
@mturoci, my QA efforts has continued also after the review and brought the new finding that two of our examples using
Our Tour and Wave University apps are intact. |
Perfect. Those are expected and simple to fix. Good job nonetheless. Will fix in a sec. |
@mturoci, I hope this is the last one - if the user sets a fixed width for the element, it should not shrink to fit the available space (in 0:04 is the correct behavior, in 0:14 it is not): Screen.Recording.2023-10-06.at.11.22.40.mov |
@mturoci, the similar problem as previous one, but with fixed The example from the screenshot is this one with visualization part modified: ui.inline(direction='column', height='400px', items=[
ui.visualization(
height='500px',
plot=ui.plot([ui.mark(type='interval', x='=product', y='=price', y_min=0)]),
data=data(fields='product price', rows=[(c, x) for c, x, _ in [f.next() for _ in range(n)]], pack=True),
),
ui.vega_visualization(
height='500px',
specification=spec,
data=data(fields=["a", "b"], rows=[
["A", rnd()], ["B", rnd()], ["C", rnd()],
["D", rnd()], ["E", rnd()], ["F", rnd()],
["G", rnd()], ["H", rnd()], ["I", rnd()]
], pack=True),
),
]), |
The code above seems incorrect as it sets the height of the container |
In that case it's all from my side. I've also checked if everything works the same way across all 3 browsers. If you don't have anything else for me to test, I'll finish my QA. |
Thanks @marek-mihok! |
…ded constant to prevent unwanted scrollbars and be more in sync with regular form_card behavior.
f5bffbe
to
940273a
Compare
@marek-mihok - can you make a code review and a thorough QA to check if everything works as expected?
This is a rewrite of #1988 for #1974.
The reason some components shrunk drastically was wrong use of default
align='center
for case whendirection='column'
. This PR sets the following defaults:form_card.items
.justify
) is chosen. In such case, the default width should correspond to the component's content, be it a label or anything else.