In this post, we explain what the root cause for the Medium issue with a shown date at the Stat widget boundary is.
I cross-post Tentamen WordPress blog posts to Medium. As the official Medium plugin for WordPress does not work, I need to do it manually using import story feature from Medium. Since I am on the Medium site, I check story statistics. Story statistics show for last week the total number of Views and Reads of my stories. I noticed an issue for the date of May 10.
In the above image, you can see May 1 instead of May 10.
Let’s explore the root cause. I used Chrome developer tools, Inspect feature. The easiest way to use it is to right-click on element page and select in menu Inspect option:
We can see that the Stats chart is an SVG HTML element. What is SVG HTML element for [source]:
- SVG stands for Scalable Vector Graphics
- SVG is used to define graphics for the Web
- SVG is a W3C recommendation
Instead of the Raw image, SVG has instructions for Browsers on how to draw Stats Widget. We see that in SVG, we have the correct date, May 10.
This issue occurred because a developer or a tester did not try the scenario with data that occupies a maximal possible size. In this case, a two-digit day. As a medium tester, I would also do the scenario when the month has the longest name, September.
Stat SVG Widget size is to small for end of week dates with the most extended length. If only day issue was resolved, the same problem would pop up for June (most extended than May), and definitely in September. I went to the past, and here is February bug:
We can simulate September by entering it in Inspect Element:
Double-click on date value, enter September, and hit enter.
Today look at the stats show full May 10:
- What is SVG
- How to use Chrome Inspect tool
- Scenarios for showing dates with the largest length.