-
Notifications
You must be signed in to change notification settings - Fork 62
Display setup instructions from README in plugin for each AI service provider #953
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
base: develop
Are you sure you want to change the base?
Conversation
I have a question here:
In Short, How can I find setup instruction for all the combinations? Let me know if I am missing something here. |
Thanks for starting work on this. Overall I think this looks okay but it is a little intrusive. I would suggest that instead of a new section that expands/collapses that we try something a little less in your face, so to speak. Maybe a question mark icon or info icon that shows next to
I believe the only place we have instructions for this right now is in the |
@dkotter Got it for popup model. I'll try to implement that.
|
- A question mark icon beside "Select a Provider" label - When we click on the icon, instruction of specific AI configuration will be displayed in a popup modal - Used "Modal" component from @wordpress/components
Hi @dkotter
Instructions not found for following combinations:Language Processing
Image Processing
Recommendation Service
|
I like this, nice work here. Do want to flag that we have another PR (#957) that does something similar. Seems like we should probably standardize between the two so we don't have different experiences for showing helper text. |
Hi @dkotter I saw the PR you mentioned. I am open for the standardization of this. Let me know how do we proceed and I'll do that. My thoughts:
So may be we can do something like passing the type of information
|
I like the idea of an easy to re-use component for this so I'm fine if you want to proceed with that. Thanks! |
Thank you @dkotter for confirming this. I'll work on this. |
- Displays an icon next to fields as helper text - Opens a modal with detailed information when clicked
@dkotter e2e test is failing for edit media screen https://github.com/10up/classifai/actions/runs/16385979320/job/46305527056?pr=953#step:8:260 But I haven't made changes for that. Not sure if my changes affected something here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review here. Overall this looks really good and works as expected but have a few things that need cleaned up before this is ready to merge.
src/js/settings/components/provider-settings/google-gemini-api.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one other thing I keep going back to here that's worth bringing up for discussion. Right now this PR pulls content from the README.md file. The benefit here is we don't have to have this information duplicated, it lives in one place and we can use it wherever we want.
There are downsides I keep coming back to:
- If we ever move these instructions out of the README, this will break things (and I would love to find a better place for these, the README is pretty cluttered right now)
- If we ever change the format of any of these instructions (like changing the headings) that will break our parsing
- While we have caching around this, it is an extra HTTP request anytime that cache expires (very minor thing)
I'm not coming up with any great ideas that don't require us to duplicate these instructions in both the README and somewhere else but I think that is probably fine. My thoughts here are maybe these instructions should live within each Provider class, so when you create a new Provider, you are responsible for giving it the instructions. Those instructions can still be in markdown format if we want, but then we aren't having to download a file and we aren't having to parse out the right content from that file.
This also allows us to remove some of the instructions that don't matter. For instance, I think the main part that matters for each Provider is how to get that Provider set up, not how to get the individual Feature set up. Right now we pull that whole chunk from the README but if we have separate instructions with the Provider, we can limit it to just the instructions on how to configure the Provider.
I'd like to get the details out of the README, though perhaps duplicated somewhere on the microsite (eg a Help page/section) and more minimally contextually within the plugin (perhaps with links out to said Help section). |
Do I need to look for an alternative for this? One thing that came to my mind for #953 (review)
|
No, this should be fine. We've run into this before with that GitHub Action and I think it's a bug on their end (though I thought they had fixed that, I can look into it separately though).
We just merged in #966 that changes how our documentation is built. As part of that, instructions for setting up each Provider have been moved to separate markdown files and may be a better place to pull documentation from in this PR. I'll also probably remove those instructions from our README now and link directly to each relevant section in our documentation site. Note that we don't ship these files with the production version of the plugin (those get removed during the final build process) which would still require remote requests to get that information. We can look at keeping those files in the final release though if that helps out this PR |
Before making changes, please confirm following:
OR
Let me know your thought on this. |
I do think this is the final structure, at least for now. So yes, regex will still need to be used here. I guess my main question is if we want these files to live in the final release zip, which would allow us to pull the information in without doing an external request. As of now, these files are excluded from that final release. |
|
@dkotter I've made changes as per new folder structure. |
Added a helper icon for "Select Provider" label. When clicked, it will open a popup modal with the selected AI setup instructions.
Here is the Demo:
https://go.screenpal.com/watch/cTiID3nl57n
Description of the Change
FieldInfo
Closes #925
How to test the Change
Classification
Settings
Select Provider
and change provider one by one?
iconChangelog Entry
Credits
Props @dkotter
Checklist:
Extra NOTE: