serge-web / serge

Serious Gaming, Evolved - web interface
https://sites.google.com/deepbluec.com/serge/
Apache License 2.0
14 stars 4 forks source link

Buttons to collapse map bar panels #2890

Closed lebaphi closed 6 months ago

lebaphi commented 6 months ago

Fixes #2875

IanMayo commented 6 months ago

I like the UI/UX, but there seem to be some collapse issues @lebaphi

It looks like collapsed panels are shown as open when another one is collapsed.

screencast

lebaphi commented 6 months ago

I like the UI/UX, but there seem to be some collapse issues @lebaphi

It looks like collapsed panels are shown as open when another one is collapsed.

screencast [ ![screencast]

I see, it seems the method collapse (https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#panel) does not work as expected, I will take a look

IanMayo commented 6 months ago

Still not quite right @lebaphi

https://i.gyazo.com/b033cfcac0a4c9719987a1036f0e448e.gif

Tristina1788 commented 6 months ago

@IanMayo , @lebaphi Tested on '2875-collapse-button' branch, now collapse button show correct

https://github.com/serge-web/serge/assets/107697044/0fdded2f-cb41-4744-824a-2e98d3cb57c4

But I think it's better if collapse 'Propertive' should be on original position (top of this panel) instead of the bottom of panel.

image

Expected :

image

IanMayo commented 6 months ago

Yes @Tristina1788 - I agree. When all 3 panels are collapsed, I think they should be in a stack at the top of the column. The properties panel currently collapses down, but I think it should collapse upwards.

(I hope that makes sense @lebaphi )

lebaphi commented 6 months ago

thanks @IanMayo @Tristina1788 , actually, this function is not supported as default, we can only implement it to a certain level, it is complex to implement it perfectly. So what is your expectation? 😄

IanMayo commented 6 months ago

Actually @lebaphi - I realise that this is part of my issue. I thought the "props" panel wasn't opening and closing. It was working, but since nothing was selected, when open it didn't show anything.

If nothing is selected, could we still show (disabled) Cancel and Save buttons in the Props panel?

I'm happy to accept the Props panel collapsing down - that's just the bar giving as much v-space as possible to the Items panel.

Tristina1788 commented 6 months ago

Tested on '2875-collapse-button' , now when no item is selected, we can see Cancel and Save buttons (disable) in the Props panel .

image

It works as expected. (More details in this below video)

https://github.com/serge-web/serge/assets/107697044/474a0fe1-988a-46e8-9963-32548bfbe07b