Problem/Motivation
Split from #2921810: Allow TimestampFormatter to show as a fully cacheable time difference with JS. Postponed on #2921810: Allow TimestampFormatter to show as a fully cacheable time difference with JS.
As #2921810: Allow TimestampFormatter to show as a fully cacheable time difference with JS has extended TimestampFormatter to allow "timeago" representation using JS and making it in this way fully cacheable, we should consider the deprecation of TimestampAgoFormatter plugin and its removal in Drupal 9.
Pros for deprecating:
- The new "timeago" option from
TimestampFormatterallows full caching whileTimestampAgoFormatterassures only a max-age caching. - Non HTML consumers (for REST or non-HTML views) are getting outdated data like a
max-agecached 'time ago' interval? That has no value for a service consumer as it has no value for a user that reads a HTML in the browser. - Deprecated doesn't mean it will not continue to work. The formatter will be available for the entire life cycle of Drupal 8.x. However, deprecating it will tell the consumers to update their client software and compute themselves the interval.
Cons:
- Non-JS browsers will receive a date formatted value rather than an interval.
- Formatters get used in other places (Views outputting something other than HTML, REST, etc).
Proposed resolution
- Discuss the opportunity.
- Do it if the answer is YES. How to deprecate a plugin: https://www.drupal.org/core/deprecation#how-plugin
Remaining tasks
None.
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Comments
Comment #2
claudiu.cristeaIS update.
Comment #12
catch