Closed RobTobias123 closed 3 months ago
Here's a guide on creating screenshots for the Docs if it helps: https://github.com/centrica-engineering/nucleus-docs/wiki/guide-screenshot
Proof of concept PR for review please: https://github.com/centrica-engineering/nucleus-docs/pull/664
Having tried 8 different techniques to create the optimal balance between image quality and file-size, the following process appears to have the best results:
Note that this method does not include optimising through TinyPNG or similar due to it appearing to over-compress the image and increase interpolation of pixels, resulting in a poorer quality image. Photoshop does a pretty god job of optimising the file anyway and the file-size, (if slightly larger than if Tiny'd) is still much smaller than a PNG or JPG whilst retaining a decent clarity and transparency.
This is the best overall balance for these guidance images, but may be adjusted on different image content such as if there are large gradients or photography.
It is the most accurate representation as screenshot is direct from coded version and uses only the node area for consistent white margins at a consistent size screenshot keeping everything in scale.
POC - PR with latest image created using the method above. https://github.com/centrica-engineering/nucleus-docs/pull/664
Epic PR created containing the following;
[x] Accordion PR: https://github.com/centrica-engineering/nucleus-docs/pull/664
[x] Action Link PR: https://github.com/centrica-engineering/nucleus-docs/pull/667
[x] Alert PR: https://github.com/centrica-engineering/nucleus-docs/pull/668
[x] Article PR: https://github.com/centrica-engineering/nucleus-docs/pull/669
[x] Calendar PR: https://github.com/centrica-engineering/nucleus-docs/pull/670
[x] Card PR; https://github.com/centrica-engineering/nucleus-docs/pull/671 (THIS is now obsolete and should be replaced with: https://github.com/centrica-engineering/nucleus-docs/pull/707
[x] Caveat PR; https://github.com/centrica-engineering/nucleus-docs/pull/672
[x] Column - no image reqd
[x] Content - no image reqd
[x] CTA PR: https://github.com/centrica-engineering/nucleus-docs/pull/673
[x] Date Time - no image reqd
[x] Download PR; https://github.com/centrica-engineering/nucleus-docs/pull/674
[x] Editorial - PR: https://github.com/centrica-engineering/nucleus-docs/pull/675
[x] Expander PR: https://github.com/centrica-engineering/nucleus-docs/pull/682
[x] Footer - no image reqd
[x] Frame - PR: https://github.com/centrica-engineering/nucleus-docs/pull/686
[x] Header PR: https://github.com/centrica-engineering/nucleus-docs/pull/677
[x] Icon - no image reqd
[x] Illustration - no image reqd
[x] Image - no image reqd
[x] Landmark - PR: https://github.com/centrica-engineering/nucleus-docs/pull/683 (but shows real images and text that may be considered more helpful as examples of the landmark types, instead of converting to placeholders and Hipster lipsum)
[x] Live PR: https://github.com/centrica-engineering/nucleus-docs/pull/678
[x] Lockup PR; https://github.com/centrica-engineering/nucleus-docs/pull/679
[x] Media Group - no image reqd
[x] Panel PR; https://github.com/centrica-engineering/nucleus-docs/pull/684 (updated but needs further mention of offsets in text.)
[x] Pill PR; https://github.com/centrica-engineering/nucleus-docs/pull/680
[x] Price - no image reqd
[x] Product Card PR: https://github.com/centrica-engineering/nucleus-docs/pull/681
[x] Progress PR: https://github.com/centrica-engineering/nucleus-docs/pull/685
[x] Skeleton - no image reqd
[x] Skyline - PR: https://github.com/centrica-engineering/nucleus-docs/pull/687
[x] Standout - PR; https://github.com/centrica-engineering/nucleus-docs/pull/688
[x] Tab - no image reqd
[x] Table PR: https://github.com/centrica-engineering/nucleus-docs/pull/689
[x] Tabs PR: https://github.com/centrica-engineering/nucleus-docs/pull/690
[x] Testimonial PR: https://github.com/centrica-engineering/nucleus-docs/pull/691
[x] Timeline PR: https://github.com/centrica-engineering/nucleus-docs/pull/692
[x] Timeline Event PR: https://github.com/centrica-engineering/nucleus-docs/pull/693
[x] Video - no image reqd
Form:
NSX:
Question about the use of the placeholder image we use for Video. As Docs is a public facing website, do we have permission to use this image? Could be subject to © copyright laws. Recommend that we replace with a British Gas image or ensure that it is considered 'in the public domain' /commons licenced to avoid the ricks - I mean risk.
Following conversation and initial review of these were looking Drew provided some good information on how we might improve with angled leaders etc. So here's what I've experimented with as a Figma component that allows reshaping/resizing without distortion of the label and includes 4 orientation points each with a pair of opposite curves. I've also included the brackets too. These can then be reused across any docs image. They now have 'lines' rather than shapes looking as lines so that they don't distort when modifying and the round end stays round etc. The colour and thickness of the line is the same as that around the existing label (2px #666666) which give a neutral colour than can be seen on both white and dark backgrounds. There's. small explanation on the component page.
As a proof of concept, I've applied the changes to 2 images - the ns-accordion and the ns-alert (which has a bottom oriented instance). hey can be seen in the relative PRs above. Let me know if you have any feedback...
Variants created:
Choose/switch type from list:
How it looks including simulated dark mode...
I also tightened up the vertical spacing so less overlap onto the transparency which was making leader look overly long on light mode.
With consideration to this morning's feedback that this is an improvement but could be further enhanced by increasing clarity/contrast on dark background, I have increased the line width by 1px and used #FF00CC as a more salient colour the grey (also less likely blend in with the brand colours of the component). This has the effect of increasing the endpoint slightly too. This can be seen in the example below for point A vs point B (original as above).
An alternative is X which takes the same style as B but uses the darker Slate for the leader and instead relies on a 2px white highlight that helps contrast on the dark background and cuts through what it overlaps.
Please let me know if you have feedback as to which you find clearer...
In terms of accessibility the pink leader of A conforms on white for graphical objects at 3.42:1 and on grey-light at 3.13:1. However, that may be problematic when over darker or more complex areas. My recommendation would be to use the style of X which uses Slate with a white highlight for optimal clarity.
New style variant is working well in both light and dark with sufficient contrast and clarity.
All current PRs have been updated to use the new style (above).
All PRs in epic are now ready for review. Please find the respective links above in https://github.com/centrica-engineering/nucleus-docs/issues/636#issuecomment-2239304904
Here are the comments from my review:
ns-card
ns-caveat
ns-cta
ns-frame
ns-header
ns-landmark
ns-live
ns-panel
ns-product-card
ns-tabs
ns-timeline
ns-timeline-event
ns-password
All approved PRs merged into the epic branch (except ns-header which has a question for the team)
I've added all the review comments I summarised in my comment above to the relevant image in the pull request.
Updated and sequence upto and including ns-landmark (see PRs on #697 ) - to be continued
I have reviewed the PRs that you've raised. Nice work!
I've added a comment to a couple of the PRs:
Updated #704 according to review comments.
Updated #703 according to review comments.
Thnaks for the further review and suggestions @andij - along with the updated image these have all now been committed and pushed to the PR for approval.
@RobTobias123,
I've approved your recent changes 👍
The following PRs are available to be merged into the epic:
Note: Here's a filter that will list all PRs with your epic as their base: https://github.com/centrica-engineering/nucleus-docs/pulls?q=is%3Apr+is%3Aopen+base%3Aepic%2Fconverted-guidance-images
All PRs merged to Epic
The last few outstanding comments to be resolved on the Epic PR:
All the above outstanding comments have been assessed, updated and marked as resolved. Please review and approve. PR #697
closing as completed
Outcome
Content guidance images on all docs to use transparent webps that work well on both white and dark mode backgrounds. Replacing the extra white that currently appears in the areas the pink labels reside. Enabling a better experience once dark mode is released.
Scope