-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tooltips in copilot #348
Tooltips in copilot #348
Conversation
My take is that we should standardize this and make it a kwarg on every component, i.e. st.text_area(..., tooltip="...") and handle the rendering in react |
Maybe, but this would be less flexible, e.g., if we need multiple tooltips in a label next to two different words which is a fairly normal use case for tooltips then the html approach can do it but the kwargs can't. Thoughts on how we could make the kwargs approach more flexible? Another downside to the kwargs approach is that we have to add it to every component. The html approach will work anywhere, including in the middle of text paragraphs, markup, and other html we write. Maybe we keep it like this but move the styling to a css class if the length of html that we are sending from the server is a problem? |
I'm trying to go with standard ways to write UI libraries here. E.g. streamlit also has this One reason I can imagine is that having the tooltip as HTML embedded in the title text makes it very hard for anish and iccha to change how it renders. As far as the kwargs go, you can choose not to put the explicit param right now, and just accept it on the other end of gooey-ui as **props (which we do have on most components) - (But for a great python typing experience we do want to have that static param) |
NEW PR - #443 |
Task: https://app.asana.com/0/1203067047205953/1206050253347928
Q/A checklist
You can visualize this using tuna:
To measure import time for a specific library:
To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file: