amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Provide option to update amp-live-list without user interaction

Open ericlindley-g opened this issue 10 years ago • 14 comments

Adding a bug to track the request to enable automatic updating of amp-live-list without user click/interaction

Behavior: Developer has the option to designate amp-live-list elements individually to "auto-update", potentially via auto-update attribute on amp-live-list

On amp-live-list elements designated for "auto-update", instead of showing update button and waiting for user interaction to insert content, always insert this content, and adjust scroll accordingly to keep the viewport on the content the viewer was looking at before the update (i.e. if the user was looking at update number 14 when update number 15 comes in, 14 shouldn't scroll out of view: 15 should seem to appear above 14)

ericlindley-g avatar Aug 15 '16 19:08 ericlindley-g

should we have any UX restrictions on when this should happen? or can we just insert at any time?

erwinmombay avatar Aug 16 '16 18:08 erwinmombay

I think it should happen as soon as the polling takes place -- basically, as soon as the data is available.

My use case: I'd like to use it in a "Breaking News Bar" type of situation. The best UX in this case would be to have the information display ASAP. I'm picturing a fixed element set near the top of a screen that updates accordingly -- personally, I wouldn't be concerned with wherever the user was on scroll, since I want them to have access to that information at all costs.

maddoxnelson avatar Aug 17 '16 03:08 maddoxnelson

I think this is ok as long as we try to anchor the scroll position to avoid jumps when a user is reading. We probably need to be pretty smart about this, e.g. don't anchor scroll position of 0, but anchor any other.

I assume we'd still want some visual indication that new items are available?

dvoytenko avatar Aug 17 '16 17:08 dvoytenko

@edlea-g as UX FYI

Agreed with @maddoxnelson that we should think about the best way to get content to users ASAP. And agreed w/ @dvoytenko that it will be important to figure out the scroll position logic.

I think this will need some UX thought, due to some edge cases. For instance, if the top of amp-live-list is in the center of the screen, do we scroll down so that amp-live-list stays in the same position relative to the viewport (and the content above it jumps), or * not * adjust scroll in order to keep the content above amp-live-list in the same position relative to the viewport (and amp-live-list jumps)?

Let's think about some logic for this kind of case. May require some UX research to get the mechanic right, here. It may also be good to include a play/pause button for users to have some control, since something in the viewport is going to be jumping, and we can't be 100% sure that the user isn't reading it at that moment.

Regarding @dvoytenko 's question above:

Options for visual indication that new items are available include:

a) keep the same logic for amp-live-list as implemented now, and apply a class to new items that developers can style, as well as an update button

b) same as (a), but hide the button when the user scrolls the top of the newly updated amp-live-list into view (and don't show the button at all if the top of the newly updated amp-live-list is already in view after the update)

c) keep the class in (a), but don't show the button if the top of amp-live-list is in the viewport at update time

d) keep the class in (a), but don't show the update button at all

I favor (b) or (c) above, since publishers can already get (d) by setting the update reference point to display:none if they want to (is that true? or would they need to use visibility:hidden or a different tactic?), and (a) creates situations where users may want press the button simply to get it out of their way, even when they're already looking at new updates

ericlindley-g avatar Aug 17 '16 17:08 ericlindley-g

I presume this wouldn't run if the browser tab wasn't visible? (battery life, data usage) How often would it update?

Any chance of getting this before the US elections? There would be strong interest from most of our network for being able to do live election updates.

jpettitt avatar Aug 19 '16 04:08 jpettitt

The fixed case is a bit special and I wonder if we should also process it specially as well. amp-live-list is intended more for page-wide changes. This sounds more like a toast or notification feature.

dvoytenko avatar Aug 19 '16 15:08 dvoytenko

@dvoytenko Agreed that the fixed use case is a bit different. @maddoxnelson, do you have an example page where the use-case you describe has been implemented?

@jpettitt Publishers specify the polling interval, which determines how often amp-live-list updates

And while there's no timeline yet for the feature for the "update amp-live-list without user interaction" feature, the PR to remove the experiment guard on the amp-live-list component itself was checked in this week. The component supports live blogs and other live-updating content (blog post here, documentation here)

ericlindley-g avatar Aug 19 '16 16:08 ericlindley-g

@ericlindley-g @jpettitt that is already the case, the components manager does not do any polling when tab is not in focus, but will issue one right away when refocused

erwinmombay avatar Aug 19 '16 16:08 erwinmombay

@erwinmombay Got it—updating my response to fix

ericlindley-g avatar Aug 19 '16 16:08 ericlindley-g

/cc @cramforce

dvoytenko avatar Aug 30 '16 21:08 dvoytenko

Polling for a secondary use case like this is certainly not a good thing for users. It would drain the battery way too quickly. The trade off is different on an actual live blog where one expects actual new things to come.

I think here the better mechanism is to provide for a mechanism for users to sign up for push notifications and use those instead.

cramforce avatar Aug 30 '16 23:08 cramforce

Is this still being considered? We've implemented <amp-live-list> support for liveblogs for The Verge. The user having to tap on the update button goes against their expectations.

apple wwdc 2017 keynote live blog - the verge 2017-06-05 12-50-19

luigi avatar Jun 05 '17 16:06 luigi

Hi Luigi — this feature is still being considered. I believe getting it implemented is mostly a question of prioritizing the change relative to the other work for the team. (cc/ @erwinmombay )

If anyone in the community is interested in implementing it — one basic guarantee we'd have to make is that content in the viewport won't be reshuffled when new updates come in.

ericlindley-g avatar Jun 05 '17 19:06 ericlindley-g

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 29 '20 19:12 stale[bot]