Retain last scroll position and selected widget when going back to screens or blocks from an action
63
Views
3
Comments
New
Service Studio

Hello,

Please provide a way to retain the last scroll position and selected widget when going back to screens or blocks from an action.

I have been developing for most of the time and just recently cannot ignore this inconvenience of scrolling back and forth from the widget position on the screen specially when the screen or block has a huge amount of content that needs to be scrolled to get to the widget you want to update.

By default, after going back from the screen or blocks the scroll position just resets at the top.

what do you mean exactly with 'from an action'

  1. no screen flow but for example refreshing the list that you have scrolled down in ?
  2. flowing to current screen at end of action ?
  3. going to another (detail) screen and coming back with flow to previous ?
  4. going to another (detail) screen and coming back with explicit flow ?
  5. going to another (detail) screen and coming back with the browser back button ?
  6. all of the above ?

a.f.a.i.k. for options 1, 3 and 5, you don't get automatically thrown back to the top of the page.

For the cases 2 and 4, where you do get thrown back to the top, by design, if this is really not what you want, have you looked at remembering the position (maybe as a client variable) and get back to it with 'scrollToElement' ?

My advice would be to try and end up in options 1 or 3 and not go against the design for options 2 or 4, as that brings a whole lot of extra management, for example, how do you make sure this 'i want to scroll back to THIS position' doesn't outlive it's intended lifespan, and the user gets pushed down to a lower element on the page hours later because a previous interaction didn't conclude as designed and there is a lingering 'scrollToHere' variable.


Hi Dorine,

Thanks for the detailed response.

To clarify, I'm referring to the ODC Studio, not the application's runtime behavior.

The scenario is when editing a Screen or Block that contains a large number of widgets. If I open an Action (or another Screen/Block) from a widget and then navigate back, ODC Studio resets the editor to the top of the Screen/Block instead of returning to the last scroll position and the widget I came from.

What I'm suggesting is for ODC Studio to remember the editor state (scroll position and selected widget) during that navigation, so developers can continue where they left off without having to manually scroll through a long Screen or Block again.

This would only apply within the current editing session and wouldn't need to persist beyond that, so there shouldn't be concerns about stale scroll positions or state lingering after the intended navigation.

aaah, ok, i read that completely wrong.