"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
Monday, October 30, 2017
25 Interesting Facts About WordPress - #Infographic
[ 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
[ 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
[ 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.
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:
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:
On the other hand, there needs to be some distance between each question:
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:
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.
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:
Other question-level help should go below the label. See the ABN, employee and marketing questions for examples of this:
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:
Here’s an even more extreme illustration of poorly spaced labels on radio buttons:
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:
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):
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:
- background color
- 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):
A simple border on four sides is enough to show users where to type:
Just make sure your border can be seen:
Continue reading %Designing Form Layout: Spacing%
by Jessica Enders via SitePoint