diff --git a/.eleventy.js b/.eleventy.js index 944a4a7..c3767e3 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,11 +1,11 @@ module.exports = function (eleventyConfig) { // Set custom directories for input, output, includes, and data eleventyConfig.addPassthroughCopy("src/style.css"); - eleventyConfig.addPassthroughCopy("src/assets/*"); + eleventyConfig.addPassthroughCopy("src/assets/**"); eleventyConfig.setFrontMatterParsingOptions({ excerpt: true, // Optional, default is "---" - excerpt_separator: "", + excerpt_separator: "" }); // add `order` front matter to each pattern to sort them (lower values firts) diff --git a/package.json b/package.json index 4149c63..fb55ef9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", "start": "npx @11ty/eleventy --serve", "build": "npx @11ty/eleventy" }, diff --git a/src/assets/skeletal_design_perception_time_diagram.svg b/src/assets/skeletal_design_perception_time_diagram.svg new file mode 100644 index 0000000..92a9279 --- /dev/null +++ b/src/assets/skeletal_design_perception_time_diagram.svg @@ -0,0 +1 @@ +CONTENTANDLAYOUTCONTENTTASK COMPLETIONTASK COMPLETIONNAVIGATION STARTSLAYOUTTIMEWITH SKELETAL DESIGNNO SKELETAL DESIGNUSE OFCONTENTUNDERSTANDINGCONTENT STRUCTUREREDUCED PERCEPTION TIMESPEEDPATTERNS.COM \ No newline at end of file diff --git a/src/assets/skeletal_designs_diagrams/Artboard4.png b/src/assets/skeletal_designs_diagrams/Artboard4.png new file mode 100644 index 0000000..ded545e Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/Artboard4.png differ diff --git a/src/assets/skeletal_designs_diagrams/Artboard5.png b/src/assets/skeletal_designs_diagrams/Artboard5.png new file mode 100644 index 0000000..2ebbb7c Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/Artboard5.png differ diff --git a/src/assets/skeletal_designs_diagrams/Artboard6.png b/src/assets/skeletal_designs_diagrams/Artboard6.png new file mode 100644 index 0000000..aef9a69 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/Artboard6.png differ diff --git a/src/assets/skeletal_designs_diagrams/graybox_loaded.mp4 b/src/assets/skeletal_designs_diagrams/graybox_loaded.mp4 new file mode 100644 index 0000000..954b46f Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/graybox_loaded.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/owlboi.mp4 b/src/assets/skeletal_designs_diagrams/owlboi.mp4 new file mode 100644 index 0000000..dfe7dec Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/owlboi.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/owlboi2.mp4 b/src/assets/skeletal_designs_diagrams/owlboi2.mp4 new file mode 100644 index 0000000..60b7f3f Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/owlboi2.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/smol_spsd_loading_elements_example.mp4 b/src/assets/skeletal_designs_diagrams/smol_spsd_loading_elements_example.mp4 new file mode 100644 index 0000000..3d98000 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/smol_spsd_loading_elements_example.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/social_media_profile_load_skeleton_example.mp4 b/src/assets/skeletal_designs_diagrams/social_media_profile_load_skeleton_example.mp4 new file mode 100644 index 0000000..baa3e8e Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/social_media_profile_load_skeleton_example.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/speedpatterns_skeletal_design_layout_shift_example.mp4 b/src/assets/skeletal_designs_diagrams/speedpatterns_skeletal_design_layout_shift_example.mp4 new file mode 100644 index 0000000..4ee8a11 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/speedpatterns_skeletal_design_layout_shift_example.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example.mp4 b/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example.mp4 new file mode 100644 index 0000000..af79c9a Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example_320wide.mp4 b/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example_320wide.mp4 new file mode 100644 index 0000000..dd726b8 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/spsd_loading_elements_example_320wide.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_diagram_2image.mp4 b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_diagram_2image.mp4 new file mode 100644 index 0000000..3a6e412 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_diagram_2image.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_gray_boxes.mp4 b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_gray_boxes.mp4 new file mode 100644 index 0000000..4cf1310 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_gray_boxes.mp4 differ diff --git a/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_shorter_gray_boxes.mp4 b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_shorter_gray_boxes.mp4 new file mode 100644 index 0000000..fa56c05 Binary files /dev/null and b/src/assets/skeletal_designs_diagrams/spsd_social_media_feed_shorter_gray_boxes.mp4 differ diff --git a/src/patterns/dont_use_spinners.md b/src/patterns/dont_use_spinners.md new file mode 100644 index 0000000..6a2df9c --- /dev/null +++ b/src/patterns/dont_use_spinners.md @@ -0,0 +1,39 @@ +--- +layout: layout.njk +title: Don't use Spinners +tags: pattern +thumbnail: /assets/favicon.png +--- + +

Don't use Spinners

+ +

+Progress indication is sometimes needed for activities that can not be improved in terms of performance. + +While it is tempting to use a staple of progress indication, so called "spinner", it is unwise to do so as it has several problems: + +shape without beginning and end doesn't let user estimate completion time +animation resets direction after full rotation reinforcing its "infinite" nature further frustrating the user +provides no user feedback over what to expect next leaving user in suspense +Linear versions of infinite animated elements solve some problems of circular spinners, but do not really contribute much of the value anyway. + +The only message spinners convey is that you, as creator of the website is aware that your site is slow, but didn't want to do anything about it. +

+ +

+Solution +

+ +

+Deliberately design experiences that do progress indication without resorting to literal progress indicators. Do not let spinners to be used as a generic placeholder for speed design or developers will utilize it without even consulting product or design teams. + +Several techniques can be used as progress indication, see "skeletal designs" and "masking slowness with animation". +

+ +

+Existing blog posts, articles, videos +

+ +

+Mobile Design Details: Avoid The Spinner by Luke Wroblewsky +

\ No newline at end of file diff --git a/src/patterns/skeletal_designs.md b/src/patterns/skeletal_designs.md new file mode 100644 index 0000000..6a4e6e5 --- /dev/null +++ b/src/patterns/skeletal_designs.md @@ -0,0 +1,114 @@ +--- +layout: layout.njk +title: Skeletal Designs +tags: pattern +thumbnail: /assets/skeletal_design_perception_time_diagram.svg +--- +Technique introduced by Luke Wroblewsky and used by many sites, including Facebook's and LinkedIn's newsfeeds can be utilized to indicate progress and provide visual cue to what user should expect reducing cognitive load and user's frustration. + + +# {{ title }} + +Technique introduced by Luke Wroblewsky and used by many sites, including Facebook's and LinkedIn's newsfeeds can be utilized to indicate progress and provide visual cue to what user should expect reducing cognitive load and user's frustration. + +## In-Progress State + +This technique allows the *in-progress state* of the page to be helpful to user-experience, rather than a hinderance. + +Defining the in-progress state should be a delibarate part of the design process. + +## Why this is needed + +
+ +
+

This solves the problem of the empty screen: instead of having to wait for data to show up, the user can see visual cues and information about the page's content before the actual data has arrived.

+ +

These cues can be multiple things:

+ + + +

Why are zones important? +They allow users to do a first pass and understand the structure of the page ahead of time, which allows for easier navigation of the data once the page has fully loaded.

+ +
+ + + +
+ +This helps reduce cognitive load for users, which reduces the stress of taking in the site. By having the zones establish their dimensions and prupose at the beginning of the loaing process, and the final content filing in to that structure, the strain of the user to take in the whole is spread out over the loading time and thus reduced. As opposed to having to first wait and recieve no information, and then being hit by a large amount of information and struggling to get your bearings when you would want to start navigating already. + +### Reduced Perception Time +It is not just about the technical aspects of loading the page. With this method we reduce the perception time of the user. Without this technique, the user is unable to prepare for navigating the page, and when it finally loads all at once they must spend more time parsing it before they can use it. Whereas with this technique, the user can be prepared to navigate the page once fully loaded, and needs less time to get their bearings and start using the page. + +
+Diagram showing dirstribution of perception over loading time +
Diagram showing dirstribution of perception over loading time
+
+ +## Things to avoid + +
+
+It is critical to avoid layout shift once content loads. You want to make sure that the zones the users see before the page loads match the final layout. Otherwise users would have to make another pass to readjust to the page structure, defeating the purpose of having the zones during loading, and nullifying the advantages this would provide, namely the user having a map of navigation of the page. + +

+Cumulative Layout Shift (CLS) metric that is part of Core Web Vitals is a measure of layout shift and is useful for tracking it for both skeletal designs and during regular page load. +

+
+ + + +
+ +### Wave-ey Gray Boxes + +
+ +
+Unfortunately, it became common practice to use a simple to build but not good solution of pulsating gray boxes which occupy the space of the page but do not always set the exact dimensions of the layout. + +In some cases the exact dimesnions are in fact unknown, but in many cases we can know the layout up-front. As such, designers should analyze the content of the page to set dimensions that are known, instead of defaulting to generic solutions or placeholders. + +One common exception to this are social media feeds, where we cannot know what *type* of content will be in the feed. + +This unfortunate technique was popularized by the need to solve this issue on social networks, which then became taken as standard practice when it should have remained an exception. + +
+ + + +
+ +An alternative solution to the gray boxes in this particular case might be to progressively load content without having any skeleton structure. This will show the progress of the page loading by the content appearing on the screen in order, and will not require additional cognitive load to redo the users understanding of the page structure. + +### Do not delay content! +Needless to say, that skeleton design should only be used when it is necessary to wait for additional content and there is not technical solution for loading the data faster. + +DO NOT artificially create this multi-step process. + +Spend time investigating technical solutions to load content faster. Only use skeletal designs if there is no alternative. + +## Examples and Solutions + +Designers and Engineers need to spend time thinking of the in-progress state of the page. + +Using different backround color for zones when using skeletal design loading is a good way to establish zones and their purpose when nothing else, such as textual labels or actual content, is known ahead of time about them. + +In particular, this is useful for spaces that will be occupied by images, as image resources inherently take time to load over the network. + +## Resources + +* [Mobile Design Details: Avoid The Spinner](https://www.lukew.com/ff/entry.asp?1797) by [Luke Wroblewsky](https://lukew.com/) diff --git a/src/style.css b/src/style.css index 55643ea..7730bbe 100644 --- a/src/style.css +++ b/src/style.css @@ -6,6 +6,35 @@ margin-right: 0.5em; } +.textimagepair { + display: flex; + flex-direction: row; + gap: 1em; + padding: 2rem; + background-color: #fff4de; +} + +@media screen and (max-width: 110em) { + + .textimagepair { + flex-direction: column; + } + + .textimagepair video { + margin-left: auto; + margin-right: auto; + } + +} + +.callout { + background-color: rgb(255, 241, 185); + border: solid 0.1em rgb(255, 223, 96); + border-left-width: 1em; + padding: 1.5em; + border-radius: 5px; +} + header span { display: flex; align-items: center; @@ -111,6 +140,7 @@ main { #homepage .speed-pattern img { max-width: 100%; + max-height: 10em; } @media screen and (min-width: 75em) {