Closed rviscomi closed 4 years ago
Edit: See https://github.com/HTTPArchive/almanac.httparchive.org/issues/237#issue-512661694 above for steps to embed data viz
After copy-editing is done I'll help out with this.
Regarding improving the mobile UX, I'm leaning towards the route of generating static images that display the individual values when possible (e.g., bar graphs). They'd resize well, may be quicker to implement, and give the benefit of being highly shareable.
Also assigning @paulcalvano to help with the data viz (thanks Paul!).
Some chapters rely only on images and/or data tables, so there might not be any charts to generate/embed but we still need to ensure that they use the figure
and caption consistently.
but we still need to ensure that they use the
figure
and caption consistently.
Yes I noticed tables in my chapter overflow on mobile whereas wrapping in a figure
overflows with scroll which is much better! Same with wide code snippets which need to have a class added: <pre class='code-block'>
@colinbendell FYI about our data viz process
I attempted to convert two static images using this process, but the embedded images don't display in markdown. The test I made was to use the following:
<iframe aria-labelledby="fig1-caption" width="600" height="371" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQNIyMEGYE_1W0OdFYLIKsxg6M3o_ZsTTuaX73Zzv6Alw4x4D6oH0jdg9BSgw-jy4E-MmX_Qaf-B98W/pubchart?oid=2052550005&format=interactive">
<div class="visually-hidden">Gzip and Brotli are the most common forms of text compression on desktop web pages.</div>
<figcaption>Figure 1. Compression algorithms on desktop pagers</figcaption>
</iframe>
</figure>
<figure>
<iframe aria-labelledby="fig2-caption" width="600" height="371" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vQNIyMEGYE_1W0OdFYLIKsxg6M3o_ZsTTuaX73Zzv6Alw4x4D6oH0jdg9BSgw-jy4E-MmX_Qaf-B98W/pubchart?oid=2012654579&format=interactive">
<div class="visually-hidden">Gzip and Brotli are the most common forms of text compression on mobile web pages.</div>
<figcaption>Figure 2. Compression algorithms on mobile pages</figcaption>
</iframe>
</figure>
You can see this at the end of the "Compression Algorithms" section in this fork - https://github.com/paulcalvano/almanac.httparchive.org/blob/master/src/content/en/2019/compression.md
Any idea what I'm doing wrong here?
After making changes to the markdown file you need to convert them to markup by running npm run generate
. More info in the readme.
Also your visually-hidden div is missing an ID corresponding to the aria-labelledby above. This was my fault, I omitted it from the example code. I've updated it and also added an example of an image figure.
I've updated https://github.com/HTTPArchive/almanac.httparchive.org/issues/237#issue-512661694 with canonical steps for data viz.
This is a mobile view of the old and new data viz processes. On top it's the iframe overflowing and on the bottom it's the image fallback for mobile. Much more legible!!
I can handle some of this tomorrow morning
On Fri, Nov 8, 2019, 18:16 Rick Viscomi notifications@github.com wrote:
I've updated #237 (comment) https://github.com/HTTPArchive/almanac.httparchive.org/issues/237#issue-512661694 with canonical steps for data viz.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/HTTPArchive/almanac.httparchive.org/issues/237?email_source=notifications&email_token=AAFHFS5M5PDH3NCOU4OU6ODQSX6N5A5CNFSM4JFHGAO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDTXMZY#issuecomment-552040039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHFS5DZGZTZMPSZ4FCG7TQSX6N5ANCNFSM4JFHGAOQ .
Hey everyone, I was able to finish adding data viz to the JavaScript chapter but sadly wont have time to help add the other chapters. Got to catch a flight in about 10 hours 💦
FYI noticed the fallback images for Security chapter don’t exist yet. It’s not ticked as done in first comment so may already be on your to do list, but it is published so thought best to comment in case you thought done.
Who could pick up the SEO chapter?
Who could pick up the SEO chapter?
The format of these might be changing if https://github.com/HTTPArchive/almanac.httparchive.org/pull/491 is accepted. So might be better to wait for a decision on that? Could do with more eyes on that if anyone else wants to help code review too?
Then again it's backwards compatible and easy to convert from old format to new so could just work on visualisations and then convert later depending on decision on https://github.com/HTTPArchive/almanac.httparchive.org/pull/491?
@rviscomi any reason this is still open? Third Party chapter looks done, or are you planning on adding more to this?
@bazzadp many of the data viz placeholders for the 3P chapter are commented out, but still outstanding. I need to chat with @patrickhulce about the data first.
@bazzadp many of the data viz placeholders for the 3P chapter are commented out, but still outstanding. I need to chat with @patrickhulce about the data first.
@rviscomi / @patrickhulce gentle nudge. Only see two comments about graphics for 5_11 and 5_12. We ever going to add those or shall we just say the chapter is as complete as it's going to get and close this issue?
Sorry, this slipped me. I would still love to resolve the data viz for this chapter. @patrickhulce let me know if you have time to chat. Or if you're happy leaving it as-is we can close this out.
Should we not at least add Figure 6 so the figure numbering is correct? Currently we jump straight from Figure 5 to Figure 7.
I'd still like to get the data viz resolved but the results don't align with the analysis AFAICT, so we need to chat with Patrick to get that resolved before we're able to add new figures. I closed this since there was no activity and it's about 6 months overdue.
All graphics in a chapter (charts, images, etc) should be manually wrapped in a
figure
element with a unique ID that is sequentially numbered. Allfigure
elements have afigcaption
that describes the contents of the figure, prefixed by the figure number.Interactive figures (embedded charts from Sheets)
Interactive figures should have a
visually-hidden
element for screen reader users. Level of detail here should be to convey the main visual takeaways of the chart but not overly descriptive. Add thearia-labelledby="fig1-caption"
attribute to theiframe
element and create a corresponding element to describe the figure.These figures must also have a corresponding anchor/image linking to a static version of the figure. They can reuse the same
visually-hidden
element for screen reader users. Images should have an explicit width equivalent to the iframe width.CSS will be used to ensure the interactive figure is shown to desktop users and the static figure is shown to mobile users.
Static figures (images)
Static images should be wrapped in an anchor tag to be expandable for users on small screens. Rather than a visually hidden descriptor images can simply use the
alt
attribute for screen reader users. Images should have an explicit width when possible.