function request

1 view
Skip to first unread message

Matic

unread,
Apr 8, 2008, 8:13:27 PM4/8/08
to OpenSocial and Gadgets Specification Discussion
Hello,

I would like to be able to scroll to the top of the window using an
opensocial call (only allowed on canvas pages). Right now, I can only
scroll to the top of the iframe my app is housed in.

The reason is for situations where I have a long page and a user
changes their page, it stays down at the bottom with their data
showing at the very top. They believe they are at an empty page.

The reason I would like to scroll to the top of the window rather than
the top of the iframe is for cosmetic reasons. It simply looks more
natural, especially on the myspace platform.

Thanks.

--Troy

John Hjelmstad

unread,
Apr 11, 2008, 10:55:20 AM4/11/08
to opensocial-an...@googlegroups.com
Could you give more detail on the sort of page changes occur through an OpenSocial app whose results would show up higher (above-the-fold as it were) on the page?

I'm not convinced that container-mediated page navigation APIs are best suited to the OpenSocial namespace, since they're a pretty generic concept. I wonder if a new feature is a better solution.

John

Cassie

unread,
Apr 14, 2008, 8:30:31 AM4/14/08
to opensocial-an...@googlegroups.com
It seems like this would best belong on gadgets.window. Perhaps
gadgets.window.scrollToTop = function() {};

We could put this under a new feature called "scrolling" or it could
perhaps be put together with one of the other windows methods like
dynamic-height. Dynamic height and set title only have one method each
as it is, putting them together under an umbrella "window" library or
at least starting in that direction might be a good idea.

- Cassie

Cassie

unread,
Apr 24, 2008, 12:14:47 PM4/24/08
to opensocial-an...@googlegroups.com
Would we like to see this go into the next iteration of the spec?
If so, I need some +1s.

- Cassie

Arne Roomann-Kurrik

unread,
Apr 24, 2008, 5:02:06 PM4/24/08
to opensocial-an...@googlegroups.com
What's the exact proposal here?  Is it just a new scrollToTop() call, or consolidating dynamic height, set title, and scrollToTop function under a new require feature="window" library?

~Arne
--
OpenSocial IRC - irc://irc.freenode.net/opensocial

Cassie

unread,
Apr 25, 2008, 7:20:29 AM4/25/08
to opensocial-an...@googlegroups.com
The proposal is an addition of the scrollToTop function in the windows namespace.
If we like that then the second question is which library is belongs in.

To be more clear:
1. Do we add scrollToTop?
2. Where does it go?

My answers:
1. +0, if other people think this is needed than it's fine with me, i don't feel too strongly either way
2. leave setTitle and dynamic-height alone for now. we should put it in a new feature either called "scrolling" or "window". (later we could perhaps migrate dynamic-height and settitle to "window" if we choose the latter)

I hope that helps somewhat.

- Cassie

Louis Ryan

unread,
Apr 25, 2008, 1:35:06 PM4/25/08
to opensocial-an...@googlegroups.com
Any MySpace folks have feelings on this given that Matic is justifying this in part based on experience with that platform?

Marco Ensing

unread,
Apr 26, 2008, 12:44:16 PM4/26/08
to OpenSocial and Gadgets Specification Discussion
Considering an Iframe, I can see this as a valid request to provide
functions that overcome these IFrame limitations. But maybe this
should be container specific?
> > --Troy- Hide quoted text -
>
> - Show quoted text -

Cassie

unread,
Apr 28, 2008, 8:55:29 AM4/28/08
to opensocial-an...@googlegroups.com
This thread has not received enough positive approval or consensus for the next spec iteration. It is now closed.

Marco - I highly recommend adding a container specific suggestion like you mentioned. If its usage gets very popular for developers this will be trivial to add to the spec later on. This way, Troy gets what he needs and we can see if this is something all containers need or perhaps is something specific to how myspace does things.

Let me know if there are any problems with this.
Thanks.

- Cassie
Reply all
Reply to author
Forward
0 new messages