ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

[AMP-STORY] Adding amp-date-countdown to the amp-story framework #38432

Open edoudou opened 2 years ago

edoudou commented 2 years ago

Description

It already exist in amp : https://amp.dev/documentation/components/amp-date-countdown-v1.0/?format=websites

We already had request for this feature, and it fits perfectly the use case of stories.

Alternatives Considered

We could considered coding another countdown specially for stories, but it seems pointless not to use the one that already exist.

Additional Context

No response

mszylkowski commented 2 years ago

More context: amp-date-countdown-0.1 seems to work well when added into a story (so the integration would be easy, we just need to make it valid). It allows you to make a design from a template that contains a countdown in text (which can be styled however you want).

v1.0 I think is still experimental, but v0.1 worked well when I briefly tested it (and it's also smaller in size).

newmuis commented 2 years ago

I think 1.0 represents the bento version of the component, which is incompatible with stories, but cc @alanorozco to confirm

edoudou commented 2 years ago

I guess the 0.1 version would be enough then.

newmuis commented 2 years ago

@edoudou would you be able to handle making the validation change? It would involve adding AMP-DATE-COUNTDOWN to the various descendant_tag_list allowlists in validator-amp-story.protoascii

edoudou commented 2 years ago

@edoudou would you be able to handle making the validation change? It would involve adding AMP-DATE-COUNTDOWN to the various descendant_tag_list allowlists in validator-amp-story.protoascii

I can take a look tomorrow.