Skip to content
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

Fix: Resolve copy button visibility issue in Textbox component #9859

Merged
merged 8 commits into from
Oct 31, 2024

Conversation

rahulsamant37
Copy link
Contributor

@rahulsamant37 rahulsamant37 commented Oct 28, 2024

Description

This PR resolves the issue with the misplaced/invisible copy button in the gr.Textbox component when show_copy_button=True. The button was previously positioned inside the textarea, leading to improper alignment and invisibility.

Main changes include:

  • Added a new wrapper
    to give the copy button a separate positioning context.
  • Moved the copy button outside of the input/textarea container for better alignment.
  • Removed the copy button from within the textarea section to prevent overlap.
  • Updated styles to adjust positioning and styling:

Closes: #9569

Thank you for considering this fix! I appreciate your time and look forward to your feedback.

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 30, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Storybook ready! Storybook preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/202feb26158e78f436e5f8390c6ff478550dc8d6/gradio-5.4.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@202feb26158e78f436e5f8390c6ff478550dc8d6#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/202feb26158e78f436e5f8390c6ff478550dc8d6/gradio-client-1.7.1.tgz

Use Lite from this PR

<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/202feb26158e78f436e5f8390c6ff478550dc8d6/dist/lite.js""></script>

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 30, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/textbox patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fix: Resolve copy button visibility issue in Textbox component

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @rahulsamant37! I moved around some of the containers, should be good to go now!

@abidlabs abidlabs merged commit c1cb5be into gradio-app:main Oct 31, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy button in 5.0.0b7 Textbox is misplaced/invisible
4 participants