Hylozoic / hylo-evo

Hylo UI
Apache License 2.0
36 stars 10 forks source link

error on custom view page #1651

Open cpolitano opened 2 months ago

cpolitano commented 2 months ago

Viewing this recently-created custom view results in a blank page with errors in the console.

Screenshot 2024-07-23 at 2 17 54 PM
tibetsprague commented 2 months ago

Huh, it’s working for me. Is it still not working for you?

On Jul 23, 2024, at 2:24 PM, Clare Politano @.***> wrote:

Assigned #1651 https://github.com/Hylozoic/hylo-evo/issues/1651 to @tibetsprague https://github.com/tibetsprague.

— Reply to this email directly, view it on GitHub https://github.com/Hylozoic/hylo-evo/issues/1651#event-13621734483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA5HJRSGD6TBYIWJZ6HI3ZN3CYRAVCNFSM6AAAAABLLHBWMSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGYZDCNZTGQ2DQMY. You are receiving this because you were assigned.

cpolitano commented 2 months ago

It does load now for me. But this is 100% a bug. I've seen it before. the first time a new view is created (this also happens with new chat channels) the page hits errors the first time someone tries to open it. In this Biofi case, it was reported by their community steward, so multiple people were experiencing it. It would be great to look into why this happens for new views.

thomasgwatson commented 2 months ago

If its only happening for a new thing, I would guess

tibetsprague commented 2 months ago

The easiest thing would be to just reload Hylo automatically when a new Custom View is created

On Jul 23, 2024, at 5:52 PM, Tom Watson @.***> wrote:

If its only happening for a new thing, I would guess

new thing is created in client and updates local-state optimistically that optimistic state needs something returned from the server or it actually is missing something when the optimistic but bugged state is used, it breaks (in this case, looks like its trying to look up a label property on a null/undefined entity) On reload, the server state (which is correct) is used instead and life is sweet and beautiful — Reply to this email directly, view it on GitHub https://github.com/Hylozoic/hylo-evo/issues/1651#issuecomment-2246651649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA5HNQZR47EDU4FRZZPMTZN33GHAVCNFSM6AAAAABLLHBWMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBWGY2TCNRUHE. You are receiving this because you were mentioned.

thomasgwatson commented 2 months ago

We kinda do that with posts; navigate to a PostDetail view that requests the new post straight from the server

On Tue, 23 Jul 2024 at 17:54, Tibet Sprague @.***> wrote:

The easiest thing would be to just reload Hylo automatically when a new Custom View is created

On Jul 23, 2024, at 5:52 PM, Tom Watson @.***> wrote:

If its only happening for a new thing, I would guess

new thing is created in client and updates local-state optimistically that optimistic state needs something returned from the server or it actually is missing something when the optimistic but bugged state is used, it breaks (in this case, looks like its trying to look up a label property on a null/undefined entity) On reload, the server state (which is correct) is used instead and life is sweet and beautiful — Reply to this email directly, view it on GitHub < https://github.com/Hylozoic/hylo-evo/issues/1651#issuecomment-2246651649>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAAA5HNQZR47EDU4FRZZPMTZN33GHAVCNFSM6AAAAABLLHBWMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBWGY2TCNRUHE>.

You are receiving this because you were mentioned.

— Reply to this email directly, view it on GitHub https://github.com/Hylozoic/hylo-evo/issues/1651#issuecomment-2246653069, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHT4AW56FAYQ2Q2SAQQGDTZN33MZAVCNFSM6AAAAABLLHBWMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBWGY2TGMBWHE . You are receiving this because you commented.Message ID: @.***>

thomasgwatson commented 2 months ago

Actually, I'm having trouble replicating this at all, even when creating new custom views.

I've tried creating custom views and then navigating to them from the group menu...

@cpolitano , can you share the specific inputs from the custom view you created that was bugged? There might be some specific field that is not happy.

cpolitano commented 2 months ago

It was a view setup to show all Request and Offers that are active. so nothing too crazy. if you look at the error it tells you the variable that is undefined on first load (that somehow later gets defined?)

thomasgwatson commented 2 months ago

The error tells us the property that was trying to be looked up on the undefined variable, not the variable itself. The property is label from the StreamViewControls. That gets looked up on the post type dropdown-selector. It doesn't give us a clear indication of why something is missing unfortunately.

I've tried recreating using those inputs and still no success in replicating. Can you detail the exact steps you take, in case there is something else that is missing from the recreation attempt? For example, after hitting save, I go to the group nav and select the custom view in question, to view it. Maybe you are accessing the custom view in a different way?

(this also happens with new chat channels)

Also, side-note, we did a fix for that months ago, as far as I can recall. Is it still happening?