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

add live-blog example #3741

Merged
merged 1 commit into from Jun 23, 2016

Conversation

erwinmombay
Copy link
Member

No description provided.

@erwinmombay
Copy link
Member Author

erwinmombay commented Jun 23, 2016

items should look like:

screen shot 2016-06-23 at 2 59 15 am

@erwinmombay
Copy link
Member Author

@cramforce @ericlindley-g PTAL

@cramforce
Copy link
Member

This is the best thing I've ever seen in my life.

return values[Math.round(Math.random() * (max - min))]
};
// Generate a 3 to 7 worded headline
var headline = bacon(range(3, 7));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a http://placekitten.com/300/350 to some of the entries at random?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericlindley-g
Copy link
Contributor

This is fantastic! (Random kittens also delightful)

Is there a way to put a user-visible time-stamp on each entry?

@erwinmombay erwinmombay force-pushed the amp-live-list-live-blog branch 2 times, most recently from 9f922e6 to 301d64f Compare June 23, 2016 15:18
@erwinmombay
Copy link
Member Author

@ericlindley-g done

screen shot 2016-06-23 at 8 18 14 am

@jaygray0919
Copy link

Would you point to the source code so we can follow an example?

@cramforce
Copy link
Member

LGTM

@erwinmombay
Copy link
Member Author

@jaygray0919 mind clarifying? not sure what you meant by "source code". thanks

@erwinmombay erwinmombay merged commit 982d902 into ampproject:master Jun 23, 2016
@jaygray0919
Copy link

poor choice of words ...
The sample code that is featured in your post: "items should look like".
Looking to purloin your example.

@erwinmombay
Copy link
Member Author

@jaygray0919 gotcha, the code generating new entries is here https://github.com/ampproject/amphtml/blob/master/build-system/server.js#L223 and the starting markup for amp-live-list is here https://github.com/ampproject/amphtml/blob/master/examples/live-blog.amp.html#L192 . feel free to ask more questions if this doesnt cover what you are looking for

@gigster99
Copy link

gigster99 commented Jun 24, 2016

TY @erwinmombay . Background: we have redesigned our site based on AMP and are migrating content now. We have one @Blog (https://schema.org/Blog) and ~ 30 @BlogPosting (https://schema.org/BlogPosting). One consequence of redesign is a new menu systems (old system based on JS and other non-supported AMP elements). How do you envision handling 30+ @BlogPosting? Should each be a link in an <amp-sidebar>?

We also are looking at this: https://github.com/erwinmombay/amphtml/blob/03a0670debea10f1f5f3e373e347d10f03fc6994/extensions/amp-live-list/amp-live-list.md
Is that the best documentation?

Final question: the sample has <button id="live-list-update-button" update class="button" on="tap:live-blog-1.update">You have updates</button>. How is this cleared when there is no update?

@ericlindley-g
Copy link
Contributor

@gigster99

I can tell you that <amp-sidebar> was created with the menu use case in mind, so you are likely to have success using it in that context, but I hesitate to give advice on what sounds like a UI design question (though please clarify, and feel free to point to a sample if I misunderstand).

That said, we tried to make that component as flexible as possible, so it can just scroll if there are 30+ items in there. And if you need to create expanding subsections in the menu to organize the information, you can use <amp-accordion> inside of <amp-sidebar>

As for the best documenation for <amp-live-list>, I tend to point people to those same docs on the master branch, but @erwinmombay may be able to speak to where the most reliable/up-to-date spot is.

The answer to your last question is that the button is not present by default, only appearing when there are updates that haven't been slotted into the page. When the user presses this button, the updates are slotted in, and the button should disappear automatically (unless its .amp-hidden class is overridden)

And one last note regarding schema markup: you will want to look at https://schema.org/LiveBlogPosting if you are marking up live blogs. We're starting to work that into our samples, as well.

@gigster99
Copy link

You blokes are very helpful - TY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants