-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow app to fill width #8651
Allow app to fill width #8651
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/671c117f6be50a9f2b5cb3557769e6b1320d3609/gradio-4.37.2-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@671c117f6be50a9f2b5cb3557769e6b1320d3609#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-builds.s3.amazonaws.com/671c117f6be50a9f2b5cb3557769e6b1320d3609/gradio-client-1.2.1.tgz |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Niceee I just needed this for the app I'm building 😆 |
Two quick comments: (1) I think (2) Not a strong opinion, but instead of a boolean, should we make this a more flexible parameter that can take in a specified width e.g. full width corresponds to 100%. And the default setting could be a tuple of ints corresponding to the current widths at different screen breakpoints |
We already have fill_height in gr.Blocks() though
I don't think that's necessary until we see a request for it, seems like overkill. |
Ah good point, ok then
Hmm but would be a breaking change (or redundant api) if we do get requests for 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.
Nice - also agree Blocks init is the best place for the parameter
Ok the Blocks init is fine, but just a few things:
|
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.
Looks great. Thanks @aliabid94!
There is already a max-width set by gradio's container that's meant to prevent this. When you set full_width to True, you are specifically asking to skip this, so we should take all the width in this case.
I'll message Spaces team
Done. |
Useful for dashboards and other complex apps that want to use all the screen space.
Closes: #8201
Closes: #6732