classifai icon indicating copy to clipboard operation
classifai copied to clipboard

JS/CSS is not loading in admin until "Language Processing" service credentials are saved.

Open iamdharmesh opened this issue 2 years ago • 0 comments

Describe the bug

Currently, the plugin loads admin CSS and JS only after the service gets registered successfully, which makes the link Use a username/password instead? not work and breaks the layout of the "Preview Language Processing".

Expected behavior: UI should work properly regardless of whether service credentials are saved or not.

Also, we may show "Preview Language Processing" only after credentials are saved and authenticated, as it will start working after the service is authenticated.

Steps to Reproduce

  1. Go to ClassifiAI > Language Processing
  2. Click on the "Use a username/password instead?" link and notice that it's not working. image
  3. Scroll down to below in code. Notice that "Preview Language Processing" is not properly showing. image
  4. Save credentials.
  5. Verify steps 2 & 3 started working properly.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

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

iamdharmesh avatar Sep 02 '22 12:09 iamdharmesh