classifai icon indicating copy to clipboard operation
classifai copied to clipboard

Conditional Display of Helper Text for AI Provider Account Creation

Open ankitguptaindia opened this issue 1 year ago • 0 comments

Describe the bug

Description: The helper text, such as 'Don't have an IBM Cloud account yet? Register for one and set up a Natural Language Understanding Resource to get your API key.', should be displayed conditionally. It should only appear when the credentials fields are empty or contain incorrect credentials.

Use Case: When the service is successfully configured, it implies that the admin already has an account, allowing them to set up the service correctly. Therefore, if the admin has already configured an account, this helper text is not useful on the screen.

Steps to Reproduce

Steps:

  1. Begin setting up the plugin.
  2. Enter the correct credentials for the AI provider.
  3. Save the settings.

Branch- develop

Screenshots, screen recording, code snippet

When fields are empty - this text will help the user to create an account and setup a plugin.

image

When Setting is configured successfully, this can be hidden:

image

Example -

image

Environment information

No response

WordPress information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ankitguptaindia avatar Feb 13 '24 14:02 ankitguptaindia