Geeks-Solutions / nuxt-sections

MIT License
2 stars 1 forks source link

Render request from one section to another #50

Closed akramsarkis closed 2 months ago

akramsarkis commented 2 months ago
Screenshot 2024-09-03 at 14 18 39

@mahfouzhseineweev as discussed as I don't have the details you need to update the issue with the details and update needed in the library and as well with the acceptance testing I need to do

Acceptance testing

akramsarkis commented 2 months ago

Hussein Mahfouz 17 hours ago Hello @Julien Fayad Regarding your request about refreshing all section views that are using the qs that has changed. This needs to use the section-types API which requires sections admin token, so this is not an option currently.

Note that the way the refresh section is currently done allows refreshing multiple sections by they should be called specifically by their names

4 replies

Akram Sarkis 15 hours ago @Julien Fayad just as reminder in case you did not see it

Julien Fayad 14 hours ago

you mean to know what qs a section relies on requires access to the section-types endpoint?

We could eventually expose the qs requirement in the section content when rendering a page to avoid this extra call to the section-types endpoint.. would that solve the issue ?

As for your last point, I didn't get it... I mean yes you need to specifically refresh a section by using its name, but the library will be handling this, that's what we discussed, isn't it ?

Hussein Mahfouz 14 hours ago Forget about the last point if we can expose the qs requirements somewhere then that will work

Hussein Mahfouz 13 hours ago The library will handle all, the only thing the host project will do is that a section will emit an event with the qs updated value

So from what Hussein said, you need to expose the query string requirement somewhere before he can work on this issue

mahfouzhseineweev commented 2 months ago

@akramsarkis To test this on maiori site, you need to:

akramsarkis commented 2 months ago

@akramsarkis To test this on maiori site, you need to:

  • Make sure the pagination still works properly on the products list
  • In the products lists use the Types to switch between standing lamps and table lamps, check the network to make sure the dynamic sections that has type_id are refreshed API call sent, on the front make sure the view data are updated correctly

@mahfouzhseineweev

akramsarkis commented 2 months ago

all good, closing