Fix 938 mobile sidebars#1337
Conversation
UV -> my dev
Mobile trigger moreinfo
…/universalviewer into fix-938-mobile-sidebars
…ormal panel open and full open
… leftpanel with isMetric
…o autoclose-mobile-thumbnails
…smisson/universalviewer into autoclose-mobile-thumbnails
demiankatz
left a comment
There was a problem hiding this comment.
See below for a few suggestions and TODOs.
In addition to those, I agree that we need to add logic to close any open panels when a new panel is opened at the small size, to prevent confusing overlaps. Is this something @jamesmisson would like to try, or would you like me to look into it?
| "feedback": "Feedback", | ||
| "fullScreen": "Full Screen", | ||
| "moreInfo": "More Information", | ||
| "toggleLeftPanel": "Toggle Left Panel", |
There was a problem hiding this comment.
I think this should be using the shorthand versions of everything for proper translation.
| "toggleLeftPanel": "Toggle Left Panel", | |
| "toggleLeftPanel": "$toggleLeftPanel", |
| "open": "$open", | ||
| "share": "$share" | ||
| "share": "$share", | ||
| "toggleLeftPanel": "Toggle Left Panel" |
There was a problem hiding this comment.
Same here:
| "toggleLeftPanel": "Toggle Left Panel" | |
| "toggleLeftPanel": "$toggleLeftPanel" |
| "open": "$open", | ||
| "share": "$share" | ||
| "share": "$share", | ||
| "toggleLeftPanel": "Toggle Left Panel" |
There was a problem hiding this comment.
...and here:
| "toggleLeftPanel": "Toggle Left Panel" | |
| "toggleLeftPanel": "$toggleLeftPanel" |
| "open": "$open", | ||
| "share": "$share" | ||
| "share": "$share", | ||
| "toggleLeftPanel": "Toggle Left Panel" |
There was a problem hiding this comment.
| "toggleLeftPanel": "Toggle Left Panel" | |
| "toggleLeftPanel": "$toggleLeftPanel" |
| "open": "$open", | ||
| "share": "$share" | ||
| "share": "$share", | ||
| "toggleLeftPanel": "Toggle Left Panel" |
There was a problem hiding this comment.
| "toggleLeftPanel": "Toggle Left Panel" | |
| "toggleLeftPanel": "$toggleLeftPanel" |
|
|
||
| if (this.isFullyExpanded) { | ||
| this.$element.width(this.$element.parent().width()); | ||
| //this.$element.width(this.$element.parent().width()); |
There was a problem hiding this comment.
Should this remain commented out, or can/should it be fully removed?
There was a problem hiding this comment.
Thanks @demiankatz, I missed this one. I'll remove it.
| "$feedback": "Adborth", | ||
| "$fullScreen": "Sgrin lawn", | ||
| "$moreInfo": "Mwy o Wybodaeth", | ||
| "$toggleLeftPanel": "Toggle Left Panel", |
| "$feedback": "Commentaire", | ||
| "$fullScreen": "Affichage en plein écran", | ||
| "$moreInfo": "Informations", | ||
| "$toggleLeftPanel": "Toggle Left Panel", |
| "$feedback": "Feedback", | ||
| "$fullScreen": "Pełny ekran", | ||
| "$moreInfo": "Więcej informacji", | ||
| "$toggleLeftPanel": "Toggle Left Panel", |
| "$feedback": "Feedback", | ||
| "$fullScreen": "Helskärm", | ||
| "$moreInfo": "Mer information", | ||
| "$toggleLeftPanel": "Toggle Left Panel", |
|
Thanks Jonathan this is really great. I have some non-functional UX/UI thoughts we can discuss when it gets to that stage (you're probably aware of these already):
Checked on an actual mobile, and it's vastly improved the UX! @demiankatz yes I can look into auto-closing the opposite panel when one is opened. |
|
Re the points above:
|
|
I've made the autoclosing adjustments in this PR: #1343 The issue of the thumbnail autoscrolling when selected is more in depth, but as it's barely visible now that the left panel content is hidden before the animation I don't think it's a priority. |
|
Thanks, @jamesmisson! Should @LlGC-jop just merge your branch from #1343 into this one, so we can close #1343? Also, who is the right person to address my outstanding review comments? Do we have translations in progress? Do you want me to take care of doing the search-and-replace to fix all those configs that need adjusting? |
|
Also, I see there are conflicts here now -- resolving these should be as simple as merging the dev branch into this branch, running |
|
Hi both, I based #1343 off of this branch so @LlGC-jop should be able to just merge it. @demiankatz there are translations for 'Open...' and 'Close...' in the comments here, but I'll need to fix the mechanism to adjust the labels according to the panel state before we can use them. I'll look at that today and make a new PR based on this one too. |
autoclose mobile panel if other panel opened
|
#1343 is merged in now. Lots of conflicts from those docs files - I seem to keep getting them as conflicts. Are they something that can be put in the gitignore? |
We need to commit them because they are used to publish the documentation to the website. There's probably a way to adjust things to make this less annoying, but it would require some changes to infrastructure (e.g. changing how we publish the website, changing the timing/behavior of GitHub Actions, etc.). |
|
This has all been merged into #1343, so I'm closing this to reduce confusion. |
Changes the layout of the left, center, and right panels to be controlled more via CSS + Media queries than the previous JS.
On larger screens they use a grid layout.
On mobile the center panel is full sized, with the left and right panels hidden off screen via transforms.
JS animations have been removed in favour of CSS transitions, with the timing of the transitions being controlled via CSS custom properties, the main one being set/overridden on the root html element where appropriate via JS, based on UV config.
Also includes work by @jamesmisson on new footer buttons to control the side panels and closing the left panel when a thumbnail is clicked on mobile.