- Issue created by @Panchuk
- Assigned to boddy
- First commit to issue fork.
- @royalpinto007 opened merge request.
- Status changed to Needs review
almost 2 years ago 3:19pm 9 February 2023 - 🇮🇳India royalpinto007
This change was made to enhance the user experience and improve page performance. By utilizing AJAX, we are able to retrieve and update data asynchronously, allowing the user to interact with the page while data is being loaded. The Gridstack container children serve as a perfect candidate for this functionality, as they require frequent updates to their contents.
- 🇺🇦Ukraine Panchuk Volyn, Lutsk
@royalpinto007 Thanks for your contribution to Paragraphs Gridstack.
I didn't add a good description for this task, so probably you didn't understand the idea of the task.
Also, this issue is already assigned to another contributor and this is a bad tone to work on assigned tasks.The first problem with your MR is using a 'field_children' field name to get a child paragraphs, but this is a paragraph behavior plugin and it could be applied to any type of paragraph.
// Attach ajaxified link to gridstack container children. $children = $paragraph->get('field_children');
The second problem is using 'entity.node.canonical' for generating a Link to the paragraph. Also, the setOptions() method is not applicable to the Link object. It works only for a URL object.
// Create a link for the child entity. $link = Link::createFromRoute($child_entity->label(), 'entity.node.canonical', ['node' => $child_entity->id()]); // Ajaxify the link. $link->setOptions([ 'attributes' => [ 'class' => ['use-ajax'], 'data-dialog-type' => 'modal', ], ]);
And the last piece of code that doesn't work:
// Attach the link to the child entity. $child_entity->link = $link;
- 🇺🇦Ukraine Panchuk Volyn, Lutsk
@royalpinto007 How did you write this code? Did you use some kind of AI e.g. ChatGPT?
- Status changed to Active
almost 2 years ago 4:40pm 9 February 2023 - 🇮🇳India royalpinto007
Oops, I didn't notice that it was already assigned to someone else. I apologize for the same.
Also, I made changes in the code taking some reference from the Stack Overflow website. - Assigned to Andrii Momotov
- Merge request !54Issue #3337103: Configurations off-canvas: link to trigger off-canvas → (Open) created by Andrii Momotov
- Issue was unassigned.
- Status changed to Needs review
10 months ago 2:25pm 27 January 2024