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

Resizable Sidebar #5443

Merged
merged 1 commit into from
Oct 31, 2018
Merged

Conversation

quincylvania
Copy link
Collaborator

@quincylvania quincylvania commented Oct 28, 2018

Changes

  • The sidebar can be now be resized by dragging the divider (closes Resizeable / Responsive sidebar #3447)
  • Dragging the sidebar below a minimum size collapses it
  • A button in the top toolbar lets you uncollapse the sidebar, complete with icon and tooltip
  • Double-clicking the divider toggles the sidebar collapse
  • Collapse-toggling is animated
  • Selecting a feature or ending an add-feature mode auto-opens the sidebar
  • Photoviewer UI has been moved from init.js to photoviewer.js
  • The photoviewer now has a slight margin to set it away from the sidebar
  • The undo/redo, save, and progress indicator controls are now floated to the right
  • The save count has been redesigned to visually integrate with the save button
  • When the sidebar is collapsed, the mode buttons are centered
  • Full right-to-left layout support for all of the above

Uncollapsed
screen shot 2018-10-27 at 5 16 36 pm

Collapsed
screen shot 2018-10-27 at 5 16 52 pm

Resize and auto-uncollapse demo
full screen demo 1

Note
As you can see above, making the sidebar resizable took me somewhat beyond the scope of the original issue. Namely, I thought we could make better use of space in the top bar now that it can take up the full width of the window, so I moved some buttons to the right side. This caused the save count to be cut off, so I redesigned it to be incorporated within the button rather than outside it. I'm open to exploring other solutions if these changes are controversial.

…penstreetmap#3447)

- Dragging the sidebar below a minimum size collapses it
- A button in the top toolbar lets you uncollapse the sidebar, complete with icon and tooltip
- Double-clicking the divider toggles the sidebar collapse
- Collapse-toggling is animated
- Selecting a feature or ending an add-feature mode auto-opens the sidebar
- Photoviewer UI has been moved from init.js to photoviewer.js
- The photoviewer now has a slight margin to set it away from the sidebar
- The undo/redo, save, and progress indicator controls are now floated to the right
- The save count has been redesigned to visually integrate with the save button
- When the sidebar is collapsed, the mode buttons are centered
- Full right-to-left layout support for all of the above
@quincylvania quincylvania self-assigned this Oct 28, 2018
@quincylvania quincylvania added the usability An issue with ease-of-use or design label Oct 28, 2018
@quincylvania quincylvania added the wip Work in progress label Oct 28, 2018
@bhousel
Copy link
Member

bhousel commented Oct 31, 2018

This looks great @quincylvania 🎉
I love that you took the time to do separate LTR and RTL icons.

It looks like the loading spinner might be gone?
Aside from that I didn't see any major issues with the code, so let's just merge as-is and we can tweak it if we find any issues.

@bhousel bhousel merged commit 0baf3c2 into openstreetmap:master Oct 31, 2018
@quincylvania quincylvania removed the wip Work in progress label Oct 31, 2018
@quincylvania quincylvania deleted the resizable-sidebar branch October 31, 2018 20:59
@quincylvania
Copy link
Collaborator Author

@bhousel Thanks!! The spinner shouldn't be gone. I moved it to the left of the undo/redo buttons. I did add display: none to the fullscreen button so it won't take up space in the layout and since it wasn't shown anyway.

FYI: The reason I added the wip tag was that I wanted to give a little more attention to the top bar buttons, likely implementing #4356, but you're right that can be a future change.

@slhh
Copy link
Contributor

slhh commented Nov 1, 2018

I got the following issue with the current Firefox on Windows 10:
When making the sidebar very wide, iD gets into a state where undo and save buttons are out of view, even after making the sidebar smaller again. When the sidebar is collapsed, the buttons are fully visible. When the sidebare is very small, the buttons are partially visible.
This state is somewhat permanent. Restarting iD wasn't sufficient. I had to clear the browser cache to clear the error state.

I wasn't able to reproduce the error with Edge.

Btw, the delete and info buttons in the all tags section should not scale with the sidebar width to provide more space for tag values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability An issue with ease-of-use or design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resizeable / Responsive sidebar
3 participants