Monday, October 30, 2017

25 Interesting Facts About WordPress - #Infographic

WordPress is an incredible resource for individuals, business owners, and even churches who desire to build an effective church website. The most widely used CMS on the market, WordPress has quite deservedly become a global phenomenon used by millions of websites, including some of the world’s most...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

24 Google Doc Hacks to Make Running Your Business Easier - #Infographic

Twenty years ago, collaborating with people in real-time over the internet seemed unfathomable. Now we do it every day with the click of a button. Google Docs is a powerful tool that makes working with people both near and far a breeze, but do you know how to use it to its full capacity? Go beyond...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

28 Teamwork Quotes From Great Leaders - #Infographic

In business and in life one person can only get so far. Real growth happens when you are surrounded by others that can push you, teach you, collaborate with you, and offer you business advice. Surrounding yourself with people that have different skills and ideas will only lead to innovation as long...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Build a React App with User Authentication in 15 Minutes

This article originally appeared on the OKTA blog. Thank you for supporting the partners who make SitePoint possible.

React has quickly become one of the most favored front-end web frameworks, and is second only to plain old HTML5, according to JAXenter. So it’s no surprise that developers are learning it, and employers are asking for it.

In this tutorial, you’ll start with a very simple React app with a couple of pages and some routing built in, and add authentication using Okta’s Sign-In Widget. The Sign-In Widget is an embeddable Javascript widget that allows developers to use Okta’s secure, scalable architecture with a minimum of effort from within React applications. Let’s get started!

Get the Simple React Seed Project

Start by cloning the simple React seed project.

git clone http://ift.tt/2zSvQoE okta-react-widget-sample
cd okta-react-widget-sample

Add the Okta Sign-In Widget

Install the Okta Sign-In Widget using npm.

npm install @okta/okta-signin-widget@2.3.0 --save

This will add the Okta Sign-In Widget code to your node_modules folder. We’ll be using version 2.3.0 of the Sign-In Widget.

Okta in node_modules

Then add the styles for the widget in your index.html file from the Okta CDN. Add these lines inside the <head> tag:

    <link
     href="http://ift.tt/2hoRudq"
      type="text/css"
      rel="stylesheet"/>

    <!-- Theme file: Customize or replace this file if you want to override our default styles -->
    <link
      href="http://ift.tt/2zSvQVG"
      type="text/css"
      rel="stylesheet"/>

The LoginPage Component

First, create a folder called auth in the ./src/components folder, then create a file called LoginPage.js where the LoginPage component will go.

Start with the most basic of components:

import React from 'react';

export default class LoginPage extends React.Component{
  render(){
    return(
      <div>Login Page</div>
    );
  }
}

This little component doesn't do much but at least you now have a handle to add the LoginPage to your routing. So in your ./src/app.js file, you'll import the component at the top:

import LoginPage from './components/auth/LoginPage';

and then add the route inside the main route (the one with the path of "/")

<Route path="/login" component={LoginPage}/>

Add the OpenID Connect Application in Okta

In order to use Okta as your OpenID Connect provider for authentication, you’ll need to set up an application in the Okta developer console.

If you don't have an Okta developer account, go create one! Once you're logged in, click on Applications in the top navbar, then click Add Application. Select SPA as the platform and click Next. Change the redirect URI to http://localhost:3000, and click Done. The application will be created with the following settings:

OIDC Application Settings

Now that you have an application created in Okta, you can set up the widget to talk to your new app!

Add the Widget to Your Component

import React from 'react';
import OktaSignIn from '@okta/okta-signin-widget';

export default class LoginPage extends React.Component{
  constructor(){
    super();
    this.widget = new OktaSignIn({
      baseUrl: 'https://{oktaOrgUrl}',
      clientId: '{clientId}',
      redirectUri: 'http://localhost:3000',
      authParams: {
        responseType: 'id_token'
      }
    });
  }

  render(){
    return(
      <div>Login Page</div>
    );
  }
}

Copy the Client ID generated from your application's settings page and paste it over {clientId}. Make sure you also replace {oktaOrgUrl} with your Okta organization URL, which you can find by going back to the main Dashboard page in the developer console. Usually it will look like: http://ift.tt/2zS87VJ.

Thus far you've imported the OktaSignIn function from the Okta Sign-In Widget npm module you installed earlier. Next, in the constructor of the component, you initialized an instance of OktaSignIn with the configuration for the application. This way, the application code will be able to talk to Okta and Okta will recognize that this is the app you just created.

Show The Login Widget

Next, you’ll create the code to actually render the Sign-In Widget to the page! You'll need to change your render method to create an HTML element you can render the widget into. Make sure to get a reference to the element that will be rendered. Then, add a componentDidMount function to make sure you don't try to render the widget before the HTML element is on the page.

Continue reading %Build a React App with User Authentication in 15 Minutes%


by Lee Brandt via SitePoint

Web Design Weekly #297

Headlines

Sketching Interfaces

A few times a year something really blows my mind in the web development space and this is one of them. High fives to the Airbnb team for pushing things forward. (airbnb.design)

The React Story (stackshare.io)

Articles

Real-world Web Performance Budgets

If you happen to work on a product that is getting big and bigger by the day and performance is becoming an issue, read this. Oh and send it to your manager. (infrequently.org)

My approach to using z-index

Another entertaining post by David Gilbertson that will no doubt enlighten your z-index skills to the next level. Great read even if you are a z-index guru. (hackernoon.com)

I wish I knew these before diving into React

Still finding your feet with React? Canberk Morelli passes on 6 tips that you should find helpful. (engineering.opsgenie.com)

Nailing Accessibility In Design

In this article, Tom Graham and André Gonçalves discuss some of the most common visual impairments, focusing on color-blindness to explain how you can make small changes to your workflow and products to ensure you’re not alienating users. (smashingmagazine.com)

What you need to know about HTTP/2

You don’t need to do too much to receive the juicy benefits of HTTP/2. If you can steer away from some comfortable old patterns and into the sunny new world you’re in for some speedy times as Kellen Person explains. (fly.io)

Tools / Resources

Graphcool Framework

The Graphcool Framework is a comprehensive collection of building blocks covering the entire spectrum of developing modern, data-centric GraphQL. (graph.cool)

Introducing a free and easy way to manage creative files

Your files deserve a safe home. Organizing, sharing & approval of creative in a customizable portal; everything is easier with Bynder Orbit. (bynder.com)

Strategies for Thriving in Your First Product Design Role

Chris Chan shares some really great advice on ways you can go above and beyond as a product designer. (medium.com)

Head

If you have ever been a little bamboozled about what should or shouldn’t be in the head of your document this in-depth list is for you. (github.com)

SketchKeys — Keyboard shortcuts stickers for Sketch App (sketchkeys.com)

Sonar – A linting tool for the web (sonarwhal.com)

Code Review Etiquette (css-tricks.com)

Webpack Monitor (webpackmonitor.com)

How DNS works (howdns.works)

Inspiration

The Story of CSS Grid, from Its Creators (alistapart.com)

Chrome Dev Summit 2017 (youtube.com)

Jobs

Product Designer at Creative Market

As a Product Designer, you will be responsible for working closely with a cross-functional team to build new features and a/b tests that will help our 3.5M+ members engage with Creative Market and drive meaningful revenue for the 20k+ creators on our platform. (creativemarket.com)

Product Designer at Mixpanel

We are a small, collaborative team of multidisciplinary designers, and are looking for experienced product designers to help us dive deeper into our product vision, and to strengthen our brand across all the places we interact with our customers. (mixpanel.com)

Need to find passionate developers or designers? Why not advertise in the next newsletter

Last but not least…

Saying Goodbye to Firebug (hacks.mozilla.org)

Chinwag (twitter.com)

The post Web Design Weekly #297 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

Simple Push Menu with Javascript and CSS

A tutorial about creating simple push menu with pure Javascript and CSS.


by via jQuery-Plugins.net RSS Feed

Designing Form Layout: Spacing

The following is a short extract from our book, Designing UX: Forms, written by Jessica Enders. It's the ultimate guide to form design, a key part of effective UX design. SitePoint Premium members get access with their membership, or you can buy a copy in stores worldwide.

We can subtly communicate with the user through a few tweaks of spacing.

Proximity

Human beings see things that are close to each other as being related. Conversely, things that are not related usually have some space between them.

These principles tell us to put the parts of a question—label, question-level help and answer fields—close together. Our form is pretty good for this so far, but let’s just move the labels a bit to the right, so they’re closer to their fields:

Flush right labels should be close to their fields

Flush right labels should be close to their fields.

On the other hand, there needs to be some distance between each question:

Questions should be far enough apart that it’s clear where one ends and the next one starts

Questions should be far enough apart that it’s clear where one ends and the next one starts.

Remember how the focus of a user’s vision is about nine characters wide? Well, this means question-level help that’s on the right side of a field often won’t be seen:

Their focus on fields means many users won’t even see the question-level help in this form

Their focus on fields means many users won’t even see the question-level help in this form.

We could move the question-level help underneath the field, but that means users might not see it until after they’ve answered. It’s also less accessible.

Question-level help below the field is not especially usable or accessible

Question-level help below the field is not especially usable or accessible.

The best place for question-level help is between the label and the field (as shown in the image below). Formatting instructions—like the DD MM YYYY on date of birth—should go above the field:

Formatting instructions positioned above the field

Formatting instructions positioned above the field

Other question-level help should go below the label. See the ABN, employee and marketing questions for examples of this:

Other question-level help positioned below the label.

Other question-level help positioned below the label.

Finally, when we use checkboxes and radio buttons, we need to make sure the labels are close to the right button or box. If they’re too far away, things get confusing, particularly if you aren’t shading the touch area:

The distance between the labels “Yes” and “No” and their respective radio buttons means the user has to stop and think

The distance between the labels “Yes” and “No” and their respective radio buttons means the user has to stop and think.

Here’s an even more extreme illustration of poorly spaced labels on radio buttons:

It’s likely that many users will give an unintended rating, given the poor spacing here

It’s likely that many users will give an unintended rating, given the poor spacing here.

Text Box Widths

While we’re adjusting spacing, let’s fix up our text box widths.

At the moment, aside from the text boxes for date of birth, all our text boxes are the same width:

Text boxes all the same width

However, the width of a text box tells the user what sort of information is needed. The user experience will be better if we make the sizes proportional to the expected information (as we have, in fact, already done with date of birth):

Text boxes adjusted to have width proportional to typical answers

Note we’re talking about visual width here, not acceptable number of characters. The email address field may have a visual width as shown, but should still accept up to 256 characters.

Empty Text Boxes

Another important aspect of text box spacing is the space they have inside. This empty space is how users know they need to type something in there.

Way too many forms have text boxes that aren’t empty. The two main culprits are:

  1. background color
  2. placeholder text.

No Background Color

Do not give your fields a background color. Background color in fields makes them look like buttons (just as buttons without background color look like fields):

On this form, background color makes fields look like buttons, and vice versa

On this form, background color makes fields look like buttons, and vice versa.

A simple border on four sides is enough to show users where to type:

You don’t need much to show users where their answers go

You don’t need much to show users where their answers go.

Just make sure your border can be seen:

The field borders on this form are so light they’re nearly impossible to see

The field borders on this form are so light they’re nearly impossible to see.

Continue reading %Designing Form Layout: Spacing%


by Jessica Enders via SitePoint