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

Tooltip to inform of reason for disabled action #3239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CakeCrusher
Copy link

Note

I added the following TODOs:

  • {/* TODO: incorporate localize */} I did not incorporate the translations for this tooltip message
  • {/* TODO: refactor to use https://atomiks.github.io/tippyjs/ */} Using this custom tooltip UI is convoluted tippyjs could significantly simplify this.

Summary

when creating an action for an assistant the button is sometimes disabled if the assistant has not yet been created therefore without an explanation of why it's disabled this PR informs the user of why the button is disabled.

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

you click on assistance and then you go to assistant builder where you will see that for an assistant that is already created the action button is activated but if you try and create a new action the action button defaults to disabled that is when the tooltip shows why it is disabled.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@CakeCrusher
Copy link
Author

@danny-avila

<div className="relative mt-2 h-8 rounded-lg bg-transparent font-medium">
<TooltipProvider delayDuration={0}>
{' '}
{/* TODO: refactor to use https://atomiks.github.io/tippyjs/ */}
Copy link
Owner

Choose a reason for hiding this comment

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

?

Copy link
Owner

Choose a reason for hiding this comment

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

No thank you on tippyjs

</button>
{disabledActionTip && (
<div className="absolute bottom-10 left-0 z-10 rounded bg-white p-2 shadow dark:bg-gray-800">
{/* TODO: incorporate localize */}
Copy link
Owner

Choose a reason for hiding this comment

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

yes, please incorporate it

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.

None yet

2 participants