Gutenberg 7.7 Ships Refreshed UI and First Iteration of Block Patterns

Last week, version 7.7 of the Gutenberg plugin shipped to users. In what is one of the more visually-striking updates in a while, the design team presented a refreshed UI. Users will also get their first chance to test the upcoming block patterns feature.

Some users may get a surprise. Gutenberg 7.7 is the first version of the plugin to ship the editor in fullscreen mode out of the box. This change will land in WordPress 5.4. Now is a good opportunity to see how it works before upgrading later this month.

Block developers can rejoice for the ability to create their own block wrappers. This is part of a change for creating a faster DOM. Inner blocks also produce a lighter DOM output, so the element tree in the editor now matches the front end. These changes make it easier for theme designers to style blocks without a convoluted mess of nested <div> elements.

Version 7.7 includes over two dozen bug fixes. It also includes a fix for the “View Posts” back button at the top of the editor while in fullscreen mode. Instead of an arrow button, which was confusing for users who thought it might return them to the regular editing mode, the team replaced it with the WordPress “W” icon.

A Fresh and Clean Editor UI

Screenshot of the UI of Gutenberg version 7.7.
Refreshed UI in Gutenberg 7.7.

It took a few days to grow on me after more than a year getting accustomed to the old UI. The basics are the same. The layout has not changed. However, the buttons and related elements have received a nice refresh.

The editor feels more professional. The block toolbar is simpler and cleaner. The Gutenberg team redesigned the icons. The color contrast makes everything crisper.

The block inserter now uses the full height of the editor. This is a large improvement over earlier iterations. It means less scrolling to find the right block, which has been one of my pet-peeves (I have fewer and fewer of these with each release).

This is a first pass over the new interface, and there is still more work for the Gutenberg design team to tackle. Work on the sidebar, dropdowns, and other elements is currently in progress and should land in upcoming plugin updates.

Overall, the UI is much more polished. The average WordPress user will not experience it until WordPress 5.5, but it is well worth installing and activating the Gutenberg plugin to give it a spin.

Early Work Toward Block Patterns

Screenshot of using block patterns in Gutenberg.
Inserting a pattern into the block editor.

Perhaps one of the most-anticipated Gutenberg features is the inclusion of a pattern library. A pattern is a collection of blocks in a predefined arrangement. For example, a common pattern is a large hero image with text and a couple of buttons laid over the top. Another common pattern is a set of three or four boxes aligned next to each other, each with a title, image, and text.

The more complex a particular layout, the harder it is to create from the editor without the know-how. That’s where patterns come in. They are a sort of “template” that allows end-users to quickly build out sections of content without the requirement of inserting the individual blocks.

Patterns will be a game-changer.

Some projects have already made solid attempts at something akin to patterns. ShareABlock’s community-based shared blocks and Gutenberg Hub’s copy-and-paste templates are good options for people who know about those projects. Users are even turning the reusable block system into faux patterns. However, few solutions will be able to compete with having a true Block Patterns API and exposing those patterns in the UI to end-users.

The new patterns feature in Gutenberg 7.7 is meant as a minimum viable product and not representative of what the feature will look like by the time it ships in core WordPress. At the moment, the UI is a new sidebar with a small sampling of patterns to choose from. However, patterns will likely be a part of the block inserter or exposed differently down the road. The goal is to ship something that works and iterate.

Currently, the team has bundled only four patterns:

  • Two Columns of Text
  • Two Buttons
  • Cover
  • Two Images Side by Side

While these particular patterns are not exciting, they are simple examples to begin testing the feature. The big question: what patterns should Gutenberg include by default? There is currently an open GitHub ticket to discuss and implement the possibilities. There are several proposals for commonly-seen patterns around the web. The ideal people to be involved with this discussion would be theme authors because they have been working closely and directly with users for years. With enough solid patterns in core, it would mean less code work in themes. Instead of building dozens of patterns to achieve modern layouts, theme authors could focus more on the design aspect of theme development.

In testing, the feature worked without issue. After selecting the patterns sidebar, you simply select the pattern you want, which is inserted directly in the content area of the editor. From that point, you can edit like any other block.

Patterns will certainly make the block editor far more competitive with page building plugins. More than anything, they will allow users to more quickly build layouts that often make for an overly complex and frustrating experience.

Right now, the pattern library is not included in the most recent roadmap update for 2020. However, I could see it making an official appearance in WordPress this year if work continues at its current pace. That is merely speculation, and perhaps a little hope, but this is one of the most exciting Gutenberg features in the works.

VRTCAL Announces New SDKs for Mobile Platforms

VRTCAL, a provider of a mobile SSP for publishers, app developers and brands, today announced the release of its SDKs for Android and iOS mobile devices, Self-Serve features, and Display Mediation services, putting the power into the hands of developers to improve efficiency, decrease costs, nimbly manage demand partners and mediation and ultimately increase revenues.

Stripe's Comprehensive API Reference Earns Editor's Choice Award for DX

If your organization provides APIs, whether internal or external, they need to be treated as products. In that spirit, the success of those APIs depends on how well your API developer portal can showcase and explain your APIs. Your API developer portal is where all the various stakeholders will go to learn everything possible about your API(s) and even your company. What makes for a world-class API developer portal?

Collective #597





The CSS Podcast

Una Kravets and Adam Argyle break down complex aspects of CSS into digestible episodes covering everything from accessibility to z-index.

Check it out






RedwoodJS

An opinionated framework that combines React, GraphQL, Prisma2, SQL, and lots more out of the box.

Check it out











Virtual Doom

In case you didn’t know about it: Virtual DOOM is a first-person 3D demo that uses the DOM as its render engine, no WebGL, canvas or SVG.

Check it out



Collective #597 was written by Pedro Botelho and published on Codrops.

Best Employee Scheduling Software

Managing your staff’s hours and shifts are both crucial to the success of your organization. The costs associated with scheduling issues can add up quickly.

Without the right tools, you could have too many workers on the clock at once or worse—not enough to meet demands.

Employee scheduling software makes everyone’s lives easier. It goes beyond just managing the daily and weekly schedules. There are options for your employees to request time off or shift changes that can be approved or denied in real-time.

Some software even has chat and employee messaging built-in.

Whether you have a startup, small business, or enterprise-level chain, the right scheduling software can streamline your HR efficiencies. I created this guide to help you find the best one for your organization.

The 9 Best Employee Scheduling Software of 2020

What’s the best employee scheduling software? After extensive research, I’ve narrowed down the list to nine options for you to consider.

  • Homebase — Best overall employee scheduling software.
  • Humanity — Best for shift trading and filling openings in real-time.
  • TSheets — Best for time-tracking and accounting integration.
  • 7shifts — Best employee scheduling software for restaurants.
  • Paycor Scheduling — Customized solutions for employee scheduling software.
  • When I Work — Best free employee scheduling software.
  • Deputy — Best for scheduling employees working at multiple locations.
  • Shiftboard — Custom solution for managing hourly workers.
  • CakeHR — Full-service HR software with employee scheduling.

Check out the in-depth reviews for each of these below. I’ll cover the features, benefits, costs, and any other considerations as we continue.

Employee Scheduling Software Reviews

Homebase

Homebase

More than 100,000 businesses trust Homebase for employee scheduling needs. For those of you with one location, you can even use Homebase for free.

The scheduling features in this software are simple and easy for anyone to use. You can build an employee schedule in just a few clicks with the drag-and-drop dashboard. The software will even help you track labor costs.

Set up alerts for when workers miss a clock-in or are close to hitting overtime. Your staff will get updates as well when schedules are released. They’ll also be alerted with reminders for their shifts.

In addition to the scheduling features, Homebase has a time clock feature and timesheets for payroll. Let your staff clock-in from any device, including your POS (point of sale) system.

Here’s a brief overview of the plans and pricing for Homebase employee scheduling:

Basic — Free

  • Unlimited employees
  • Online scheduling
  • Time clocks, breaks, and overtime
  • Prepare timesheets for payroll
  • Employee availability preferences and time-off requests
  • Team communication messenger

Essentials — $16 per month per location

  • Advanced scheduling
  • Auto scheduling
  • Late employee alerts
  • Availability approvals
  • Personal notes with shifts
  • Automated reminders to employees
  • Employee performance tracking

Plus — $40 per month per location

  • Sales forecasts and labor targets
  • Overtime alerts
  • GPS and photos
  • Prevent early clock-ins
  • Custom break and overtime settings
  • Time-off restrictions
  • PTO policies

All of the monthly rates are under the assumption that you sign up for an annual contract. Homebase does offer month-to-month plans for 20% more.

The Homebase mobile app is another reason why this scheduling software ranks so high on our list. It’s free to use for you and your staff. So everyone can view and manage their schedules on the go.

Humanity

Humanity

Humanity is one of the most popular employee scheduling platforms on the market today. It’s used by big companies like Microsoft, Kaiser Permanente, Nike, Yelp, Safeway, and Squarespace.

I’d recommend Humanity to businesses operating in industries with tight margins. This software gives you the capability to optimize your schedules in the most cost-effective way.

Use Humanity to ensure local, state, and Federal compliance in terms of labor laws for things like break frequency, hours worked, and time between shifts.

Humanity has an auto-scheduling feature that will optimize shifts by applying variables related to seniority and employee preferences.

One standout feature of Humanity is the ability for employees to trade shifts. Assuming the trade falls within your predefined rules, these requests can be automatically approved with limited supervisor involvement.

The Humanity mobile app makes it easy for you and your staff to manage shift needs in real-time. Managers can post open shifts for pickup and quickly find replacements for any absences.

Humanity integrates with top HCM software like Namely, BambooHR, ADP, and Workday.

Pricing for Humanity is very straightforward. There are two plans at the following annual rates:

  • Starter — $3 per month per user ($80 minimum)
  • Classic — $4 per month per user ($80 minimum)

You can also sign up for Humanity on a month-to-month basis. Those rates are $3.50 and $5 per user, respectively. But the short-term plans are subject to a $100 monthly minimum.

The Starter package comes with everything you need to manage employee scheduling. But for an extra $1 per month, the Classic plan comes with advanced features like:

  • Auto scheduling
  • Real-time labor and budgeting
  • Compliance
  • Reporting and analytics
  • Time and attendance
  • Geolocation clock-ins and clock-outs
  • Secure messaging

Overall, Humanity has everything you could need or ask for in an employee scheduling tool.

TSheets

TSheets

TSheets is run by QuickBooks, which ranks first on our list of the best small business accounting software. Just like QuickBooks, TSheets is a high-quality choice for employee scheduling from a reputable brand.

As the name employees, TSheets was made for employee time-tracking.

It’s a mobile timesheet where employees can clock-in and clock-out from anywhere. The app uses real-time GPS capabilities to hold your staff accountable for the hours they’re working. This is perfect for those of you who have a mobile workforce.

Employers only have access to GPS data when staff is on the clock, so it gives your workers the privacy and respect that they deserve.

In addition to the time-tracking features, TSheets also has exceptional tools for employee scheduling. It’s easy to create and assign shifts from your computer or smartphone with the drag-and-drop scheduler. You can also repeat schedules with one click.

TSheets allows you to schedule workers by the job as well. Create a new job by adding information for the day, time, and client. Then simply assign as many workers as you need to that job.

Employees will receive alerts for shift changes and job assignments. Everyone will have access to information from the intuitive TSheets mobile app.

Here’s a brief overview of the plans and pricing for TSheets:

Premium

  • $8 per user per month
  • $20 base fee per month
  • Free mobile app with GPS
  • Real-time reports
  • Alerts and notifications
  • Photo attachments
  • Time clock with facial recognition

Elite

  • $10 per month per user
  • $40 base fee
  • Project estimates vs. actuals reporting
  • Activity feed and messaging
  • Timesheet signatures
  • Geofencing

Both of these plans are available free with a 14-day trial.

TSheets integrates with other platforms like QuickBooks, Expensify, Gusto, Xero, Sage, Square, and more. This will help simplify your accounting process as well.

7shifts

7shifts

7shifts is an industry-specific solution. It’s an employee scheduling software designed for restaurants. More than 250,000 restaurants across the world use 7shifts.

With this software, you’ll be able to save time and reduce costs. Both of these are crucial to operating a restaurant at profitable margins.

Like most employee scheduling software we’ve seen, 7shifts has a drag-and-drop builder that makes creating schedules a breeze. The tool helps you factor in overtime, employee availability, and regional labor laws.

Your staff can access schedules via email or mobile app.

7shifts has built-in employee communication tools. There are group chats, direct messaging, announcements, and shift feedback features.

You’ll also have access to a weekly labor and budget tool, detailed reports, intuitive dashboard, and POS integration. All of this helps you manage your payroll system and bookkeeping as well.

7shifts is ideal for restaurants, both large and small. With multi-location support, you can manage employee scheduling at each place.

Let’s take a quick look at the plans and prices for 7shifts.

Appetizer — $19.99 per month per location ($215.88 billed annually)

  • Unlimited scheduling
  • Time clocking
  • Notifications
  • Time off requests and availability
  • Free mobile app

Entree — $43.99 per month per location ($479.88 billed annually)

  • Scheduling templates
  • Labor budget tool
  • Robust reporting

The Works — $76.99 per month per location ($839.88 billed annually)

  • Local labor compliance
  • Manager log book
  • Optimal labor tool (to predict staffing needs)
  • Shift feedback

Gourmet — $150 per month per location ($1,620 billed annually)

  • Enterprise-grade operational performance view
  • Auto scheduling
  • Integrated task management
  • Support and integration for POS

7shifts also offers a handful of optional add-ons:

  • Location overview — $5 per month per location
  • Task management — $12.99 per month per location
  • Sales data import — $100 one-time fee
  • Account setup — $150 one-time fee

Smaller restaurants can benefit from 7shifts’ free forever plan. You can have all of the basic scheduling features for one location and up to ten employees.

Paycor Scheduling

Paycor Scheduling

Formally Ximble, Paycor Scheduling is the perfect solution for optimizing the efficiency of your schedule. Managers can quickly go through the scheduling process while making optimal decisions for the business.

All of your staff will have clear visibility of their schedules in advance, so everyone stays well informed.

Paycor lets you create templates for faster scheduling. Just drag and drop employees to assign shifts in a few clicks. You can even automate how and when your staff goes on break to ensure that you’re fully covered at all times.

Your employees can proactively set day and time availability in advance. So you’ll be able to schedule around their needs and preferences.

Paycor Scheduling also has detailed reporting and analysis. This will provide you with details associated with the costs of overstaffing or understaffing.

Industries that can benefit from Paycor Scheduling include:

  • Education
  • Healthcare
  • Nonprofit
  • Manufacturing
  • Professional services
  • Retail

Paycor also provides additional products for recruiting, employee onboarding, HR, time and attendance, payroll, taxes, and learning management.

The company offers two different employee scheduling products; Paycor Scheduling and Paycor Scheduling Pro.

No prices for either are listed online. You’ll have to fill out a form answering some questions about your business to get a custom quote from a representative. This adds an extra step to the process, but it’s worth it for those of you who want a custom solution.

When I Work

When I work

More than 100,000 businesses across 50+ countries use When I Work for employee scheduling. This translates to over one million employees being scheduled on this software.

From small brands to large organizations like Dunkin Donuts, Ben & Jerry’s, Cold Stone Creamery, Jamba Juice, Massage Envy, and Verizon, When I Work is a top choice to consider.

Top features of When I Work include:

  • One-click scheduling
  • Shift coverage confirmation and notification
  • Schedule sharing
  • Labor forecasting
  • Overtime control
  • Schedule enforcement
  • Labor reports
  • Payroll integration

Compared to some of the other employee scheduling software we’ve covered, When I Work has one unique standout—its price.

When I Work has an exceptional free plan, and even the paid software is inexpensive.

Free — $0

  • One location and up to 75 users
  • Team scheduling
  • Team availability
  • Team messaging
  • Shift trading
  • Time off requests

Basic — $2 per user per month

  • Schedule templates
  • Multi-location support
  • Job sites
  • Overtime visibility

Pro — $2.50 per user per month

  • Auto scheduling
  • Labor forecasting
  • Shift and team tasks
  • Shift bidding

You can add-on time clocking and attendance to any plan for $2 per month per user.

Deputy

Deputy

Deputy is another well-known and trusted employee scheduling solution. It’s used in 200,000+ workplaces worldwide, including places like Amazon, Nike, NASA, Peleton, and Ace Hardware.

Let’s take a look at some of the top features of Deputy:

  • Auto scheduling
  • Break planning
  • Free mobile app
  • Schedule by skillset and qualifications
  • Cover leaves and unavailability
  • Manage overtime and fatigue
  • Monitor attendance
  • Legal compliance
  • Shift swapping

I’d recommend Deputy to larger businesses with multiple locations. It’s a top solution for managing employees that work across multiple job sites as well.

Some industries that Deputy commonly works with include healthcare, hotels, hospitality, entertainment, logistics, manufacturing, and retail.

Despite Deputy’s robust features and popularity, the software is surprisingly affordable.

Employee scheduling software starts at just $2.50 per month per employee. This is billed on a month-to-month basis. If you want to combine employee scheduling with timesheets and attendance, it’s $4.50 per month per user. Save up to 11% with an annual contract for the combo package. Deputy offers special prices for charities, nonprofits, and community organizations that meet special criteria.

You can try Deputy today by signing up for a free trial. No credit card required.

Shiftboard

Shiftboard

Shiftboard software has tons of features designed for optimizing your employee scheduling process. It has everything you need to keep managers running smoothly while providing your staff with the right information to do their jobs well.

With Shiftboard, you can easily assign the best and most qualified workers to specific shifts.

Improve your schedule communication and make last-minute changes when certain situations arise.

Shiftboard helps you enhance efficiencies by reducing overtime costs, forecasting demands, and automatically assigning workers to specific shifts. You’ll also have the ability to post open shifts for pickup and send group notifications to your team.

Another benefit of Shiftboard is the compliance rules. This will help you eliminate errors for things like labor contracts, seniority rules, mandatory rest periods, and employee credentials.

For example, an employee with expired credentials would automatically be blocked from the schedule.

The Shiftboard mobile app is easy for anyone to use. You and your managerial staff can manage everything on the backend while your employees can benefit from scheduling and alerts in real-time. Set up open shift trading or require approval from supervisors for trade requests.

Shiftboard plans start at $3 per month per user. There are three options for you to choose from:

  • Basic
  • Professional
  • Enterprise

Unfortunately, the pricing details for each plan are not specified online. You’ll need to request a  demo based on the needs of your organization to get an accurate quote.

CakeHR

CakeHR

CakeHR is a bit unique compared to the other options on our list. That’s because it’s a full-service HR software.

In addition to employee scheduling, CakeHR has solutions for:

  • Timesheets
  • Performance
  • Leave management
  • Expenses
  • Recruitment

Onboarding your employees and automating the HR process is simple. CakeHR provides tons of employee self-service tools and solutions.

Some of the top employee scheduling features include:

  • Interactive shift planning
  • Single site and multi-location support
  • Dedicated shift managers
  • Employee availability management
  • Mobile app access
  • Pre-defined shift templates
  • Daily, weekly, and monthly reports

Pricing for CakeHR is a bit different as well. Simply select the services you want, enter the number of active employees you have, and choose between monthly or yearly billing.

Your custom rate based on these features will automatically appear on the screen. So you don’t need to wait for a CakeHR sales rep to get back to you with a quote.

To give you some perspective on the price point, shift scheduling for 20 employees would cost $50 per month with an annual contract. Adding timesheets would bring that rate to $80.

How to Choose the Best Employee Scheduling Software For Your Business

With such an extensive list of options to choose from, finding the best employee scheduling software for your business can seem like a tall task. Fortunately, we have a methodology that you can use to narrow your search.

Business Size

The number of employees you have and the number of locations will have a strong impact on your decision. A company with ten employees at one store will have different needs than a business with 100 employees across six locations.

Industry

There are industry-specific solutions in the employee scheduling software market.

For example, if you own a restaurant business, 7shifts will be the best choice for you. Restaurant managers and owners have different scheduling needs than office jobs in the corporate world.

Mobile Access

The best employee scheduling solutions should come with a free mobile app.

You want to make sure the app has admin features for managing schedules, as well as employee features for viewing schedules and making requests. The best apps include alerts for both staff and managers.

For example, an employee could be notified about a shift change or shift opening. But a manager would get notified if someone is approaching overtime or didn’t clock-in for their shift.

Time Tracking

Most employee scheduling solutions include time-tracking tools as well. Since the two go hand-in-hand, it makes sense to get both from the same provider.

Some software has all-inclusive features for both scheduling and time clocks, whereas others offer time tracking as an add-on.

Price

Obviously, employee scheduling software is supposed to make your life easier. It’s supposed to improve operational efficiencies and reduce labor costs. But make sure you find a solution that fits within your budget.

Each software has a different pricing structure. There are lots of options that charge a monthly rate based on how many employees you have. Some of those are subject to monthly minimums.

Some solutions offer tiered pricing, while others have unlimited employees for each plan.

If you’re a smaller organization with basic scheduling needs, you can even benefit from free employee scheduling software.

Conclusion

Here’s a quick recap of the best employee scheduling software on our list:

  • Homebase — Best overall employee scheduling software.
  • Humanity — Best for shift trading and filling openings in real-time.
  • TSheets — Best for time-tracking and accounting integration.
  • 7shifts — Best employee scheduling software for restaurants.
  • Paycor Scheduling — Customized solutions for employee scheduling software.
  • When I Work — Best free employee scheduling software.
  • Deputy — Best for scheduling employees working at multiple locations.
  • Shiftboard — Custom solution for managing hourly workers.
  • CakeHR — Full-service HR software with employee scheduling.

Based on this guide, I’m confident that you can find what you’re looking for. No matter what type of business you have or what industry you’re in, there’s an option for you above.

How To Create A Web Design Style Guide

If you have a website that needs to be updated often, or that a lot of people will have a hand in maintaining or updating, it’s a good idea to have a web design style guide in place. This helps to ensure that everyone who deals with your site will be on the same page and understand how to keep everything looking consistent.

But what is a web design style guide, exactly? What does it entail? And how can you create one for yourself? Those are the questions we aim to answer right here.

Your Web Designer Toolbox

Unlimited Downloads: 500,000+ Web Templates, Icon Sets, Themes & Design Assets - starting at only $16.50/month!


 

What is a Web Design Style Guide?

Before we get into the specifics of how to create a style guide, let’s take some time to explore what they actually are. A web design style guide is a page on your website that outlines everything that goes into the creation of a new page or blog post on the rest of your site. This includes branded graphics, logos, fonts and font sizes, text and background colors, and anything else that pertains to site updates and content creation.

This is especially vital when you have more than one designer or developer working on your website. This ensures everyone stays on the same page. Plus, it actually streamlines development, as you can reference this style guide to create new content faster and more efficiently.

How to Create a Web Design Style Guide

Here are the steps you need to take to create a web design style guide for yourself:

1. Familiarize Yourself with the Brand

Whether you’re creating a style guide for your own website or for someone else, the same principle still applies: you need take time to assess what the brand is about. This means, understanding your target audience, knowing the values of the company, and have a solid idea of how this should be represented visually. If the company has done A/B testing for certain designs in the past, now is the time to leverage that info to create a more robust and more effective style guide.

2. Choose Colors

As you evaluate the brand, you’ll need to think of colors. If the company already has a palette they work with — perfect. Add the hex codes for the colors in the style guide. Be sure to break this information down into categories for text, links, hover links, backgrounds, buttons, etc. Make it clear what colors should be used where.

3. Select and Identify Typography

Along with colors you need to make it plain what fonts should be used (and where they should be used). Within your web design style guide, clearly identify the font names, sizes, and line height. This makes it super easy for future designers to recreate the appropriate look of your site. Better yet, create a Photoshop template that has these elements established as presets or identified as a note within the file itself.

Your every effort should be to eliminate the guesswork here.

4. Establish a Content Grid

Another thing you should add to your web design style guide is to create a content grid. This is the perfect way to identify how pages and blog posts should be laid out. Showcase where pictures and graphics should be positioned among the text. You really need this for understanding how your content should be spaced out.

Now, some of this can be taken care of by blog and page templates. Even so, it’s still a good idea to include that information in your style guide.

5. Set Photo Specifications

Another thing you can do is set photo specifications. Many websites will apply filters or effects on images they include in blog posts, for instance. So, if you want to ensure whoever is managing your site’s content knows how to keep everything looking consistent, you need to call out these specifics in your web design style guide.

Identify the specs each image should follow, including image height, width, color filters, opacity, and whether or not text should be added. Should you wish to include text on your graphics, be sure to call out the font, style, size, and color specs (as noted above) as well.

6. Logo Specifications

The last thing we’re discussing here that your guide absolutely must include is information about logos. A logo is perhaps the most identifiable part of your brand and website, which makes it super important to discuss here.

Logo specifications require including the minimum sizes as well as a variety of different logo styles. You should have a text option as well as a graphical one for small spaces. A logo with a tagline might be a good idea too for larger size options.

You should also provide logos with different backgrounds, including transparent. This way, your logo will look great no matter what background it’s sitting on. Each of these logo options should be included on the style guide page itself so they can be accessed and referenced quickly.

10 Awesome Web Design Style Guide Examples

Now that we’ve covered what should be included in your web design style guide, let’s take a look at some examples that really excel in showcasing how these guides can and should look.

Material.io

The Material.io style guide is comprehensive. It breaks down every aspect of what their website should look like. It includes information about themes, icons, color palettes, typography, shapes, and even sound.

Material.io - web design style guide

MailChimp

The MailChimp style guide is super straightforward, and that’s exactly what yours should aspire to achieve. It includes menu options on the left-hand side of the screen that you can select including color, data visualization, grid, type, buttons, dialogs, and more.

MailChimp - web design style guide

Lonely Planet

Lonely Planet offers another great web design style guide to reference. It prominently features a color palette, icons, UI components, JS components, widgets, and CSS utilities.

Lonely Planet - web design style guide

USWDS: The United States Web Design System

The United States Web Design System also provides a great style guide to reference. It includes the details for creating pages for most government websites, including utilities, page templates, and more.

USWDS - web design style guide

Yelp Styleguide

The Yelp Styleguide is even more to-the-point. It provides clear typography information, colors, layout info, links, buttons, navigation options, and more that make it easier for people working on Yelp to make pages and update content.

Yelp - web design style guide

A11Y Style Guide

Another style guide you may want to reference is the one put together by A11Y. This guide includes information about how to format cards, forms, media, navigation, and offers up some additional resources as well.

A11Y Style Guide

Barnard Levit Optometrists

Barnard Levit Optometrists has a super simple web design style guide that gets the job done. It provides full typography details, including headers, columns, and bullets, as well information about how to format tables, forms, and buttons. Additionally, it covers how to handle images, videos, and a number of other aspects of the website.

Barnard Levit Optometrists

Ben Brignell Styleguide

The Ben Brignell style guide is super aesthetically pleasing. It offers information about company colors (with hex codes), typography, blockquotes, bullets, buttons, links, videos, images, and so much more.

Ben Brignell Styleguide

Beeline Design System

The style guide on the Beeline Design System website is another great example to reference. It includes everything that all of the other style guides listed here have covered but adds on modal, notifications, and tabs for extra measure.

Beeline Design System

Ceasefire Oregon

Last on our list is Ceasefire Oregon. This style guide is another exceedingly simple one but don’t let its look fool you — it’s incredibly comprehensive. This guide covers stylesheets, colors, grids, utilities, icons, logos, masthead info, and more.

Ceasefire Oregon

Use This Info to Create a Web Design Style Guide

By now, you know what a web design style guide is. You know why you need one. You’ve learned how to put one together and you’ve seen some examples of the best currently on the web. Now it’s turn to turn that information into something practical. If your site is lacking a style guide, now’s the time to put one together.

Implementing Infinite Scroll And Image Lazy Loading In React

Implementing Infinite Scroll And Image Lazy Loading In React

Implementing Infinite Scroll And Image Lazy Loading In React

Chidi Orji

If you have been looking for an alternative to pagination, infinite scroll is a good consideration. In this article, we’re going to explore some use cases for the Intersection Observer API in the context of a React functional component. The reader should possess a working knowledge of React functional components. Some familiarity with React hooks will be beneficial but not required, as we will be taking a look at a few.

Our goal is that at the end of this article, we will have implemented infinite scroll and image lazy loading using a native HTML API. We would also have learned a few more things about React Hooks. With that you can be able to implement infinite scroll and image lazy loading in your React application where necessary.

Let’s get started.

Creating Maps With React And Leaflet

Grasping information from a CSV or a JSON file isn’t only complicated, but is also tedious. Representing the same data in the form of visual aid is simpler. Shajia Abidi explains how powerful of a tool Leaflet is, and how a lot of different kinds of maps can be created. Read article →

The Intersection Observer API

According to the MDN docs, “the Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document’s viewport”.

This API allows us to implement cool features such as infinite scroll and image lazy loading. The intersection observer is created by calling its constructor and passing it a callback and an options object. The callback is invoked whenever one element, called the target, intersects either the device viewport or a specified element, called the root. We can specify a custom root in the options argument or use the default value.

let observer = new IntersectionObserver(callback, options);

The API is straightforward to use. A typical example looks like this:

var intObserver = new IntersectionObserver(entries => {
    entries.forEach(entry => {
      console.log(entry)
      console.log(entry.isIntersecting) // returns true if the target intersects the root element
    })
  },
  {
    // default options
  }
);
let target = document.querySelector('#targetId');
intObserver.observe(target); // start observation

entries is a list of IntersectionObserverEntry objects. The IntersectionObserverEntry object describes an intersection change for one observed target element. Note that the callback should not handle any time-consuming task as it runs on the main thread.

The Intersection Observer API currently enjoys broad browser support, as shown on caniuse.

Intersection Observer browser support. (Large preview)

You can read more about the API in the links provided in the resources section.

Let us now look at how to make use of this API in a real React app. The final version of our app will be a page of pictures that scrolls infinitely and will have each image loaded lazily.

Making API Calls With The useEffect Hook

To get started, clone the starter project from this URL. It has minimal setup and a few styles defined. I’ve also added a link to Bootstrap’s CSS in the public/index.html file as I’ll be using its classes for styling.

Feel free to create a new project if you like. Make sure you have yarn package manager installed if you want to follow with the repo. You can find the installation instructions for your specific operating system here.

For this tutorial, we’re going to be grabbing pictures from a public API and displaying them on the page. We will be using the Lorem Picsum APIs.

For this tutorial, we’ll be using the endpoint, https://picsum.photos/v2/list?page=0&limit=10, which returns an array of picture objects. To get the next ten pictures, we change the value of page to 1, then 2, and so on.

We will now build the App component piece by piece.

Open up src/App.js and enter the following code.

import React, { useEffect, useReducer } from 'react';

import './index.css';

function App() {
  const imgReducer = (state, action) => {
    switch (action.type) {
      case 'STACK_IMAGES':
        return { ...state, images: state.images.concat(action.images) }
      case 'FETCHING_IMAGES':
        return { ...state, fetching: action.fetching }
      default:
        return state;
    }
  }
  const [imgData, imgDispatch] = useReducer(imgReducer,{ images:[], fetching: true})
  // next code block goes here
}

Firstly, we define a reducer function, imgReducer. This reducer handles two actions.

  1. The STACK_IMAGES action concatenates the images array.
  2. FETCHING_IMAGES action toggles the value of the fetching variable between true and false.

The next step is to wire up this reducer to a useReducer hook. Once that is done, we get back two things:

  1. imgData, which contains two variables: images is the array of picture objects. fetching is a boolean which tells us if the API call is in progress or not.
  2. imgDispatch, which is a function for updating the reducer object.

You can learn more about the useReducer hook in the React documentation.

The next part of the code is where we make the API call. Paste the following code below the previous code block in App.js.

// make API calls
useEffect(() => {
  imgDispatch({ type: 'FETCHING_IMAGES', fetching: true })
  fetch('https://picsum.photos/v2/list?page=0&limit=10')
    .then(data => data.json())
    .then(images => {
      imgDispatch({ type: 'STACK_IMAGES', images })
      imgDispatch({ type: 'FETCHING_IMAGES', fetching: false })
    })
    .catch(e => {
      // handle error
      imgDispatch({ type: 'FETCHING_IMAGES', fetching: false })
      return e
    })
}, [ imgDispatch ])

// next code block goes here

Inside the useEffect hook, we make a call to the API endpoint with fetch API. We then update the images array with the result of the API call by dispatching the STACK_IMAGES action. We also dispatch the FETCHING_IMAGES action once the API call completes.

The next block of code defines the return value of the function. Enter the following code after the useEffect hook.

return (
  <div className="">
    <nav className="navbar bg-light">
      <div className="container">
        <a className="navbar-brand" href="/#">
          <h2>Infinite scroll + image lazy loading</h2>
        </a>
      </div>
    </navv
    <div id='images' className="container">
      <div className="row">
        {imgData.images.map((image, index) => {
          const { author, download_url } = image
          return (
            <div key={index} className="card">
              <div className="card-body ">
                <img
                  alt={author}
                  className="card-img-top"
                  src={download_url}
                />
              </div>
              <div className="card-footer">
                <p className="card-text text-center text-capitalize text-primary">Shot by: {author}</p>
              </div>
            </div>
          )
        })}
      </div>
    </div>
  </div>
);

To display the images, we map over the images array in the imgData object.

Now start the app and view the page in the browser. You should see the images nicely displayed in a responsive grid.

The last bit is to export the App component.

export default App;
Pictures in responsive grid. (Large preview)

The corresponding branch at this point is 01-make-api-calls.

Let’s now extend this by displaying more pictures as the page scrolls.

Implementing Infinite Scroll

We aim to present more pictures as the page scrolls. From the URL of the API endpoint, https://picsum.photos/v2/list?page=0&limit=10, we know that to get a new set of photos, we only need to increment the value of page. We also need to do this when we have run out of pictures to show. For our purpose here, we’ll know we have run out of images when we hit the bottom of the page. It’s time to see how the Intersection Observer API helps us achieve that.

Open up src/App.js and create a new reducer, pageReducer, below imgReducer.

// App.js
const imgReducer = (state, action) => {
  ...
}
const pageReducer = (state, action) => {
  switch (action.type) {
    case 'ADVANCE_PAGE':
      return { ...state, page: state.page + 1 }
    default:
      return state;
  }
}
const [ pager, pagerDispatch ] = useReducer(pageReducer, { page: 0 })

We define only one action type. Each time the ADVANCE_PAGE action is triggered, the value of page is incremented by 1.

Update the URL in the fetch function to accept page numbers dynamically as shown below.

fetch(`https://picsum.photos/v2/list?page=${pager.page}&limit=10`)

Add pager.page to the dependency array alongside imgData. Doing this ensures that the API call will run whenever pager.page changes.

useEffect(() => {
...
}, [ imgDispatch, pager.page ])

After the useEffect hook for the API call, enter the below code. Update your import line as well.

// App.js
import React, { useEffect, useReducer, useCallback, useRef } from 'react';
useEffect(() => {
  ...
}, [ imgDispatch, pager.page ])

// implement infinite scrolling with intersection observer
let bottomBoundaryRef = useRef(null);
const scrollObserver = useCallback(
  node => {
    new IntersectionObserver(entries => {
      entries.forEach(en => {
        if (en.intersectionRatio > 0) {
          pagerDispatch({ type: 'ADVANCE_PAGE' });
        }
      });
    }).observe(node);
  },
  [pagerDispatch]
);
useEffect(() => {
  if (bottomBoundaryRef.current) {
    scrollObserver(bottomBoundaryRef.current);
  }
}, [scrollObserver, bottomBoundaryRef]);

We define a variable bottomBoundaryRef and set its value to useRef(null). useRef lets variables preserve their values across component renders, i.e. the current value of the variable persists when the containing component re-renders. The only way to change its value is by re-assigning the .current property on that variable.

In our case, bottomBoundaryRef.current starts with a value of null. As the page rendering cycle proceeds, we set its current property to be the node <div id='page-bottom-boundary'>.

We use the assignment statement ref={bottomBoundaryRef} to tell React to set bottomBoundaryRef.current to be the div where this assignment is declared.

Thus,

bottomBoundaryRef.current = null

at the end of the rendering cycle, becomes:

bottomBoundaryRef.current = <div id="page-bottom-boundary" style="border: 1px solid red;"></div>

We shall see where this assignment is done in a minute.

Next, we define a scrollObserver function, in which to set the observer. This function accepts a DOM node to observe. The main point to note here is that whenever we hit the intersection under observation, we dispatch the ADVANCE_PAGE action. The effect is to increment the value of pager.page by 1. Once this happens, the useEffect hook that has it as a dependency is re-run. This re-run, in turn, invokes the fetch call with the new page number.

The event procession looks like this.

Hit intersection under observation → call ADVANCE_PAGE action → increment value of pager.page by 1 → useEffect hook for fetch call runs → fetch call is run → returned images are concatenated to the images array.

We invoke scrollObserver in a useEffect hook so that the function will run only when any of the hook’s dependencies change. If we didn’t call the function inside a useEffect hook, the function would run on every page render.

Recall that bottomBoundaryRef.current refers to <div id="page-bottom-boundary" style="border: 1px solid red;"></div>. We check that its value is not null before passing it to scrollObserver. Otherwise, the IntersectionObserver constructor would return an error.

Because we used scrollObserver in a useEffect hook, we have to wrap it in a useCallback hook to prevent un-ending component re-renders. You can learn more about useCallback in the React docs.

Enter the below code after the <div id='images'> div.

// App.js
<div id='image'>
...
</div>
{imgData.fetching && (
  <div className="text-center bg-secondary m-auto p-3">
    <p className="m-0 text-white">Getting images</p>
  </div>
)}
<div id='page-bottom-boundary' style={{ border: '1px solid red' }} ref={bottomBoundaryRef}></div>

When the API call starts, we set fetching to true, and the text Getting images becomes visible. As soon as it finishes, we set fetching to false, and the text gets hidden. We could also trigger the API call before hitting the boundary exactly by setting a different threshold in the constructor options object. The red line at the end lets us see exactly when we hit the page boundary.

The corresponding branch at this point is 02-infinite-scroll.

We will now implement image lazy loading.

Implementing Image Lazy Loading

If you inspect the network tab as you scroll down, you’ll see that as soon as you hit the red line (the bottom boundary), the API call happens, and all the images start loading even when you haven’t gotten to viewing them. There are a variety of reasons why this might not be desirable behavior. We may want to save network calls until the user wants to see an image. In such a case, we could opt for loading the images lazily, i.e., we won’t load an image until it scrolls into view.

Open up src/App.js. Just below the infinite scrolling functions, enter the following code.

// App.js

// lazy loads images with intersection observer
// only swap out the image source if the new url exists
const imagesRef = useRef(null);
const imgObserver = useCallback(node => {
  const intObs = new IntersectionObserver(entries => {
    entries.forEach(en => {
      if (en.intersectionRatio > 0) {
        const currentImg = en.target;
        const newImgSrc = currentImg.dataset.src;
        // only swap out the image source if the new url exists
        if (!newImgSrc) {
          console.error('Image source is invalid');
        } else {
          currentImg.src = newImgSrc;
        }
        intObs.unobserve(node); // detach the observer when done
      }
    });
  })
  intObs.observe(node);
}, []);
useEffect(() => {
  imagesRef.current = document.querySelectorAll('.card-img-top');
  if (imagesRef.current) {
    imagesRef.current.forEach(img => imgObserver(img));
  }
}, [imgObserver, imagesRef, imgData.images]);

As with scrollObserver, we define a function, imgObserver, which accepts a node to observe. When the page hits an intersection, as determined by en.intersectionRatio > 0, we swap the image source on the element. Notice that we first check if the new image source exists before doing the swap. As with the scrollObserver function, we wrap imgObserver in a useCallback hook to prevent un-ending component re-render.

Also note that we stop observing an img element once we’re done with the substitution. We do this with the unobserve method.

In the following useEffect hook, we grab all the images with a class of .card-img-top on the page with document.querySelectorAll. Then we iterate over each image and set an observer on it.

Note that we added imgData.images as a dependency of the useEffect hook. When this changes it triggers the useEffect hook and in turn imgObserver get called with each <img className='card-img-top'> element.

Update the <img className='card-img-top'/> element as shown below.

<img
  alt={author}
  data-src={download_url}
  className="card-img-top"
  src={'https://picsum.photos/id/870/300/300?grayscale&blur=2'}
/>

We set a default source for every <img className='card-img-top'/> element and store the image we want to show on the data-src property. The default image usually has a small size so that we’re downloading as little as possible. When the <img/> element comes into view, the value on the data-src property replaces the default image.

In the picture below, we see the default lighthouse image still showing in some of the spaces.

Images being lazily loaded. (Large preview)

The corresponding branch at this point is 03-lazy-loading.

Let’s now see how we can abstract all these functions so that they’re re-usable.

Abstracting Fetch, Infinite Scroll And Lazy Loading Into Custom Hooks

We have successfully implemented fetch, infinite scroll, and image lazy loading. We might have another component in our application that needs similar functionality. In that case, we could abstract and reuse these functions. All we have to do is move them inside a separate file and import them where we need them. We want to turn them into Custom Hooks.

The React documentation defines a Custom Hook as a JavaScript function whose name starts with "use" and that may call other hooks. In our case, we want to create three hooks, useFetch, useInfiniteScroll, useLazyLoading.

Create a file inside the src/ folder. Name it customHooks.js and paste the code below inside.

// customHooks.js

import { useEffect, useCallback, useRef } from 'react';
// make API calls and pass the returned data via dispatch
export const useFetch = (data, dispatch) => {
  useEffect(() => {
    dispatch({ type: 'FETCHING_IMAGES', fetching: true });
    fetch(`https://picsum.photos/v2/list?page=${data.page}&limit=10`)
      .then(data => data.json())
      .then(images => {
        dispatch({ type: 'STACK_IMAGES', images });
        dispatch({ type: 'FETCHING_IMAGES', fetching: false });
      })
      .catch(e => {
        dispatch({ type: 'FETCHING_IMAGES', fetching: false });
        return e;
      })
  }, [dispatch, data.page])
}

// next code block here

The useFetch hook accepts a dispatch function and a data object. The dispatch function passes the data from the API call to the App component, while the data object lets us update the API endpoint URL.

// infinite scrolling with intersection observer
export const useInfiniteScroll = (scrollRef, dispatch) => {
  const scrollObserver = useCallback(
    node => {
      new IntersectionObserver(entries => {
        entries.forEach(en => {
          if (en.intersectionRatio > 0) {
            dispatch({ type: 'ADVANCE_PAGE' });
          }
        });
      }).observe(node);
    },
    [dispatch]
  );
  useEffect(() => {
    if (scrollRef.current) {
      scrollObserver(scrollRef.current);
    }
  }, [scrollObserver, scrollRef]);
}

// next code block here

The useInfiniteScroll hook accepts a scrollRef and a dispatch function. The scrollRef helps us set up the observer, as already discussed in the section where we implemented it. The dispatch function gives a way to trigger an action that updates the page number in the API endpoint URL.

// lazy load images with intersection observer
export const useLazyLoading = (imgSelector, items) => {
  const imgObserver = useCallback(node => {
  const intObs = new IntersectionObserver(entries => {
    entries.forEach(en => {
      if (en.intersectionRatio > 0) {
        const currentImg = en.target;
        const newImgSrc = currentImg.dataset.src;
        // only swap out the image source if the new url exists
        if (!newImgSrc) {
          console.error('Image source is invalid');
        } else {
          currentImg.src = newImgSrc;
        }
        intObs.unobserve(node); // detach the observer when done
      }
    });
  })
  intObs.observe(node);
  }, []);
  const imagesRef = useRef(null);
  useEffect(() => {
    imagesRef.current = document.querySelectorAll(imgSelector);
    if (imagesRef.current) {
      imagesRef.current.forEach(img => imgObserver(img));
    }
  }, [imgObserver, imagesRef, imgSelector, items])
}

The useLazyLoading hook receives a selector and an array. The selector is used to find the images. Any change in the array triggers the useEffect hook that sets up the observer on each image.

We can see that it is the same functions we have in src/App.js that we have extracted to a new file. The good thing now is that we can pass arguments dynamically. Let’s now use these custom hooks in the App component.

Open src/App.js. Import the custom hooks and delete the functions we defined for fetching data, infinite scroll, and image lazy loading. Leave the reducers and the sections where we make use of useReducer. Paste in the below code.

// App.js

// import custom hooks
import { useFetch, useInfiniteScroll, useLazyLoading } from './customHooks'

  const imgReducer = (state, action) => { ... } // retain this
  const pageReducer = (state, action) => { ... } // retain this
  const [pager, pagerDispatch] = useReducer(pageReducer, { page: 0 }) // retain this
  const [imgData, imgDispatch] = useReducer(imgReducer,{ images:[], fetching: true }) // retain this

let bottomBoundaryRef = useRef(null);
useFetch(pager, imgDispatch);
useLazyLoading('.card-img-top', imgData.images)
useInfiniteScroll(bottomBoundaryRef, pagerDispatch);

// retain the return block
return (
  ...
)

We have already talked about bottomBoundaryRef in the section on infinite scroll. We pass the pager object and the imgDispatch function to useFetch. useLazyLoading accepts the class name .card-img-top. Note the . included in the class name. By doing this, we don’t need to specify it document.querySelectorAll. useInfiniteScroll accepts both a ref and the dispatch function for incrementing the value of page.

The corresponding branch at this point is 04-custom-hooks.

Conclusion

HTML is getting better at providing nice APIs for implementing cool features. In this post, we’ve seen how easy it is to use the intersection observer in a React functional component. In the process, we learned how to use some of React’s hooks and how to write our own hooks.

Resources

Smashing Editorial (ks, ra, yk, il)

Creative Sound Design For Music

Important points in sound design Sounds surround us everywhere: everyday business, film, television or radio broadcasting. Sound is one of the most important parts of our perception of the environment, our picture of the world. Sound is an integral part of any movie, promotional video, presentation or clip. Dialogues, specially selected music background, sound effects, […]

The post Creative Sound Design For Music appeared first on designrfix.com.

Cyber crime is on the rise: how can you protect your business?

Free image taken from https://unsplash.com/photos/y-wjLDbPNGM  Statistically, 70% of senior business managers rate cybersecurity as a high priority but only 30% have a solid cybersecurity policy in place and most businesses invest less than $500/year in security products. If you’re worried that your business is vulnerable, the time to act is now because the numbers don’t […]

The post Cyber crime is on the rise: how can you protect your business? appeared first on designrfix.com.