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

Add chatbot cursor logic #9003

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Add chatbot cursor logic #9003

merged 2 commits into from
Aug 5, 2024

Conversation

hannahblair
Copy link
Collaborator

@hannahblair hannahblair commented Aug 5, 2024

Description

Ensures that any chatbot bubble messages only show a pointer cursor if there is a select event, if not, it will just be the default cursor.

Closes: #8163

Demo with select logic:

with gr.Blocks() as demo:
    chtbt = gr.Chatbot(value=[["Hello World","Hey Gradio!"],["❤️","😍"],["🔥","🤗"]])

    select_output = gr.Textbox(label="Select Data")

    def select(select_data: gr.SelectData):
        return select_data.value

    chtbt.select(select, None, select_output)

demo.launch()

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Aug 5, 2024

🪼 branch checks and previews

Name Status URL
Spaces building...
Website failed! Details
Storybook failed! Details
🦄 Changes failed! Workflow log

@dawoodkhan82 dawoodkhan82 self-requested a review August 5, 2024 20:50
Copy link
Collaborator

@dawoodkhan82 dawoodkhan82 left a comment

Choose a reason for hiding this comment

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

Nice fix. Thanks

@hannahblair hannahblair merged commit a2e36c3 into main Aug 5, 2024
15 checks passed
@hannahblair hannahblair deleted the chatbot-btn branch August 5, 2024 22:44
freddyaboulton pushed a commit that referenced this pull request Aug 6, 2024
freddyaboulton added a commit that referenced this pull request Aug 6, 2024
* Add code

* file_explorer test

* dont use fastapi

* Add code

* Update requirements.txt

* Ci security tweaks (#9010)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* Ci security tweaks (#9012)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* :[

* add cursor styling (#9003)

* Add min/max-imize button to gr.Image and gr.Gallery (#8964)

* add max/min-imize and zoom in and out to image preview

* add full screen icon to gallery

* add stories

* add changeset

* use native full screen api

* remove zoom in/out

* add changeset

* tweaks

* remove zoom prop

* fix ui test

* add annotated image btns

* add changeset

* format

* ruff format

* fix test

* remove

* tweak

* fix test

* format

* amend bool check

---------

Co-authored-by: gradio-pr-bot <[email protected]>
Co-authored-by: pngwn <[email protected]>

* Ci security tweaks (#9014)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* :[

* asd

* asd (#9015)

* Ci security tweaks take seventy three (#9016)

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9017)

* asd

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9018)

* asd

* asd

* asd

* asd

* adsa

* asd

* Ci security tweaks take seventy three (#9019)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* Website fixes for mobile  (#8857)

* better header for mobile

* add changeset

* nicer border

* style header

* better search overlay

* responsive changes

* more mobile responsiveness

* docs and guides mobile responsive

* formatting

* fix get started button

* fix header

* test without lite

* formatting

* secondary menu docs

* fix type overflow in paramtable

* playground header

* playground on mobile

* small changes

* formatting

* formatting

---------

Co-authored-by: gradio-pr-bot <[email protected]>

* Ci security tweaks take seventy three (#9025)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9026)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* asd

* fix

* asd (#9027)

* fix (#9028)

* Ci statuses (#9030)

* fix

* asd

* Update tests

* add changeset

* Add code

* add changeset

* Comments

---------

Co-authored-by: pngwn <[email protected]>
Co-authored-by: Hannah <[email protected]>
Co-authored-by: gradio-pr-bot <[email protected]>
Co-authored-by: Ali Abdalla <[email protected]>
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.

Bubbles in Chatbot should not be clickable
3 participants