Story
As a reader, I want Page Previews to use as little data as possible so that it loads faster and is less costly.
Acceptance Criteria
- moment.js and its traces are removed from the codebase.
- The last updated date does not appear on a preview.
- The cog is placed on the right for LTR previews (see the mock below).
- The cog is placed on the left for RTL previews.
Mocks
Background (by @Jdlrobson)
Remove the use of moment. 48.8kb simply to render the line "Edited 33 minutes ago" is unacceptable. Consider using the library in MobileFrontend and i18n messages which are considerably smaller.
On a clear cache, after gzipping, Page Previews increases the page JS from 192kb to 222kb. It's only 207kb without the moment library.
Removing this code would improve the load time of the first hovercard, making them feel much more responsive to an end user.
We use a technique in MobileFrontend to achieve the same goal for a lot fewer bytes. I would recommend we leverage that.