{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/2745","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/2745/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/2745/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/2745/events","html_url":"https://github.com/ampproject/amphtml/issues/2745","id":144245718,"number":2745,"title":"Feature Request: `amp-table`","user":{"login":"jamespacileo","id":608868,"avatar_url":"https://avatars.githubusercontent.com/u/608868?v=3","gravatar_id":"","url":"https://api.github.com/users/jamespacileo","html_url":"https://github.com/jamespacileo","followers_url":"https://api.github.com/users/jamespacileo/followers","following_url":"https://api.github.com/users/jamespacileo/following{/other_user}","gists_url":"https://api.github.com/users/jamespacileo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamespacileo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamespacileo/subscriptions","organizations_url":"https://api.github.com/users/jamespacileo/orgs","repos_url":"https://api.github.com/users/jamespacileo/repos","events_url":"https://api.github.com/users/jamespacileo/events{/privacy}","received_events_url":"https://api.github.com/users/jamespacileo/received_events","type":"User","site_admin":false},"labels":[{"id":289496017,"url":"https://api.github.com/repos/ampproject/amphtml/labels/Related%20to:%20Content","name":"Related to: Content","color":"d4c5f9","default":false},{"id":284529946,"url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Feature","name":"Type: Feature","color":"bfe5bf","default":false},{"id":270720450,"url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Request","name":"Type: Request","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ampproject/amphtml/milestones/4","html_url":"https://github.com/ampproject/amphtml/milestone/4","labels_url":"https://api.github.com/repos/ampproject/amphtml/milestones/4/labels","id":1537240,"number":4,"title":"Backlog","description":"This milestone tracks issues that aren't currently prioritized for implementation.","creator":{"login":"rudygalfi","id":3888212,"avatar_url":"https://avatars.githubusercontent.com/u/3888212?v=3","gravatar_id":"","url":"https://api.github.com/users/rudygalfi","html_url":"https://github.com/rudygalfi","followers_url":"https://api.github.com/users/rudygalfi/followers","following_url":"https://api.github.com/users/rudygalfi/following{/other_user}","gists_url":"https://api.github.com/users/rudygalfi/gists{/gist_id}","starred_url":"https://api.github.com/users/rudygalfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudygalfi/subscriptions","organizations_url":"https://api.github.com/users/rudygalfi/orgs","repos_url":"https://api.github.com/users/rudygalfi/repos","events_url":"https://api.github.com/users/rudygalfi/events{/privacy}","received_events_url":"https://api.github.com/users/rudygalfi/received_events","type":"User","site_admin":false},"open_issues":264,"closed_issues":153,"state":"open","created_at":"2016-01-22T23:51:53Z","updated_at":"2016-12-20T19:08:29Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-03-29T12:13:57Z","updated_at":"2016-12-26T21:36:04Z","closed_at":null,"body":"It would be ideal to have an AMP optimised table element.\n\nOptimising tables for mobile is quite tricky and often the quickest solution is to eliminate these entirely from AMP pages.\n"},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/269243282","html_url":"https://github.com/ampproject/amphtml/issues/2745#issuecomment-269243282","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/2745","id":269243282,"user":{"login":"darobin","id":38491,"avatar_url":"https://avatars.githubusercontent.com/u/38491?v=3","gravatar_id":"","url":"https://api.github.com/users/darobin","html_url":"https://github.com/darobin","followers_url":"https://api.github.com/users/darobin/followers","following_url":"https://api.github.com/users/darobin/following{/other_user}","gists_url":"https://api.github.com/users/darobin/gists{/gist_id}","starred_url":"https://api.github.com/users/darobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darobin/subscriptions","organizations_url":"https://api.github.com/users/darobin/orgs","repos_url":"https://api.github.com/users/darobin/repos","events_url":"https://api.github.com/users/darobin/events{/privacy}","received_events_url":"https://api.github.com/users/darobin/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T21:36:04Z","updated_at":"2016-12-26T21:36:04Z","body":"So, having mulled this over I would be happy to take a stab at implementing this, but I'd like to make sure there's interest in the same functionality I'm interested in and hash out a few details first.\r\n\r\nThere is an [existing proposal for sortable tables](https://docs.google.com/document/d/11PGu3UO9kWPHYUKhI7PRdT73KR-J_1-A_hIqdmwkrMU/edit#heading=h.5wolfmbudvy3) but I think that's different. Sortable tables are regular (no colspan or rowspan, consistent types per column, typically vertical orientation, single-level headings, etc.) whereas arbitrary tables can have all of these. Trying to scale a sortable tables element to support any kind of crazy table would likely prove very counter-productive for everyone.\r\n\r\nIf we had `amp-table` it would wrap and _not_ replace HTML `table`. The HTML parsing rules for `table` and its content element (`\"in table mode\"`) are _very_ specific, so that if we wanted to replace `table` with `amp-table` we would likely also need to have `amp-tr`, `amp-td`, `amp-tbody`… None of that seems necessary or desirable.\r\n\r\nThe way I see this component working is basically that it would have a fixed height (being the \"natural\" height of the table it wraps — that ought never to change) and a width that is either fixed or fills the parent container. Then the table wrapped inside of it would be overflow-scrollable (from what I gather reading the carousel source, that is acceptable in the `amp-*` world, when it can't be avoided). Possibly we could add the nice touch of a scroll shadow (here is [one technique](http://lea.verou.me/2012/04/background-attachment-local/)).\r\n\r\nThis leads me to the conclusion that it is not so much an `amp-table` that is needed here but rather a more general `amp-horizontal-scroller`? Then again, it might be desirable to restrict to table content (because it's absolutely required there) to avoid abuse of the element.\r\n\r\nWDYT? Happy to start hacking on this."}}
{"actor":{"display_login":"darobin"}}