Handled the problem reported in #9 in this commit.
Now things are working as expected so marking it NR for an initial round of testing or Code reviews.
There is a know problem in this which is this comment. It's because we only want the creation and editing flow to work with the xb_page entity for now as discussed with @lauriii.But the everting works as expected if we are on the xb_page entity.
Will try to get a workaround for this ASAP.
So here's the update on how am i testing it along with the results:-
Editing flow:-
- Lengthen/shorten title's content:-Working as expected
- Fix grammar for title:- Working as expected
- Elaborate title:- Working as expected
- Rephrase title:- Working as expected without further questions to the user.
Content creation flow:-
- Create content on topic Drupal and insert in title field:- working as expected
- Add title on cricket/ Add content on title field for cricket :- working as expected (which was not working before)
- Generate title on topic Drupal:- working as expected
I am not adding the component creation flow as those are already working.
Re #6 : This problem of failing to edit content now is fixed and it almost(what ever i tested) works as expected.
It would be great if someone can test this MR now.
So here's what the current state looks like:-
- The component creation and editing flow works fine(which includes the editing of the props for the components as well)
- The content creation flow also works 10/10 times and it creates the content correctly on any given topic and insert it correctly in the title field.
- The content editing flow only works 8/10 times which is causing this to push back a bit.I have attempted changing the prompt(and still trying it) so that before calling the editing tool it always get's the content related to the field(in our case it will always be title) that user want's to edit, but sometimes it fails.
I'll keep trying to fix the issue that's coming while editing the title and will post any update soon.
I tested the MR and here are my observations from it:-
- The history of messages remains intact even after navigating to the other page.
- The issue with this is that even after refreshing or closing the chatbot the history still remains intact.Does it makes sense to add a
Clear chat
button to reset history?
Rest everything looks good apart from small nits.Marking it NW for small changes.
utkarsh_33 → created an issue.
So as per the discussion with @lauriii we agreed to the point that we only want to update the title field for the xb_page
entity type.So this issue is scoped at updating the title field with the value generated by AI agent.
Also we might need to make changes in setPageData
according to what in @balintbrews mentioned in
this comment
📌
Generate structured content with AI
Active
.
Also i want to highlight that this MR is capable of generating content for multiple fields at a time as demonstrated in
#4
📌
Generate structured content with AI
Active
but for now we might just use this to update the title that to only for the xb_page
entity.
There are a lot of changes that are common in
📌
Generate structured content with AI
Active
and this MR, so postponing it on
📌
Generate structured content with AI
Active
.
Once
📌
Generate structured content with AI
Active
is in we might need to do a little bit of refactoring and test this to move this ahead.
utkarsh_33 → created an issue.
So here's what we assumed and are trying to do:-
- When we say we want to insert the data generated by AI in
body
andtitle
it could be both thenode entity
type as well asxb_page
.I have pushed the code to update the page data in this commit after which tried to update both types of entity but its not working. - I also tried to update different values as we are doing in some tests using
const newerTitle = { title: [{ value: 'Newer title' }] }; store.dispatch(setPageData(newerTitle));
but unfortunately it also didn't work.
I think we are targeting to update the entity fields as a part of this issue for now not the component's base field.We can have a follow-up for that if we want.
I also tried to see the form state (for node entity) and the key, values for the form are a bit different from what's in the xb_page
entity.There also i tried to update with some hardcoded values but it didn't update the values in the entity fields.
If i am missing something please let me know how can i start digging more into the issue.
This is the structure of the form for node entity.
{
"changed":,
"title[0][value]": "",
"form_build_id": "",
"form_token": "",
"form_id": "",
"field_image_0_upload_button": "",
"field_image[0][fids]": [],
"field_image[0][display]": "1",
"body[0][summary]": "",
"body[0][format]": "",
"body[0][value]": "",
"field_tags[target_id]": "",
"menu[enabled]": false,
"menu[title]": "",
"menu[description]": "",
"menu[menu_parent]": ":",
"menu[weight]": "",
"path[0][alias]": "/1",
"uid[0][target_id]": "",
"created[0][value][date]": "",
"created[0][value][time]": "",
"promote[value]":,
"sticky[value]":,
"advanced__active_tab": ""
}
The following is the structure for xb_page entity:-
{
"form_build_id": "",
"form_token": "",
"form_id": "",
"title[0][value]": "",
"path[0][alias]": "",
"image[media_library_selection]": "",
"image-media-library-update": "",
"image-media-library-open-button": "",
"description[0][value]": "",
"advanced__active_tab": ""
}
I assume this issue is only for adding content on entity fields (including body), we can have a separate issue for components when needed. @tim.plunkett and @lauriii can you please confirm before I make further progress on this?
So here is the update what's happening in this MR at this point.
When a user gives a prompt like
Create content on topic dogs and insert it in body and title field
Then the response that comes to the front-end is:-
{
"status": true,
"message": "Array\n\nI\u0027ve created comprehensive content about dogs for both the title and body fields. The content includes:\n\n1. An engaging title that introduces the topic: \u0022Understanding Dogs: A Complete Guide to Man\u0027s Best Friend\u0022\n2. A detailed body section that covers:\n - The historical relationship between dogs and humans\n - Dogs\u0027 social nature and communication abilities\n - Five key aspects of responsible dog ownership\n - Concluding thoughts on dog care\n\nThe content has been successfully added to both fields and is formatted appropriately with proper paragraphing and structure. The information is both informative and engaging, suitable for a website article about dogs.",
"created_content": [
{
"title": "Understanding Dogs: A Complete Guide to Man\u0027s Best Friend",
"body": "Dogs have earned their title as \u0027man\u0027s best friend\u0027 through thousands of years of companionship, loyalty, and unwavering devotion to their human families. These remarkable animals have evolved from wild ancestors into the diverse array of breeds we know and love today.\n\nAs social creatures, dogs possess an incredible ability to understand human emotions and communicate through both verbal and non-verbal cues. From the tiniest Chihuahua to the massive Great Dane, each breed brings its own unique characteristics, temperaments, and care requirements.\n\nKey aspects of responsible dog ownership include:\n\n1. Proper Nutrition\nFeeding your dog a balanced diet appropriate for their age, size, and activity level is crucial for their health and longevity.\n\n2. Regular Exercise\nDogs need regular physical activity to maintain their physical and mental well-being. The amount and type of exercise needed varies by breed and age.\n\n3. Veterinary Care\nRoutine check-ups, vaccinations, and preventative care are essential for keeping your dog healthy and happy.\n\n4. Training and Socialization\nEarly training and proper socialization help develop well-behaved, confident dogs who can adapt to various situations and environments.\n\n5. Love and Attention\nDogs thrive on human interaction and require regular attention, affection, and mental stimulation.\n\nWhether you\u0027re a first-time dog owner or an experienced pet parent, understanding these fundamentals of dog care will help you provide the best possible life for your canine companion. Remember that every dog is unique, and taking the time to understand your pet\u0027s individual needs is key to a successful and fulfilling relationship."
}
]
}
The message
part of the response will go in the chatbot that user interacts with.
As we can see that the response contains the content along with the field name with which it is associated or needs to be inserted.
Now the question is how can we update the UI.Considering the example of the two fields that are there in the response i.e body and title how can we insert the content in respective fields.
utkarsh_33 → created an issue.
This is ready for review.
🐛 External AI Chatbot Functionality Active is fixed now so removing Postponed status from the issue.
This is built on top of 🐛 External AI Chatbot Functionality Active .
utkarsh_33 → made their first commit to this issue’s fork.
Closed 📌 [PP-1] Add a new subagent for moving the components using experience builder AI. Active follow-up as i have fixed the issue in this issue only.Moving the components only make sense when we have multiple components(that we plan to add while adding the page builder agents) and this MR allows us to create and edit single component.
🐛 External AI Chatbot Functionality Active adds the ability to create and edit single component, so we can can't move the single component around.This issue is fixed in 🐛 External AI Chatbot Functionality Active only so we don't need this follow-up now, thus closing it.
Here is the video demonstrating the component creation and editing using xb_ai module.
utkarsh_33 → created an issue.
I tried reverting the changes in this commit but still the tests were failing.I am wondering that could this be because of some random wait?I see that explicitly the wait was set to 40000.
I am unable to get the Cypress running on my local(DDEV) machine so it's hard for me to figure out what's causing this to fail.
utkarsh_33 → created an issue.
utkarsh_33 → created an issue.
utkarsh_33 → created an issue.
I tried using Vite as per request in this comment but I am unable to get the CI passing for the UI checks.
utkarsh_33 → created an issue.
Created a follow-up issues in which we can add tests [PP-1] Add test coverage for Experience builder AI submodule. 📌 [PP-1] Add test coverage for Experience builder AI submodule. Active .
utkarsh_33 → created an issue. See original summary → .
utkarsh_33 → made their first commit to this issue’s fork.
Re#9 ya i just noticed that the positioning was a bit off.I have fixed that positioning.Marking it NR again.
I can confirm that the issue is solved with this Fix.
Re #6 I can see the SS that you attached still have the issue that's reported here.The width of the installed image and the drop button are still different,You can see the SS in #3 how it looks after the fix.
Adding #3511104: The dropbutton has extra width when opening in the modal as could haves as this is a UX improvement with which users might interact frequently.
Merging the latest changes.
Ready for reviews.
utkarsh_33 → made their first commit to this issue’s fork.
The tests are now passing.
utkarsh_33 → created an issue.
Also as i mentioned earlier in #8 regarding the use of toggles instead of plain checkboxes, I am attaching the SS of how it looks after using toggle.
SS:-
What do others think about this change?
I the SS can we make the Sort by label stacked over the dropdown just like the Filter by category
to make it more uniform?
I have pushed some changes that fixes tests.Most of the remaining tests can also be fixed in same manner, but i wonder if we really want to make changes in tests like this.I'll ask @phenaproxima about whether we want to do this.In the mean time if @omkar-pd has a better solution, then it's perfect.
All the tests that are failing are due to the extra wait that we need due to this change.I think this is not a good way.We might need something more robust here.Will try to find a better solution.
Also @omkar-pd if you think you have any better approach inline with what you added it would be great if either you can suggest or push the fix related to what's mentioned in #6.
utkarsh_33 → made their first commit to this issue’s fork.
The changes looks good to me and the filters are also working correctly.Marking it RTBC'd.
@saschaeggi do you have any better way to handle the remaining stuff?
I have removed most of the #project-browser usage.The remaining are hard to remove because they are direct child of #project-browser.
Attaching the SS for the same which shows the HTML structure for this.
This is how it looks after fix.Straight forward change.Marking it NR.
utkarsh_33 → created an issue.
I'll take this up.
As #3505700: Move the Project Browser-specific styling from Gin is in so we can start working on this.Marking it active.
I think it makes sense to move the css rules to gin.css.I think i didn’t completely get how points 2 and 3 makes it similar to other dropdown.If you think it makes sense then you can push the changes accordingly.
I have moved the css related to Gin
into it's specific file.This is ready for review.
The checkboxes seems a bit misaligned as you can see in the SS:-
I think we can place them in centre.
Also i have an opinion,
can we use toggles instead of checkboxes?
Marking it NW just for a few css adjustment and opinions on the question.
It needs a round of manual testing and also i'm not sure about the css rule for hovering over the div.Already added the questions for the same.
This is how it looks after the fix.
utkarsh_33 → created an issue.
utkarsh_33 → made their first commit to this issue’s fork.
Marking NR.
This is how the dropdown looks:-
Closing this issue as this is not required.We still need the Installed icon according to this comment 📌 Replace install/select button with a Drupal's action button Active .
Marking it NR.
Marking it NR.
I have addressed all the feedbacks in #33, but there is on modification that i have done is where the installed icon is placed in comparisons to the dropbutton(if it exists).
I'll attach the SS for both the cases:-
1) With follow-up
2) Without Follow-up
This is what i personally think looks good instead of placing them as grid(one over the other).If someone is strictly against this design then I'm happy to change to what’s better in terms of design.
Leaving it to @chrisfromredfin and @phenaproxima for making the decision on designs.
utkarsh_33 → created an issue.
utkarsh_33 → made their first commit to this issue’s fork.
Re #24 I tested the issue and i figured out that the issue is not related to the changes that we made in this MR.The issue already exists on 2.0.x.
Steps to test the issue is try to console log the project object in the action button component and see the tasks object once the project is installed(without refreshing ) and then after refreshing.You will see that the url is not correctly passed.
utkarsh_33 → made their first commit to this issue’s fork.
utkarsh_33 → made their first commit to this issue’s fork.
I have fixed the issue related to
But clicking "Installed" just knocks you back to the top of page without explanation; it feels like a bug
And also related to what you mentioned related to
First, if you install some modules (that you don't already have), once the installation completes, the badge is rerendered as a dropdown that looks utterly broken:
I'm unable to reproduce this.It loads correctly on my local.
I suspect this could be cache issue.When you checkout the branch clear the cache before installing the any module, then it might not happen.I'll ask other community members to test this so that we can get a confirmation if the problem really exists.
Marking it NR again as things are working correctly atleast on my end.Let's wait for someone to verify what's happening.
I think we can now remove the tag as the issue summary has the complete description about the issue.
This is currently postponed on Replace install/select button with a Drupal's action button 📌 Replace install/select button with a Drupal's action button Active
utkarsh_33 → created an issue.
Addressed feedbacks🥳.
Addressed all the feedbacks and also added more tests.Marking it NR again.
All the tests are now passing.I think there is still atleast one thing that remains is that we need to disable the dropbutton if there is no follow-up action in some cases.I will take care of that as well.In the mean time I'm marking it NR so that it can undergo a round of review or manual testing.
utkarsh_33 → made their first commit to this issue’s fork.