inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
48 stars 16 forks source link

finish users_home_layout rewrite to Svelte #398

Closed maxlath closed 1 year ago

maxlath commented 1 year ago

I had to revert the merge from #367 as after further tests, it was not ready for prod. Namely, the legacy backbone implementation of users_home_layout was not doing the transitions properly, stacking the different layouts rather than replacing them, in certain cases.

This PR attempts to finish the job by rewriting the last pieces of that layout to Svelte, most importantly users_home_layout itself.

To avoid to the reviewer the need to re-review the parts that were already validated in #367, this PR is based a special branch users-layout-rewrite--validated-by-367. Thus, to merge this PR once validated:

jum-s commented 1 year ago

when i load page /users/network, then i click on my username (aka got to my inventory users/adamsberg/inventory) my inventory is blank (with no error message in console). Peek 2023-04-23 12-03

maxlath commented 1 year ago

when i load page /users/network, then i click on my username (aka got to my inventory users/adamsberg/inventory) my inventory is blank with no error message in console

@jum-s Is that still the case will the latest version?

jum-s commented 1 year ago

when i load page /users/network, then i click on my username (aka got to my inventory users/adamsberg/inventory) my inventory is blank with no error message in console

@jum-s Is that still the case will the latest version?

Yes.

Also, as you can see in the gif above, on the network page, a "There is nothing here" is displayed, while its still loading items. Would make more sense to have a spinner instead. If you don't fix it now (although it would be preferable), can we have an issue on the matter?

maxlath commented 1 year ago

@jum-s that would be quite a regression if some inventories can not be displayed, so we have to solve it before merging. Anything in the server or client logs? Could you try to investigate where that fails?

jum-s commented 1 year ago

Non-blocking/open issue was refering to the too early "there is nothing here" instead of spinner thinggy.

There is nothing in the console. Can you reproduce the bug? It only bugs when loading the page from /users/network (press F5) then go to your inventory. I can take a look a it tomo, despite not being in context.

maxlath commented 1 year ago

@jum-s nice, I was able to reproduce the issue \o/

jum-s commented 1 year ago

Looks like users_home_layout dont have user defined, thus not falling into any of the if categories line 66

maxlath commented 1 year ago

Looks like users_home_layout dont have user defined, thus not falling into any of the if categories line 66

yes, fixed in 098b3056b

jum-s commented 1 year ago

for the spinner, it happens when loading (F5) the page users/network. Before items are loaded, it should show a spinner, instead of now a "There is nothing here". After looking a bit at it, it looks like PaginatedItems (triggered by NetworkUsersNav) dont have any promise waiting to resolve on.

maxlath commented 1 year ago

for the spinner, it happens when loading (F5) the page users/network. Before items are loaded, it should show a spinner, instead of now a "There is nothing here". After looking a bit at it, it looks like PaginatedItems (triggered by NetworkUsersNav) dont have any promise waiting to resolve on.

should have been fixed by 1c78b7305