web.dev icon indicating copy to clipboard operation
web.dev copied to clipboard

Allow posts to be merged but not go live until a certain date

Open rachelandrew opened this issue 4 years ago • 9 comments
trafficstars

It would be useful to be able to merge posts that are ready, but not show them live until a "live" date. This would mean that a scheduled release of content doesn't need someone ready to click the button on the day.

rachelandrew avatar Nov 18 '21 10:11 rachelandrew

I'm raising this on web.dev but it would be useful on d.c.c. too.

rachelandrew avatar Nov 18 '21 10:11 rachelandrew

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. To prevent this from happening, leave a comment.

stale[bot] avatar Feb 22 '22 00:02 stale[bot]

Closing this issue because it has been marked as stale for more than 7 days.

stale[bot] avatar Mar 10 '22 22:03 stale[bot]

I know that this is still a much-requested feature, so let's leave it open.

(I don't have a solution or anything, but it should be kept on our radar.)

jeffposnick avatar Mar 14 '22 14:03 jeffposnick

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. To prevent this from happening, leave a comment.

stale[bot] avatar Jun 13 '22 01:06 stale[bot]

Closing this issue because it has been marked as stale for more than 7 days.

stale[bot] avatar Jun 23 '22 00:06 stale[bot]

https://github.com/GoogleChrome/webdev-infra/pull/31 is some simple logic that would check the date field of an item against any time value in ms (presumably from Date.now()). If the date value is greater than the time value, then the item will be marked with draft: true.

I think that will give us the behavior we want—items that are marked as draft will be visible in local staging builds, but not visible in public production builds.

How does that sound? Once that other PR is merged, we can add the logic to each site's 11ty config.

jeffposnick avatar Jun 23 '22 16:06 jeffposnick

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To prevent this from happening, leave a comment.

stale[bot] avatar Sep 22 '22 03:09 stale[bot]

webdev-infra has stubs for this functionality and it is also implemented here:

https://github.com/GoogleChrome/web.dev/blob/main/src/site/_filters/is-live.js#L23-L46

It isn't documented in the handbook though and more granular control (hourly as constrained by the build schedule) would be desired.

matthiasrohmer avatar Sep 22 '22 13:09 matthiasrohmer

Closing this as we are moving to a new non-Github based platform. Our new issue tracker lives at https://issuetracker.google.com/issues?q=status:open%20componentid:1400680&s=created_time:desc

dstmarthe avatar Sep 01 '23 20:09 dstmarthe