Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Responsive grid UI #3227

Merged
merged 10 commits into from
Nov 17, 2022
Merged

FEATURE: Responsive grid UI #3227

merged 10 commits into from
Nov 17, 2022

Conversation

Sebobo
Copy link
Member

@Sebobo Sebobo commented Oct 14, 2022

What I did

Made the Neos UI more responsive and flexible. This also brings the following features and benefits:

  • Resizeable left sidebar
  • Resizeable document tree
  • Most positioning code could be removed
  • Restructured markup a bit and cleanup up related CSS

How I did it

Instead of having every ui layout component having absolute sizes and positions the base layout is now a CSS grid and each component has an area assigned. This way the whole layout can be controlled from the wrapping container.

How to verify it

  • Open the Neos UI and resize the left sidebar & document tree with the little resize icons in the bottom right.
  • Try fullscreen mode
  • Toggle the sidebars

Resolves: #3149

@Sebobo Sebobo added UI & UX Work In Progress Feature Label to mark the change as feature labels Oct 14, 2022
@mhsdesign
Copy link
Member

Nice ^^ thanks!

some related infos:

i guess this problem now intensifies: #2691

about #3149
as you said:

[...] the structure is a bit strange. The two trees are not proper siblings in the sidebar. When this is cleaned up it should also be easy to adjust their relative heights

@mhsdesign
Copy link
Member

fyi here is the slack thread (with video) https://neos-project.slack.com/archives/C0U0KEGDQ/p1665750470219249

@mhsdesign
Copy link
Member

mhsdesign commented Oct 23, 2022

Hi ;) i got around trying this out

simplescreenrecorder-2022-10-23_20.15.35.mp4

if found some issues:

  • there is now a white spot next to the discard button
  • one cannot foldout the content tree via dragging when its collapsed
    • solution A: change the react collapse to state to "open" somehow?
    • solution B: hide this css option via js, if collapsed
  • when trying to collapse the content tree too much another scrollbar is shown
    • solution A: change the react collapse state to "close" somehow
    • solution B: set a min-height which cannot be undercut when dragging (maybe max-height too ^^)
  • one can only start the drag in these exact corners
    • i guess this is a css limitation?

collapsing the sidebars, full-screen and secondary inspector is working fine (well without animation for now ...) ;)

simplescreenrecorder-2022-10-23_20.18.28.mp4

@mhsdesign mhsdesign self-requested a review October 23, 2022 18:28
@Sebobo
Copy link
Member Author

Sebobo commented Oct 26, 2022

This Chrome 107 news could help us with getting in animations again https://web.dev/css-animated-grid-layouts/

@Sebobo
Copy link
Member Author

Sebobo commented Oct 26, 2022

@mhsdesign thx for the review, I fixed the 3 points you mentioned.
The CSS resize feature is a bit limited. We might replace it later with some JS feature, but until we know what we want I prefer the native functionality. I'll check if we can style it somehow.

@Sebobo
Copy link
Member Author

Sebobo commented Oct 26, 2022

Here is also an example how to resize with JS as its apparently now possible to style the icon https://stackoverflow.com/questions/35702705/is-there-a-way-to-change-the-css-resize-corners-position

@mhsdesign
Copy link
Member

mhsdesign commented Oct 26, 2022

Thanks for fixing these things ;)

  • there is now a white spot next to the discard button
  • one cannot foldout the content tree via dragging when its collapsed (via: B: hide this css option via js, if collapsed)
  • (partially see below) when trying to collapse the content tree too much another scrollbar is shown

Hmm its not so well shown on video - but when the content tree is folded out the moving of the document tree is a bit laggier than when the content tree is hidden. The content tree itself is also quite smooth.

simplescreenrecorder-2022-10-26_15.26.38.mp4

One can fold the content tree to 0 height - but the js collapsed state is not changed. (Proposal: add a min-height or something)
Actually this is not a real problem :D

simplescreenrecorder-2022-10-26_15.31.29.mp4

i guess this problem now intensifies: #2691

;D

lets talk about a strategy to fix #2691 once and for all

maybe make it scrollable or break into two lines?

if i remember correctly the html structure up there is horrible :D

simplescreenrecorder-2022-10-26_15.34.27.mp4

@Sebobo
Copy link
Member Author

Sebobo commented Oct 26, 2022

Hmm its not so well shown on video - but when the content tree is folded out the moving of the document tree is a bit laggier than when the content tree is hidden. The content tree itself is also quite smooth.

No clue why, would need to check the browser performance tool

One can fold the content tree to 0 height - but the js collapsed state is not changed. (Proposal: add a min-height or something) Actually this is not a real problem :D

There is already a min-height of 40px which we could increase. I already though about setting it to ~ 120px to include the toolbar and the document node.

lets talk about a strategy to fix #2691 once and for all

maybe make it scrollable or break into two lines?

Scroll often doesn't work properly with various input devices.
I'll try breaking 🔨

@Sebobo Sebobo added this to the 8.2 milestone Nov 9, 2022
@Sebobo Sebobo marked this pull request as ready for review November 9, 2022 14:22
@markusguenther
Copy link
Member

Will check the pipeline, and we need a new version of @neos-project/eslint-config-neos for the code style

@markusguenther
Copy link
Member

Hmm not sure if I now break it but I can not resize the left side bar 🤷‍♂️
But the rest of the Backend looks nice :)

@Sebobo Sebobo self-assigned this Nov 17, 2022
Copy link
Member

@markusguenther markusguenther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome feature... thanks for that.
Tested locally on Firefox, Chrome and Safari 💙

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Label to mark the change as feature UI & UX
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Collapsible Document tree to make room for the Content tree
4 participants