Categories
Online Marketing

Writing for the web: content templates

One of the things I do is something called content templates, where I come up with a structure for the text, especially for repeated items. Now we’re going to work backwards in this article because it’s easier to learn when we’re going backwards. But most often, if I was going to do a Content template for this page, I probably wouldn’t actually have this piece of information designed.

Yet I would start with the content template and come up with my template. First, before I design and wire frame this the page, but we’re going to work whack backwards, because it’s a little bit easier to understand the process. So what I’ve got here is this is one photo of many photos taken by new horizons and there’s a very specific structure to this. If you scroll down, you can see here’s another photo and they’ve all follow a very, very similar structure.

It’s almost identical! So what I want to do is I want to come up with a template for this content. The great thing about coming up with these content templates is that, from a development point of view, then we have something to base our development on. We know which pieces are going to be repeated and we know that we can then use repeated, CSS and repeated HTML, and we can use code, generators and stuff like that and templates to actually make our site less duplicate.

I it’ll have less duplicated code, so we’re going to make a Content template from this. Now I’m going to start here. This is an image. Basically, this content is all about this image and you can see right here. It has a title, so I’m going to go in I’ve created a new markdown document and I’m going to start i’m going to use yamel and mark down to make my content template. There’s a article series on that on learning both of those things.

So I’m going to start by putting the title in here like that, so that’s first, I came up with an entry name for this thing. If you’ve done any programming, this would be like a variable. I’ve called it title and then I’ve pasted come up with there’s the title sort of thing, so you can see here is a date. Let’s say that that’s published the day that this was published. So I paste this in here. But for me this is a human, readable format and I’d want to convert this to a computer, readable format, so we’ll use oops, okay, we’ll use sort of a standardized version like that.

So we’ve got now the date in here the publish date. So you can see. There’s an image so we’ll go image: what’s this called global mosaic global mosaic, so there’s the image as part of this content template what else is there on here? So we have this little paragraph of text, I’ll copy copy that and paste it down here. So it’s at the bottom, in the markdown area and at the top here I’m doing yamel stuff very structured.

This here is just a hunk attacks, so it doesn’t really have that much structure and it makes sense for it to be down here. What else do we have? So we have a credit here like this, so we’ll go credit like that. We have last updated July, thirtieth, updated 2015. 07. 30. Now I like to keep my dates together, so I’m going to put this updated date up here. Next to the published one editor: okay, let’s put editor in here – editor like that, and the last thing that I can see right here is tags, so go tags now this is actually a list of stuff, so it makes sense to use a yam a list for This information, like this so I’ll, go and just put these things in here.

Alright, so here is the structured version of this piece of content this. If we look through all of these images, it seems to fit all of them. This one has a bigger description, but it still only has tags bigger description tags. If we keep going see if there’s any differences, if we missed anything, doesn’t really look like it. I can’t seem to find anything out what about this one here, no okay! So there we go so that’s a Content template for one of the photos that nASA released.

So we would do this first and then it gives us an idea of all the information that will be used for each photo on the site. Now I’m using this application here to do it, but I could have done it in my code. Editor. Let me just drag it into sublime text here here. You can see it inside of my code. Editor look so basically the same. I get a little bit more syntax, highlighting if I change to a different markdown processor like this, which is cool, but when it comes to content templates, it’s not terribly necessary for you to write it in any specific application.

https://m.youtube.com/watch?v=5Dj-37aSrj8


 

Categories
Online Marketing

How to check for accessible colors — A11ycasts #17

Really Really different, Whereas if you take two colors that are very Close together on the color wheel, it ’ s, going to be harder to tell the two apart Now the reason why this is important in web Design is because often times our whole goal is convey some information to the user, usually Through text and images, But if the contrast of our text is a little Too subltle and too mixed in with the background, it might be difficult for the user to read.

The page and that might sort of degrade the user experience. So what I wanted to do today is walk through Some of the process that I use to sort of check the page and figure out if it has appropriate Contrast and how to tune it up if I find some issues But to start follow me over to my laptop And I have a little presentation that I want to show you It kind of walks through how we measure contrast.

On the web, So here I ’, ve got a set of text boxes on A white background, and up above you can see, I ’ ve, got these numbers up here for some Contrast ratios, So I ’ m measuring in terms of luminance The difference between this foreground color and this background color Now on the web. We actually have guidelines That try to instruct us what our contrast minimums should be So the web content accessibility guidelines, In section 1.

4.3, they say for body text: you want to aim for a contrast: ratio of around 4.5:1, for, like smaller text or your general body copy For larger text, something that is 14 point. Bold or 18 point you can ratchet that contrast ratio down just a little bit to 3:1. So if we go back and we look at our image – Of contrast, we ’ ve got these first. Two examples would meet that minimum contrast requirement.

So this one is just pure black on white, so its 15.9:1 Thats really high contrast. This one is a little more of a subtle grey But we still have 5.7:1, which is pretty nice. These last two, though, are just a little too Low contrast, so they wouldn ’ t quite meet that requirement. We can also actually bump this up, though Theres a enhanced contrast recommendation in the web content accessibility guidelines, As well So this is for situations where you know you Might have either an older audience or a low vision audience.

In that case, we can bump the contrast ratio. Up to 7:1 or 4.5:1 for the regular body text. So if we go back – and we look at this example – Here, really only this first one would meet that enhanced contrast, ratio requirement So consider who your audience is going to Be when you ’ re, building your site or application, and that can help decide where you want to Aim on the contrast ratio scale, I use a number of different tools to try to Figure out, if I ’ m nailing those contrast, ratio, minimums And actually my friend Louis, has done this Really cool thing where he has put together this accessibility testing for the web handbook.

Called OATMEAL, which stands for Open Accessibility, Testing Methods for Experts and Lay folk. He actually has a whole guide in here about How he measures color contrast and the folks on his team do that, And so we ’ re going to kind of follow this Guide a little bit, We ’ re not going to use all the exact same Tools, but this is a really cool methodology that you can check out and use in some of Your own apps to maybe figure out your process, So what I ’ ve got here is a website called The accessibility blog and we ’ re, going to follow two of the steps in that OATMEAL Guide doing a sort of semi-automated check using a tool like aXe And then we ’ ll, do a more manual spot.

Check using a WCAG, color contrast analyzer, So starting on this site, the first thing: I ’ m going to do. Is pop open, my DevTools, I ’ ve already installed the aXe. Extension For Chrome, If you actually check out our previous episode, On A11ycasts and I’ll leave a link to this down in the show notes we covered all the different Ways that you can install aXe on your system, So I ’ m just using the extension for Chrome Here – and I ’ m just going to open it up and check out this page and hit the analyze button, And you ’ ll – see that it tells me over here.

On the left that I have a few elements that do not have sufficient color contrast, I ’ ve. Got about 7 issues here: It ’ ll! Try to give me a CSS selector to the Elements that need some work, but there ’ s an inspect button that I often use to just Inspect the element in the Dom – and I can scroll up and say who exactly is this Alright, so we ’ re starting of with these Little anchors up here in our navigation – and this is one those areas that I see a lot where It looks like we ’ re, actually pretty close to having good contrast here, but we ’ re.

Sort of on the bubble – it ’ s, a little unclear. Are we hitting that or not So? What I ’ ll often do. Is I ’ ll. Take this Foreground color and I ’ ll, take this background color and I can use another tool this one That I often use is called Lea. Verou: ’ s, Color Contrast Checker, so I ’. Ll also include a Link to this down in the show notes, And then we can just drop in our foreground.

And that background color, and we can see that the contrast ratio of these two is 3.6 So its not quite where we want to be for smaller text Again, we want to bump that up to about 4.5. So this is an area where I know that I need To go back, and since I also have some of these elements right here that are even lighter, And since I know that this is pure white text – and I can ’ t make it any brighter, my only Real option here would be to make this header bar a darker blue, so that all three of those Links pop a bit more Another thing that we might notice in our Tool, if we step through some of the options, is that we also have areas down here like This little sub-heading, which we ’ ve, got a kind of subtle, grey on white thing, going On and again we can take that into Lea Verou: ’ s, Color Checker and we can figure out.

You know, Are we on the bubble One option if we want, we can make the text Bigger so we can maybe hit 3.0 contrast ratio That ’ s one option we just make the text Sort of larger, if we ’ re on the bubble Or we darken the foreground text because The background is pure white, so we can. ’ t really make the background any lighter, So we can go through and we can work through. Our CSS and tune those colors up and that ’ s really what a tool like aXe is doing It.

’ s actually, looking at the CSS values, For background and foreground, But there are some situations where a tool Like the aXe inspector is not going to be able to tell us if we have contrast issues And that ’ s in situations where we don ’ t have clearly defined foreground background. Colors So, for instance, over here on the right, I ’ ve, Also got this advertisement, and these are pretty common, where you have some text over An image background and the text itself might even be an image right So for a tool like aXe.

It can ’ t pick out. Two distinct foreground background colors, so we ’ re going to need to use another tool. To figure out, if we have contrast issues over here, So the tool that I like to use is the WCAG 2.0 Color Contrast Analyzer, It ’ s, another Chrome extension and I ’ m. Going to warn you, it ’ s a little bit buggy, but I ’ m going to walk you through how I Use it and maybe point out some of the issues, so you can work around those, But basically what we do here is after we ’ ve.

Installed the extension we ’ ve got this extension up here in the top right click. On that, What I found to be sort of an issue here is On retina monitors, if you try to tell it to analyze a region and you select a region, It ’ ll, be sort of off Like it sort of zooms in and it doesn. ’ t. Seem to be able to handle retina that well, So, instead, I ’ ll tell it to capture visible Content And what this is going to do, you can see That it ’ s already sort of zoomed in what this is going to do.

Is it ’ s going to try To scan all the pixels on the page and it ’ ll highlight the contrast between that pixel And the ones next to it, So you can pick out those areas that have Low contrast, While it ’ s scanning, so it will take a while Right, it ’ s, only up to 27 %. So far, so I can walk through some of these settings for You, though, So the first one here is asking us what level We ’ re measuring at So again.

I mentioned that we have the minimum Contrast ratio of 4.5:1 or we can take it all the way up to the enhanced contrast ratio. Of 7:1 right So again you can choose your target there. Then there ’ s. Also this pixel radius option And at first I wasn, ’ t quite sure what this was for by default, it ’ s set to one. So it ’ s. Going to compare the two pixels next to each other, but it goes all the way up to 3 Often times when we ’ re working with text.

On the page, it ’ s, not a clearly defined. The text ends here and the page starts here. Instead, it ’ ll, do a sort of anti-aliasing Thing So if we go and we look at the image of our Text this D: here it ’ s, actually sort of three colors. So we ’ ve got a couple greys and then the Solid white and that ’ s, what forms the body of that character When it ’ s, asking us what pixel radius that We want to use it.

’ s, basically asking us what sort of anti-aliasing range do you want? To accommodate, for So what I do is I tend to set it to 2. That way I can analyze a couple pixels next To each other, Alright cool, so it looks like it just finished. And what it ’ s doing here? Is it ’ s drawing these white outlines to show us areas of high Contrast And any place where it gets sort of noisy Kind of like right in here we can tell that we have slightly lower contrast If we go over and we look at that ad, we can See that yeah we definitely have some issues here So up at the top, where it says developer.

Friendly, it seems like it: ’ s, doing ok.. We can toggle this mask on and off. So when We hide it. We can see that when we get to the body text inside of this ad, it actually Is even more translucent than the header and when we get down to the bottom and it Mixes with that background, it ’ s, really really tough to see. So this is an area where we know we might Have to go back to the designer and say “ Hey, I can show you this and I can definitively Prove that there is a contrast issue here, and this is a place where we need to maybe Tune it up Either give the text a backing, so it pops A little more or figure out if we can use a different background image, something that Doesn, ’ t interfere with the text as much ” So yeah using these tools and using a guide.

Like OATMEAL, you can, through you, can analyze the contrast for your site or application. Maybe look for problem areas tune. It up make sure users have a better experience That about covers it for today. So if you Have any questions for me, as always, you can leave them down below in the comments Or hit me up on a social network of your choosing, As always. Thank you so much for reading. And I ’ ll see you next time.

If you want to learn more about color contrast, We ’ ve got some additional articles. You can check out in our playlist Again thanks for reading and I ’ ll see You next time,


 

Categories
Online Marketing

How I do an accessibility check — A11ycasts #11

So today I thought it’d be fun to go through my process for doing a simple accessibility audit a lot of times I have teammates or even like third party partners who reach out and they say hey. You know. I’ve got this site that I built, I’m not deeply familiar with accessibility, so can you give it just a once-over, and let me know if there’s any sort of like major gotchas I should be looking out for so I wanted to cover my process today.

This is not, you know, an exhaustive review or anything, but this is generally the stuff that you can do to find some obvious high level issues. So, if all the way over here to my laptop, usually the first thing that I do on any website, I’m going to use webbing as an example here, webbing is an awesome site for web accessibility. Usually one of the first things I do one on any web site is: I want to ensure that I can navigate using the tab key on my keyboard and that there are discernible focus styles, as I move around the page, so in the case of webbing, if I start tabbing through here, you’ll, actually see the first thing that it does the very first time I hit tab.

I get this thing called a skip link up here in the top left hand, corner skip links are super useful. You know on sites where you might have heavy navigation. You want to let the user skip immediately down to the main content, so webaim implements the skip link. Some other sites, like github, have skip links. If you actually go to github and hit tab, you might notice, it says, like you know, jump to your repositories or whatever so skip link is kind of a cool thing to look out for, but then, as I’m tabbing around the page, I want to make sure That I see a focus ring on different elements on the page now web aim actually does a cool thing here, where they animate their focus ring.

So you can even see it moving across the screen, which is pretty cool. They highlight their focus States. This is, you know, just about the best link, a tab focus behavior. I think I’ve ever seen really, but I just tab through the site, and I make sure that you know I can reach everything that is interactive using the tab key on my keyboard right. So that’s step one tab through your experience, so the other thing that I like to look out for is, as I’m tabbing around the page.

I want to make sure that there’s no off-screen content that can accidentally be focused so follow me over here. I’ve got this. This material design, Lite sort of like template site that the the team has created and notice that it has this sort of like sidebar over here and, as I’m focus moves into that sidebar right now. Let’s say I shrink the page a little bit right. So it’s totally possible that someone could have their browser this size on their desktop and let’s try it and tap through this now.

So I tab through this write. My focus is over here on the top left or sorry top right in that search field. Now it’s on that button. Now, as I’m pressing tab, though we don’t see the focus indicator, it’s as if it has disappeared and we keep tapping, we keep chatting and eventually it’s going to show back up. Ah did you see it down here at this? Like read more button, so what was going on there? Well, if we expand again, we can see that actually, what was happening was focus was sort of hidden in these off-screen fields was over here in our side nav, and so I see this on a lot of websites, and this can trip up.

You know anybody who’s using a keyboard to navigate and I can come trip up mobile screen readers because you have something off screen, but it’s still in the tab, water, it’s still focusable, so a screen reader might travel into those off screen elements. You know you might have dialogues off screen, you might have side nav off screen and you don’t actually want the user to be clicking on those during that current state.

So that’s another thing that I look out for. I want to make sure that people are disabling off, screen, interactive content, making sure it’s removed from the tab order. The next thing that I look for is I want to make sure that I can do kind of like a simple navigation of the page using a screen reader, so for this demo, I’m going to use the shop app by the polymer team. This is a pretty cool site that I work with that team, a lot to try and make sure that this was a good, accessible experience.

So, in the previous few episodes we covered how to use NVDA, we covered how to use voiceover on a Mac. I really recommend all web developers familiarize themselves with the basics of at least one screen reader just so they can quickly move through a page kind of like what we were doing with the tab key – and this is just sort of like a sanity check to make Sure the screen reader can actually like land on controls and they’re, announcing things that they should.

So let me turn on voiceover and all kind of like move through this page quickly, to show you what I mean by that all right. So I’m just going to use the vo Keys to kind of like quickly move through some interactive stuff visit, link, home link, shopping, cart, zero items, link where link ladies outerwear link men’s t-shirt. I might you know, try and move down to like Lane section. I want to land on an image right.

I want to make sure that that image has alt text. That’s really important a lot of websites, especially like e-commerce sites and things like that, you’ll move through and because they haven’t provided alt text for any of the images it’ll oftentimes just read like the file name for an image. So that’s another thing that I often look out for as and as I’m going through, this phase, you know, did the the person building the site use proper, alt attributes.

I also want to make sure that if there are custom controls like buttons and things like that, that have been implemented using either custom elements or using like divs with a bunch of JavaScript, that those are interactive with a screen reader. Okay, so we’re on this drop down, it says size collapsed, pop-up button. Let’s try and use voiceover to interact with this, so I’ll click on it. Okay, it’s reading me the number of items, and now I want to use just like my regular arrow keys to move around inside of this control.

So up down right, left right things like that, so go down to extra-large, hit inner right. Okay! That’s something that I look for right. Any custom control is working as I would expect with the keyboard. The other thing I know about this site is when I add something to the cart. It’s going to sort of add like a little sort of a like modal pop-up type thing that’ll show up on screen, and so I want to make sure that the screen reader user is notified of that, possibly by moving their focus into that item.

So let’s do that item added to the cart added to cart for items interact without it took our view. Cart, don’t close dialogue voiceover off, so you can see that when the item was added to the cart, the screen reader focus was directed into that thing. That just slid out on screen, so I know the way the polymer team is doing this, if I recall, is they’ve got something in there with the tabindex of negative 1 and they’re, focusing that element just to direct our focus.

So that’s another thing that I read out for making sure if, if something is being dynamically added to the page, that focus is directed to it. So that’s a quick pass that we can do with the with screen reader. The next thing that I do is I try and check the page structure, so I wan na make sure that the page is using appropriate headings and that there are appropriate, landmark roles or landmark elements on the page, because those help with screen reader navigation as well.

So, let’s look at something like Wikipedia which does a really good job of this. So I’ll turn my screen reader voiceover on Google and what I often do is I just opened the the rotor inside of voiceover in NVDA. There’s the. I think it’s called the web elements thing. I think we showed it off in the last episode. Basically, it’ll give you kind of an outline of the page in voiceover. You can open it by using a ctrl, alt or a control option you and just hitting, left and right to menu all right.

So we can see all the headings on the page. We can see that they’re doing a really good job of using. You know. H1. H2, h3, going all the way through the hierarchy of headings they’re, not just mixing and matching H tags based on like the size that they are, which I see a lot of developers do, which can generate kind of like a broken document outline for the screen reader. I want to make sure that when they’re using heading tags they’re using it to basically build the skeleton of the page, so you know we can right move through this content in a sort of a logical way.

So if I wanted to jump down to this, the section I can easily do so. The other thing that I look for again is is landmark elements. So, let’s, let’s go back and look at webbing, so webbing does a really good job of using landmark elements on their site. So again I open my web Roder. I look for landmarks and here we can see that there’s things like banner navigation search main. So if I wanted to bypass all the navigation and get right to the main content, I can do that right.

So that’s another thing I look for you know there are sites out there, which really don’t include many landmark elements at all and again, that’s sort of an efficiency feature that you can very easily add in use, use main tags, use, nav tag or use like you Know, role attributes to create those landmarks, somebody users who use screen readers can, you know, just navigate around a lot faster fashion, so that covers a focus that covers basics of screen, readers that covers headings and landmarks.

The next thing I check for is color and contrast. I want to make sure that you know if someone who might have a low vision impairment, it’s going to be able to discern the text on the page. So again, you know looking at a site like material design lite. This is a really attractive website, but there are areas where I think some of the texts could be a little low contrast and maybe a little difficult to read.

So there’s a really great Chrome extension that you can install on the Chrome Web Store. We can look for axe extension, so acts like a like a chopping axe right, so this is by DQ systems, and basically this is a simple extension that you can add to Chrome, which will sort of run an audit against the page and flag. A number of accessibility issues, but one of those is color and contrast. So on this site I can just open my dev tools after I’ve installed that audit.

You can see it’s right here in my dev tools panel, there’s this big analyze button. So I click on that and it goes through. It looks at the page and can tell me right here that there are some elements which need better contrast. So I click on that and it’ll actually give me kind of like a path to reach that element in CSS. I can actually even click on it and it’ll highlight that element in the dev tools for me.

So, in this case, for instance, this might be a little hard to see, but maybe I’ll try and boost the page. But you can tell that uh that these footer links down here right where it says right under this github logo, wears like web starter kit and help. These are low contrast texts that the audit has highlighted for me. So that’s something that we can read out for. There’s another extension: the let’s see the the chrome, accessibility, dev tools extension here we go so we’ll include a link to this as well.

It does very similar stuff to the axe extension, but one of the nice things that this extension does is when you highlight something that is low. Contrast it’ll actually give you a color suggestion, so it could be like you know. Maybe if you make the links, you know this different hex value you’ll be able to meet the what tag minimum. So, let’s see if we actually highlight these guys right here and then our dev tools, I’m going to go to where it says, accessibility, properties and see right here, lists this warning for contrast, ratio and I can actually click these color values.

And it’s very subtle, because this one’s actually like almost perfect – it’s not quite clicking these little sreades will actually change the text. Value on sites and it’ll apply an inline style for you, and that way you can see. You know what a better alternative color would be. The last thing that I try to do after I’ve done all of this is I try to recommend that you know whoever is building this site, integrate some excessive regression testing into their build process.

Again, if we go to github and we look up acts core, so this is the library that powers that axe extension, but you can also use this library as part of your build process right. So, as you’re running your automated tests, you can have a sample page. You can have axe core, look at that page and flag in accessibility audits, and you know those could then call your tests to fail. At which point you know you got to go back and you got to fix those issues.

Okay, so we we’ve covered a lot, but this is basically how I do my accessibility audits, it’s by no means exhaustive, but on many of the websites out there. This is how you’ll catch some of the major issues that folks need to work on. That can take their experience from totally broken to. You know at least sort of like a decent baseline experience for folks. If you have any questions, as always, you can leave them for me down in the comments.

Otherwise, you can contact me on a social network of your choosing, as always thank you so much for reading so yep hey. If you enjoyed this episode of alley cat, you can always catch more over in our playlist or click. The little subscribe button and you’ll get an email notification whenever we launch new stuff on the blog, as always, thanks for reading


 

Categories
Online Marketing

Player Driven Campaign Creation in 5e Dungeons & Dragons and TTRPG- Web DM

Jim Davis. You ever noticed your DM a little drunk on power and maybe needs a designated driver to take the campaign home. Well guess what we’re talking player, driven campaigns here on web DM player, driven campaigns? Why do you want to put the players first as a DM? What’s the benefit to me, the benefit of a player driven campaigns is bringing the rest of the table in and it’s less about, like poor Dungeon Master doesn’t have any input.

They don’t get to have any say in how their campaigns going. The players are just going to dictate the way everything happens with the setting. Oh woe is me all of the great wonderful imagine of things that Dungeon Master’s get to do. I don’t get to do it. There are games that are like that, where, where world creation and world building are collaborative and group based and and there are even some games, that everyone’s a GM basically yeah – we’re not really talking about those right here.

We’re talking about making your traditional sort of mainstream fantasy and and whatever other games, that you’re playing more player focused and using certain techniques to bring the characters front and center into the campaign and to make sure that the decisions that the players are making are centered. In that campaign and that the dungeon master, our game, master referee or whatever you want to call them, is not like subtly, nudging and and moving the campaign towards some predetermined end, but is instead letting the campaign breathe and and go where it goes as it goes.

Introducing new things into it to keep it going and keep it moving and and sort of keep it vibrant, but the players and their decisions and the characters and their their backgrounds and personalities and goals are the both of the motivator. The driving force behind the campaign and and sort of the center of it right, the opposite of this style, would be we’re playing through the diems novel. It’s the straight-up railroad, although to be fair, a hyper focused campaign with characters that gel together that they they have a goal in mind that they want they pursue it without.

You know a lot of tangents or getting distracted and they communicate that clearly to the DM. The end result of it looks remarkably similar to a railroaded campaign, write it. The end product looks as though it’s it’s. You know that they were always doing the thing that I am one of them to do, and but if they will only bought the ticket for each leg of that journey, sure maybe that’s what they’re all like forcing people on a railroad right.

They want to walk across the country and you go no, no. You need to stay back on the tracks right guys, stay back on the strikes. That is true, you know and linear play, which is a less. You know derogatory way of saying railroad. Interrogatories right, listen, incendiary way is built, the country we’re talking more of the you know. What are we going to do with the campaign? Let me let the players.

Okay, take the take the initiative here and and lead what some ways that a DM can keep the players in the driving seat and keep their hands like on the wheel natural one of the big things to me and – and I experienced this as I will like Prepare a campaign is I’ll, get to a point where I’m like. I cannot do any more prep for this campaign until I know who the players are, we need something here. We need to know who are the actors that are going to be in this right? Who are the characters? What do they want where their goals, what are their backgrounds, if I’m over here, creating like an intrigue heavy urban campaign with light, combat and lots of politics and and messing about in the criminal underworld? And things like that and and my players are over here – going like man we’re psyched to play these like mighty feud warriors who are going to do battle against their enemies, then that’s a mismatch there and and I’m wasting my efforts in preparing a campaign based on, Like intrigue and politics, and and backbiting and scheming, and things like that, when I’ve got a group of players who are itching for a game of kick down the door D & D or vice versa, right, maybe they’re really feeling like.

I want to play this thief to the best ability climb the ranks of the Thieves Guild talking to the players before the game starts before there’s even a session zero, and just like communicating this information to them. Many DMS do this right, like they’re like oh hey, this is the kind of campaign I’m thinking about running like what do you guys think? Are you interested you know what what about the next time we play is this campaign I can run.

This is the a good time to start asking specific questions of your players and ask them like what is it about your character and it’s connection to the game world that that player enjoys? What are the things in the players or sorry. The characters background that the dungeon master can use for play that they can mine and look and see like okay. Well, wait a second. This looks like something that you could spin a whole adventure out of, or this thing right here is like it happened in the characters background, but but who else was involved with it? Maybe we can bring these elements to the floor later on and and what you have is as you’re reading, through the backgrounds of your of your of the characters where you start taking notes like this thing seems like a secret that’ll come out later, or this thing Seems like something that we could tease out later into an adventure.

Maybe you know a secret from the characters past that they don’t want discovered or an event that happened to them, that that that’s going to come back later, they think is resolved, but instead it’s going to come back later. Sometimes you see these elements refer to as knives and as I’m not sure where that exactly comes from, but I’ve had a couple of DMS use that technique now and I kind of like it right.

You’re you’re, asking the player character. Your ass on the player like show us what your characters got. What are the things in the backstory that we could potentially use in the campaign or that’s potentially there? Now you don’t have to necessarily do that. You could just like ask for a regular player background, and then you find those themselves. You know you find the things in it that you can use, or you can like just straight-up ask a player hey when you show me your character sheet, that you include some kind of list or description or something about the things in your characters, background.

That would be interesting to include in the game those kind of different approaches to to just getting that information. Well, then, you get to take that information and basically seed the campaign with all of that info. Exactly exactly right. So let’s say you’ve got a map of your area of play and you’re, starting with you know, sort of a locality. You know maybe there’s a town or a village. There’s a couple of adventure sites nearby, maybe a full-on dungeon or bandits.

You’ve got your encounter tables and all these other kind things it’s now time to take those elements, and hopefully you have left room for the characters in in your prep. You haven’t detailed everything out to such a degree that there’s no room for the player characters to enter into your world and start changing things up. There needs to be a moment where the DM and the player sit down together and go okay.

What’s, in your character, background right? Well, this in my world, these things work like XYZ. Do any of those things sound interesting to you, or do you think they’re relevant to your character background, it’s a back and forth and maybe there’s a little bit of compromise where the dungeon master goes like well, I know it doesn’t have to be this way. That was just sort of my initial thought if you’re a character or if you have an a different idea, or you want something different for your character that we can find a place for that in the world.

Let’s take, for instance, like you’ve got some sort of character that belongs to an organization or something like that, maybe like a wizard’s guild or monastery or a fighters dueling Club or something right like what you have is is a an opportunity for the burst off of The player character to influence the world and they can say like alright, we didn’t know that there was going to be a fencing school in this location.

But we’ve got a you know: a fighter who’s like all about dueling, and there should be someone here that that fighter can latch on to in a sympathetic, NPC a source of potential quests, a source of interest for that fighter. Who can then go to the fencing school and feel like? Well? Maybe I want to join up. Maybe I want to become an instructor. Are there any jobs or anything that needs to be done there like? Maybe they want to take it over and you’ve got kind of a whoosh of martial arts sort of like the outside instructor, comes in challenging the master to combat and takes over and that spawns a whole sort of vendetta and and so the cycles of violence.

They just continue those cycles of violence. This is where you take a look at your map and you go. Is there anywhere on here that can be connected to the player characters background? Is there anything in the player characters background that I need to be sure to include in this player, and then you go do that with the with your NPCs? Are there any NPCs here who might be a good fit for something that happened in one of the PCs background? If it’s like a local going to ruler or something like that, then that’s a good place to do it.

Maybe a mentor of some kind, that’s in their background or an enemy. Those NPCs have a place in your world, and you you owe it to yourself and to the player to like really take a look and see like okay can i? How can I work this into the campaign world? How can I embed this NPC in that campaign, world and and like have it be a part of it, but it’s there for the player to interact with as they choose player, might completely ignore these things and do something completely different.

I know I have made characters where I was like. Oh man, this is the backstory. It’s going to be this and that and the minute we start playing. I forget all that and then I’m playing the character as they exist right now, and it’s not about what? What I came up with for backstory or anything can’t move forward. Looking over your shoulder, Jim Davis, just kind of soldier looking backwards, is actually kind of good advice, we’ll run into something: that’s kinda, what we mean when we say seed, your sandbox or your location or your setting or whatever it is with your player, character, backgrounds.

We’re talking about matching locations matching NPCs. Is there something in the PC background that jumps out at you and goes like who I can make an adventure out of this then like? Let’s, let’s do that like like put that in there and and work through the players? Stumbling across it or that becoming an active element of play, you know as the game unfolds well, sometimes that can actually, instead of just seating, an adventure like you said with the fighting school thing like if it’s the traditional, like, oh my my master, my whatever was Killed that can be like the whole source of a campaign that can focus your campaign and, like this character, their whole goal is to get to the end and kill that guy right and it just so happens the rest of the party like oh yeah, that’s the Guy, that’s the baron, that’s subject like suppressing this land and we need to take him out anyway right right if you’re, creating a dynamic campaign world where things change and things develop, and your NPCs have plots and motivations and goals that are going on in the background And you’ve created like a timeline for your campaign, that’s like: if the players do nothing XYZ events will happen.

If you have something like that in mind, maybe it’s an actual like timeline for your campaign. Maybe it’s just a general idea of what’s going to happen, then you start kind of creating these moving elements. The person who slew the fighters master at the fight school is now the baron. Well, that’s a problem right because you can’t just walk in and kill the Baron yeah, that’s going to be bad news, and so you now you’ve spawned this whole other thing.

Well, what if the Baron is also has a tie to the background of another player character. You’re looking for connections that you can potentially make and it’s a skill that you’ll have to develop as a dungeon master. This is this not how I used to run games. This is something that I’ve learned to do really over the last few years is really kind of focus in and make players the the center of a game.

First off I hated reading big wall character backgrounds. It was difficult to get to the game. Ax balem owns in a multi-page handwritten gym. I had an opus he’s going to write it when you use des sins, and I know – and it’s one of those things right. I always kept my every my that’s very true. My stance was, I’m just not going to read them like write them all you want not. I don’t feel like reading a bunch of stuff.

For me, that was a reaction to character backgrounds. I was getting at the table where it seemed like the most important things that had happened to that character had already happened, yeah that the most adventure that they were ever going to have had been written into that character background, and to me that signaled, a breach Of trust that the players who were playing these characters didn’t trust that cool awesome, amazing things would happen in their campaign, and so they felt the need to write this into the play to the character’s backstory instead of just saying like yeah.

Well, you know maybe some exciting things have happened to my character, but the best is yet to come and let’s figure out, what’s going to happen through play, and so I really focused then on making sure that in the moments of play there were interesting things for The characters to do now I try to do that as well as tie in what they’ve given me for the backstory to create the elements of play that we’re going to use.

Let’s use an example right running Warhammer yeah right now on on encounter RP, their twitch blog. We got a Wednesday game. You know I have a mini sandbox that I have packed to the gills with heretics and witches and mutant and chaos and all sorts of things for a witch hunter to salivate over and want to fight. And then it’s then we get the five player characters. The witch hunter – and you know its followers and it’s now time to look through the backgrounds of each one of those player, characters and go alright.

Alero is an elven, you know it’s a high wood, elf, Ranger type from you know: who’s had this tragic backstory with a hag or a Crone of some kind that that caused Alero Pruitt’s character to to sort of commit this atrocity. I already knew that there were going to be witches and hags and sort of like chaos, sorcerers and the like in my campaign. Well now one of them has to be Alero switch because otherwise, what’s the point of Pruett telling me that there’s a witch in his characters background when he’s with a witch hunter, you said I’m saying like there was a time whenever I would read a background like That and I would go like why you can’t tell me to put a witch in my game like there, whereas I’m thinking when I wrote it on like over a bunch of witch hunters.

This is perfect right. So now I look at something like that and I go oh well. This is perfect, like it makes sense, and – and I try to do this – you know a lot now where, where it’s like, if there’s something in a PC background, let’s like bring it to the center of the game – let’s put this in there, and this works really Well for very short, focused campaigns, but it also works well for like longer running ones as well.

Let’s talk about choice and how real those choices are because, like you said you know, sometimes demons don’t want to be forced to do anything in their game, determined by the players. Things like that. But what we’re talking about here? Players, if they’re in the driver’s seat and they’re going to be directing, where we’re going right, yeah and so when they make choices, to go places and to do the things in the world that you that the DM has set down like.

How do you ensure that that actually matters there’s a school of dungeon master, ring and game, a stirring in general that that you’ll see sometimes refer to as illusionism and this school prizes, the illusion of choice, the illusion of a living breathing world that reacts to player Decisions and prizes the illusion of all of these things and they use techniques diems, who sort of like this style and like this kind of play, use a lot of techniques with what we might call a quantum encounter.

There’s something something was prepared. An encounter was prepared, but it floats around the map. It’s not nailed down yet the reason why I personally really dislike this style of play is you illustrated by like you’ve, come to a t-intersection in the dungeon. You can go one way or another. If you look at for clues as to what’s in either direction, you realize that to the left there seemed to be clues, suggesting one type of monster or enemy, and so instead you go towards the right and the dungeon master goes and looks goes well.

You know I put that encounter. I was thinking it might be to the left or something like that, but they decided to go against it, the others I’m just going to move it, I’m just going to move that encounter right. The everyone knows that the bandits attack people that take the left fork in the road. The players take. The right fork in the road bandits attack them anyway, it’s at any time where, regardless of what the players say or do, regardless of the decisions they make and the choices that they that they they make or the past that they follow.

If the dungeon master goes, this thing is happening, no matter what that is an element of illusionism. Let me take a step and say there are some times when that technique is useful. I use it all the time in one shots, because you’ve got two to three hours to play, maybe a little bit more you’re trying to deliver a certain experience to to to make sure that the game is is whatever it is, particularly if you’re like doing a Focused one-shot or something like that right, you know, but you want a beginning, a middle and a beginning.

In a million you want a satisfying session of Dungeons and Dragons. Then you use different techniques here, but in regular play in a long-term campaign play overuse of illusionism and and for players like myself. Any whiff of it immediately takes me out, and I know I’m not the only one. I’ve talked to other players who are like this and other people who they do not like in the sense that when they make a decision in game, the dungeon master is just kind of humoring them and whatever the dungeon master wants is going to happen.

They’re just shuffling things behind they’re, just shuffling things behind the scenes moving around and counters, saying like oh, that NPC was always there. I understand the temptation to do this right. It’s sometimes difficult with a group of players who really keep you on your toes. It’s hard to stay one step ahead of them and so keeping things vague and loose and what’s there what’s not, can lead to these moments where you go like well, I’m just going to at the table.

Whatever the players come up with, I’m just going to immediately react to it. It’s going to be like a counter towards it, or this encounter that I’ve prepared it’s going to happen, no matter what we’re going to get to that, because that’s what I’ve prepared! That kind of illusionism that kind of forcing an encounter, it really does damage to the bonds of trust between player and game master if they find out, and if it’s not something that the party was like.

Okay with to begin with, you know well, there’s also a few other things that diems have been known to do and we’ve discussed them before and other shows it’s worth mentioning here again, but like fudging, yeah but dying young. Maybe it’s because you are so focused on the players getting to where they want to go you’re going to fudge just to help them along I’m young easy. Is that even okay, I don’t like that.

You know here’s the thing. Would you accept it from a player? Would you accept the player going like one man? I that’s thirteen looks like an 18 to me. I have to hit you know, I’m ready to hit right now, I’m just going to fudge this dice a little too good to get the outcome that I want. You wouldn’t accept it from players. We would call that cheating yeah with those kinds of players whether it’s like Oh fell on the floor fell on the crack of a book.

It’s a die whatever. It is whatever coded language they use to give themselves. Another role or ordinate get me the first hole that they had. We, you know we don’t like it as Dungeon Master’s when players do that. Well, why would we accept it from ourselves, even if you’re using a screen like let’s say, you’re using a screen, you want to keep your notes secret. You don’t roll on the open because you’re one of those DMS likes just roll random dice in order to make the players think a lot of things are going on legitimate technique, but guys the fake bro.

I don’t overuse it, but it is a legitimate thing. You’re, like you’re gaslighting, the PC anyway, the fudge, the altering of dice, is one of those things where. Why are you rolling in the first place, if you feel the need to fudge, but to me, there’s something else going on that leads you to believe. Like the outcome that I just got with this die, roll was unwanted. Then why did you roll the die in the first place? Yeah, and if it’s something like I don’t want to kill the players right now.

If the dice are just been going against them all night and and what should have been a standard just like walk in the park, combat has got them on the ropes and and you’re running the risk of like a TPK or something like that. Even in those situations, it’s tough for me to say, like oh yeah, you should like pull your punches there and like not have them. You know, be mercilessly slaughtered first off if you’re playing a modern, mainstream RPG, the likelihood of that happening is very low right.

You really got to like go after like really deadly hard combats in a row or some kind of monster. That’s going to like drop a bunch of AoE damage on you or something to like get to that point. So taking that thought and like flipping it. What about altering an encounter like once your PCs roll up in a room? And you get your thought? Oh, this is going to be badass in one round. They just bucket of steamroller for all them in one round and then there’s like a unplanned wave.

That comes in that’s another thing that I’m just not a fan of a style of gaming. That kind of like we’re going to adapt and and and change this scene. You know change the encounter in the middle of the scene or something like that. It’s one of those tools where it’s like there’s nothing necessarily wrong with it. I have really never seen it used in a way that makes the game more fun. Like I, you know, there’s a lot of times when the players like just like waste and encounter yeah right just like utterly waste yeah.

Well, they just hit the perfect, spells and attack excite order and just take a freaking enemy down and to me it’s like well sometimes like that. Just feels good, sometimes yeah, hey, we did it right, yeah. You know yeah, and I think it’s one of those things where, if that’s what’s happened, if you know first of it’s a one-off thing, give it to your party if it keeps happening, and you sense that your players are getting bored because you know the encounters that You’re, throwing at them are not engaging and not not fun or not whatever.

It is that you, the players, want out of any counter. That’s a behind-the-scenes thing, it’s time to up your game in terms of like making sure the encounter is challenging for the party. If that’s what they’re, looking for and including like very dinna me types and looking at the tactics that they use and and and altering your own, the way you play the the monsters themselves, those are things to get you a better encounter, but the the occasional like Man, the party really just curb-stomp these these enemies, that’s perfectly fine and in those situations like fudging the dice so that it’s a more challenging encounter first up, I there’s someone will know that one of the players particularly have veteran players or something like that.

They’ll know all right this place that we’ve said it many times. Please don’t fudge dice. We like rolling in the open. We like letting the dice fall where they may, because they tell their own story when it comes to campaigns. Adventures for the DM here. Yeah, PC driven campaigns right can that coincide with what has become kind of the bog standard of fantasy RPG, which is like Avengers type world-saving like the big, the big dam quest, the big dam question yeah.

Does that work like I? I think it can, but it is difficult and there are countervailing factors that that that push dm’s into into what I see as bad practices, a lot of, but not all of them, of the like Wizards of the coast modules that they put out for themselves. Follow this model, you don’t have to play them this way. You can chop them up and use them a lot of different ways, but if you run them kind of, as is, there is a a big threat that requires the party to be higher level to deal with right somewhere north of 10th to 15th level.

From the beginning, the party is going to be dealing with enemies related to this threat and working their way up a food chain and there’s usually a sense of just like the players are the only ones dealing with this world shaking reality altering campaign, changing kind of Threat, there’s a lot of reasons why I’m not fond of that model, but mostly it’s ones where an implication of a narrative structure to the kind of the Grand Campaign sort of a rising action.

The climax of falling action and all those sorts of narrative beats that you know are the hallmark of really good fiction, and – and you know you might might make for a really good story to just like read or even just kind of talk about. They don’t necessarily mesh well with the random nature of RPGs, where you’re kind of here, at least I’m kind of here and – and I think one of the strengths of RPGs – is being surprised that those emergent elements of play that you can’t account for that.

You don’t know, what’s going to happen, you’re you yourself as a dungeon master, will be surprised, but if you’re running this campaign, that requires, like all the players, are on board they’re all unified in this goal. To like stop the big, bad and save the world, and if one of them dies then that’s that can put a hiccup in in the campaign if all of them die that can you know bring the campaign to a complete halt.

If you know, none of them want to do something like that, they all want to pursue other things. They want to go off here and do some downtime activities and they want to do side quests. I think this is like the most common one where it’s like. There’s a sense of urgency to the campaign the soul monger is killing, is killing everyone. Who’s ever been resurrected, the Tia mots going to return or the demon princes or out of the abyss and and attacking everything like.

We must do something now and that doesn’t leave a lot of room for the madcap zany adventures that I find almost all of my like favorite role, playing and Dungeons and Dragons stories are a lot there are comes from just like. We were just messing around and this happened and they opened a portal before we had to clean up this mess, or we were just like we’re poking around this dungeon and found this thing and yeah.

So many things that happen just by happenstance and randomness and chance and dumb luck and and and the weird alchemy that is, you, know, playing the game and letting things emerge from it. That’s going to alter it and something to support that argument. The knocks against the Marvel movie universe and how you can’t have any kind of personal like like Jane, never shows up for Thor and everything he’s too busy saving the world all the time you can’t fit in, like all that, you know personal backstory right right exactly Unless you’ve got a party, that’s like all of them have created backstories that tie into the grand campaign, and you know, you’ve been doing a lot of behind-the-scenes metagame work before the campaign starts to like make sure it merges and meshes that’s a situation where you can, But if you’ve just got like some players, who made some characters and they’re just kind of there to play – and they want a meander and Wonder and do all these things and you keep probably pushing them along for the Grand Campaign – you’re fudging roles, you’re altering encounters, On-The-Fly, you start negating player decisions yeah, and this is one of those things that once a player decides to do something in the dungeon master decides.

I don’t like that. That’s not going to happen and they don’t take a moment to just say: hey player, what you’re doing right now. Is it really it I’m having trouble making it work for my campaign? Can we talk about it if they try to like subtly alter the course of the game, some of the most epic meltdowns at a table? That’s it have resulted from that kind of like attempting to manage the players yeah right.

Well, I mean you’re you’re subverting the player agency in the game. Therefore, there’s no reason for the player to be there to be there right exactly and and if it’s just like running through the dungeon master story, it’s not it’s not a fun engaging way to play. There is a place for dungeon master creativity. There is a place for the dungeon master to interject their own opinions, their own ideas into it.

This is not about completely ceding the field to the players, and you are just the mere passive you know entity at the table. It is about making sure everyone gets a chance to collaborate, and everyone has a chance to have their portion of the narrative that’s being created at the table through play as an element of that, and not just like. Oh, it’s, the dungeon master and the players are left to kind of scramble for some way to connect to the setting and world and then find relevance and meaning in it.

It’s the dungeon master, going like here’s a par baked setting. Let’s get your characters in the mix, finish it off and play we’re going to hit the ground running and some of the most amazing gaming I’ve had has come from this style of game of player. Centered effing, a man deafening I’m like well, and what I love about the sword now is they have enough albums that now I could just keep listening to them and not get tired of them.

Yeah yeah because I’ve even gone back and listening to listen to high country again, and it’s still, my least favorite, but there’s still a lot of fun songs on there like I get what they’re trying to do, they want to do a more mellow, chill rock album And they have every right to do that, yeah lad that they did know. I begrudge artists at all who want to do something different now that it’s like you know, squeeze every amounts of imagination out of your brain and put it up on a article.

It’s just like I’m going to do whatever is exciting. For me, you guys can go deal with it. Yeah there’ll be a article there’ll be another. Album yeah there’ll be another article, another album so yeah yeah, but goddamn use future. So good yeah we were listening to apocryphon while

Need a logo????

 

Categories
Online Marketing

Developer tools for designers – Designing in the Browser

Today, we’re going to dive into the tools that browsers give us to quite literally design in them will be using chrome, dev tools, a material design as our baseline to see where we can adjust and play. Let’s dive in like design tools, developer tools, help designers and developers build test and debug in the browser.

Luckily, there are a ton of great tools and plugins that make this process of prototyping iterating so much fun. There are tools from everything from color selection to finessing animation, to ensuring a nice user experience on a variety of devices and even testing load at various network speeds. Dev tools help us not only to see under the hood but to also make changes and decisions and see what those decisions look like in the browser, the medium in which we’re delivering the final product.

That’s why the series is so important as designers. We have to work in this medium and use it to our advantage to really have the most control and power over our designs and what’s the first tool that we need inspect element. This is the primary entry of dev tools. Inspect element is often how I open up dev tools just by left-clicking, an element and finding that inspect item in the drop down, inspect element lets you select an elements and get information inside of it.

This information includes the Cascade of styles, styles on various States, computed values, classes, shape and size and more you can even change the text content in order, the Dom of the element within the elements panel. You do so like this, so here I’m going to left-click on this heading and hit inspect, and now I’m opening up this information here – and this is the elements panel you can see. The sizing here is 350 pixels by 32 pixels and Heights.

We have the class name here of headlines, 6 and all of the class styles inside of that. You can see here that this Moz OSX font smoothing, is not being applied in favor of the WebKit font smoothing. So it shows you which styles are being applied and which ones are being applied. We also can see here this h1, so we’re getting styles from the h1 as well as the clasp on top of it, and it shows you which styles are being overridden.

For example, this font size of 2 M is being overridden in favor of a font size of 1.25 bream with the class MVC typography headline 6. There’s also a variety of element classes that I can play with here, and I think that this is a really great way to prototype. So inside of this, if I started typing MVC typography, we get an autocomplete evolve, the different type of graphic options, so you can just sort of scroll through and start to see what these would look like within here.

So you can see that headline. One highlight two aren’t actually making a difference and that’s because I still have MVC headline six selected, so you want to uncheck that and now we can see what the headline two looks like. So if you truly want to play with a baseline for the styling here, remove all the classes and then start to search the classes that are relevant to this element. So here we can see all the typographic styles and decide which ones make sense.

This also lets you separate your logic from your styling. Your logic is the date of the text content here. So this is a header one in this form fields element, but you can apply a class on top of it to style it. However, you want say we want to style this headline, one like a headline: five or headline six. We can do that and we can test that inside of this elements panel, I’m going to select the button now so here I’m just going to hit inspect on the button and it’s going to go right to that element, and we can see that this button has A few classes as well so right now we’re using the MVC buttons raised style.

But here I could select this outline style as well and put that in there. You can play with density inside of buttons, and these are all classes that I’ve just sort of playing with earlier applying them, seeing what they looked like testing this in the browser. So it’s a really powerful tool and there’s a ton that you can do by changing. Some of these Styles around you can reorder things in the Dom as well.

I’m going to just grow back into my UI here so say we want this headline. Maybe after the paragraph we could do that we’ll probably want to change that to be not an h1. In that case, you know make sure that your Dom still makes sense, but you could reorder things you could reorder the buns. You could reorder this remember this device text there and really just start to play with your UI in the browser.

So here you could even change the text of what this says: I’m finding this label here and now I can change this to always Pat disco, and now I’m checking I’m always going to Pat disco. This is a place where you can test our front language if you’re unsure how a piece of text will fit into an element on your screen, then you can test that and you can test this at various sizes. Let’s look at the color palette now.

In this example, we have a custom properties based theme playground for material design if you click to inspect the page and we’re opening up that panel and inside the HTML. You can see this route here with all the custom properties and their color values. So here we can start to play with what our colors look like. So if I want to change the primary theme color, I could click on that square and I have this whole array of color here that I can start to pick and choose and play with and see what that looks like in my UI.

Maybe I want like a bright paint color here. You can also change the color type, so here’s the hex code, if I click on these arrows here it changes from hex to RGB a to hsla and speaking of alpha. You can also use this alpha toggle to toggle the Alpha, which is the amount from transparent to full color and how much will show through to elma behind it. So we have all of these capabilities and another fun one.

Is this color palette, so in this color palette we get a base palette of colors, but we can also start to pick color from the page. So you see these page colors here were the initial page colors. These color variable is that the dev tools have found from the page as most proud colors on that page. So, if you’re working within a design – and you have a pallet that you’re working with you – can easily find the colors from that pallet inside of this dev tool here, there’s also the CSS variables that are being pulled out here that we can get the color values From and we can just start to really play with color in this way so say I want this to be a bright pink.

That sounds good. Maybe we want to change the color on that primary here. We can also change this color value. We can change the we can change the secondary color value, so we can change this to maybe a purple value and you can start to see how this cascades throughout the entire application. So now, if I scroll through, you can see that all the secondary values, like the check boxes, the switches.

This is all live code and we can see that this is in the browser, transitioned and transformed all these elements to be pulling in those colors in the drawer. Here we see a background on the active elements and that is also pulling from the primary color but being all but faded behind, so you can still see a contrast with the text on top of it. So by applying these color changed in the browser, you can really see what that looks like in various elements and in various states of those elements.

So let’s go back to the top up here and select this button. What we can also do in dev tools is figure out if something is accessible or not, which is a really great shortcut to have so here on the button, we have a color value on a background, color value. If I click on this color value, you can see that we have a contrast. Ratio of 8.5 point 1, that’s great. If we made that color value a little bit more closer to the background color that contrast ratio starts to get lower and you can see that that’s no longer accessible.

So we get a lot of help here when you have a color and background color within an element to help us make decisions on contrast and on colors that are accessible for our users. If we click this open, we can see where that’s accessible. So we can see that’s accessible for double a for a larger text and not necessarily for Triple A which means that we will have to have that white value for it to be triple a contrast, accessible and for this to work for our users.

Make sure that you’re keeping accessibility in mind at all times and you can use the color palette inside of dev tools to help you to do that, especially when it comes to color selection and readability on various elements. Let’s talk about the animations palette in episode 1, where we talk about motion on the web, we recreated this wringing button. So let’s inspect this element in dev tools and explore what that looks like behind the scenes.

So here I’m going to hit inspect on this button. I want to make sure that I have the button selected here and then in the bottom. Here we have this animations palette. Now, if you don’t have this, you can find it in this drop-down menu, this little kebab menu and you can hit more tools in the drop-down and then animations is the first item in that secondary drop-down. So that’s what’s going to bring up this animations palette for us so now, inside of here we see that we have multiple animations happening.

If I click open on those animations, we can find that on the button we have this grow animation, where it’s growing over time and on the icon. Inside of that button, we have this ring and I can actually toggle back and forth between here like this. Is a keyframe, I can go forwards and backwards. I can pause. I can play I’m going to pull this up a little bit here. So what I can also do is I can adjust the time stamps.

These are percentage based animations. So if I wanted to make this grow really long, this will break up the effect of ringing as it grows, but just to show you, I now have it sort of off-kilter. It’s ringing its ringing still sort of not changing its size, so you can start to really break things down here. I have it ringing very tightly in this section here. I could break that up too. You can move these around, so I can move it back and forth.

I can have this start to grow before I have the ring happening, I’m ruining this animation, but the idea is to show you that you can have animations that are separate from each other and then also test what this looks like together. So now I have it ringing off kilter from the size changes, but here, if you have a lot of animations that are complexed and you have to orchestrate them together, you can take a look at what that is what that looks like you can take a look At what the animations are happening inside of this element, so we have a box shadow change to as its growing and changing color there and then start to play with this start to finesse in the browser – and this is a really great opportunity for prototyping, because if Things are off, it’s a lot easier to see it visually.

That is, to try to read the code and figure out what’s a little bit off when those time stamps are different too. If you want to slow this down to get a little bit more of a finesse and detail here, you can also change the speed at which you’re animating. So here I’ve set 25 %, and I have this very slowly now, starting to grow and shake here. Starting to ring very slowly so this is another opportunity for you to adjust speeds and see where things are in a very precise way.

10 % is another speed option for very complex animations. Again, you can start to really get in there in the details and intricacies of these animations. Let’s talk about the device panel. Now I use this tool all the time and we’re going to showcase it. I’ve opened up the material dot, IO websites and I’m just going to hit inspect from any part of the page to open up dev tools, and here is that device toggle toolbar.

So I could also hit command shift M on my Mac computer, but anywhere that you’re using Chrome. You could always, let’s click into the browser, screen and open up dev tools, so I’ve clicked this open here. I have a few options. I have a responsive option, so I could see what this looks like at various screen sizes by dragging it over. You also have a drop-down here with some default devices like the Galaxy s5, the pixel to excel, to see what this looks like at various screen sizes.

We have the iPad pro here and you’re also able to adjust this from horizontal to vertical. So you can see what that looks like when you flip that device. That’s a little bit more dramatic on a phone here. So if you flip that you get a completely different layouts, you can also again use this responsive mode. You can even edit what the devices are that you want to showcase. So here in the dev tools, I’m going to pull this out and going to hit edit, and I have a bunch of devices here – you can add a custom device.

You can add devices that aren’t currently in your drop-down by default. So if you want to test, for example, on the iPhone 4 or if you want to test on the Nexus 7, I will now have these inside the drop-down. When I next open it so there they are iPhone 4 and the Nexus 7 somewhere in this drop-down right here. So you can see that that focal looks completely different than that iPhone 4 and that’s important for you to know.

As a designer. We also have various breakpoints here that allow for you to just quickly change between common sizes, mobile medium, large tablet, sizes, laptop sizes, and you get a percentage based visualization here, that’s scaled down to fit inside of this browser screen. So if you want, you can make this 100 % view you can make it a even larger view. If you want to sort of zoom into that, you can make it 50 % sort of fit in this area, and then you can see really large screens, 4k screens you’ve.

Even and if you don’t have a 4k screen, you can still test on those devices. Your design does change, based on the DPI of your screen and kind of is determinate of whether you have a Retina screen or non-retina screen, and that can also come into play when you’re deciding what images to send to your users. So if you want to test those, I have an example here with disco right how this high-res image and now inside of my dev tools, I can actually test to see that I’m sending a lower res image with the lower resolution browsers in my CSS.

I have a media query where I’m sending a different image based on the density of the screen. So here, if I have a high density, Retina screen, I’m sending a high resolution in and if I don’t it’s going to fall back to this low resolution image. So I can actually test this with a medium dpi screen inside of my dev tools, and this becomes really useful if you’re sending a lot of large images. And you want to think about performance for your users and for their devices.

And if all of those aren’t enough for you, there are some tools that you can use to extend these capabilities and make designing of the browser even easier. One of those tools is called this bug created by Adam Argyle. We’re going to fly over to him to have him explain why it’s so useful for designers right now. Hmm this page, I like the layout – I think, there’s a lot going for it, but it’s lacking some color.

Don’t you think? Well, let’s have fun and and try it out. Let’s make some color in here with this bug. All I have to do is launch it. In fact, I’m going to scoot it down off of here so that it’s not conflicting with the header and I’m going to start with the header. It’s just asking for a nice, bold color, don’t you think? What do you think of, like a purple, ooh, pink, a hot pink, I’m always down with hot pink all right? I’m actually settled that that’s great okay, you can see our guides tool is trying to help us make some alignment checks here, as we as we hover on other elements, you can get distance between them all right, but I’m also interested in changing this image up here And I’m going to drag in a new one.

Will I have an SVG icon here? It looks like this. Oh thanks for that that didn’t work out very well, but if I drop it up here, look at that. I replaced it. That’s kind of nice all right. So what about all of this these cards? I feel like they’re a little tight. I want to check. I want to check out their spacing here. So if I select I’m trying to select the card element in here and I’m having a little bit of a trouble because there’s so many elements in here look, I can actually select the elements inside of here.

That’s crazy town, but in order to get to these grid items, I’m going to select the parent and use keyboard navigation to help me get there. Someone hit Enter, which is going to select the first item as a child, so I selected the grid container. I hit enter and I selected the first one I hit command shift E, which is going to expand my selection. It’s going to find all the other elements to match.

I found them there. I still have the margin tool. So if I hit shift down twice, I’m going to add 20 pixels to the bottom, and that’s going to give me a little bit of spacing between my rows super neat. I can actually continue using this multi selection of I hit enter. I’m going to find that that each of these cards had a rapper element I hit enter again and I’m going to get the imaged container. That’s in the upper part.

If I hit tab I’ll find the next element in the layer tree – and I want to change the alignment of these, so I’m going to grab my flex box a line tool, I’m going to hit left and right and find a nice alignment and I’m going to Pick the center and I’m going to hit enter again and we’ll find that there’s a span inside of that container, and I want to change the text size of this. I grabbed the text tool I’m going to hit up on the the keyboard a few times here.

I’m going to hit command down to change the font weight and, of course it needs some hot pink. So I’m going to go over here to my color picker and grab that hot, pink from up top close out and see what I did and look at that. We brought some color to that page, really pretty quick and we’re able to just sort of express ourselves in a nice fast manner. That was fun. I hope you enjoyed seeing a little bit of taste of what vis bug can do for you super cool.

Thank you. Adam, I really love using dev tools. I use them every day for designing directly in the browser for prototyping for making decisions, and I find that these tools are just getting better and better and better, and that’s really exciting. For me, as somebody who likes to design and build the browser, what are your favorite to have tools? Are there any that we missed in the show, and that we didn’t mention tools that you use every day? I would love to hear your thoughts.

Please leave a comment below and thanks for reading the show we’ll see you next time save I just go.


 

Categories
Online Marketing

Design Systems with Brad Frost – The State of the Web

My guest is Brad, frost, web designer and author of atomic design and today we’re talking about Design Systems. Let’s get started so Brett thanks a lot for being here. Thanks for having me, I want to show off by asking you: has the metaphor of a web page exceeded its usefulness, yeah, it certainly has, as what designers we’ve been thinking about.

The web is in terms of pages for a long time right, it’s been with us since the web’s beginning right. We scope things out in terms of pages. If things don’t load in the browser says this web page hasn’t loaded and that’s had a really big impact on sort of how we structure our teams, how we scope our projects and how things are actually executed from from a web design and development standpoint. So, for instance, I work with a lot of large organizations and so they’ll have a team, that’s responsible for the home page and then they’ll have a team, that’s responsible for the product page and another team, that’s responsible for the checkout page and all of those teams Are doing things sort of independent of one another right, because they’re just focused on this notion of pages and as it happens, all of those pages are actually made of the same stuff right.

If we were to break things down, you have buttons, you have form fields. You have blocks and cards and heroes, and all these other things – and we end up with whenever you have these different teams working on different pages and thinking about things. In that way, you end up with you know one button looking similar but different than the next team, that’s working on the next page and so on and so forth, and you, you know, repeat that a number of times and span that out over a number of Years and you end up with a giant mess on your hands, it’s not to suggest that we should stop using the term.

It’s probably still useful for users. Yeah only see things as a flat page, but from a design and development perspective. It’s kind of updated yeah. Yeah, that’s right exactly it’s it’s! It still comes together as a cohesive whole and I think, that’s important, especially as people get into talking about design systems. A lot of people have a big misconception that oh design mean you just sort of isolate things at their component level and just designed the button and just design the sort of headings and just designed the card in isolation.

But that’s just not true. That’s you know. It’s important to sort of realize that yeah things do all of those components, do come together and form a cohesive page at the end of the day and that’s what the user sees and interacts with. So it’s important. It’s not an either-or thing, but we just have to be more considerate about how we make the parts of that page as the web and technology as a whole progresses forward.

How has that changed the way that web designers think about serving pages to users and the ways that the websites are accessed yeah? Well from like an access standpoint or from like a design and build process? The fact that a user could be I mean even these days like accessing the web from their refrigerator. You never know the form factor or anything about the user’s device. You can’t make any assumptions: yeah yeah, that’s right and again it’s gotten really complicated and that’s why I think design systems have become as popular as they’ve been because the devices haven’t slowed down right.

The device proliferation is still happening right. The number of contexts – and you know, screen sizes and form factors and, and you know, yeah native web embedded devices different screens. Different sort of you know. Mouse and keyboard touch inputs, and you know voice and, like all this. Other stuff is just the amount of things that users have or that that designers and developers have to consider as they’re, creating user interfaces and creating these experiences I’ve just sort of accelerated, and we can’t keep up right.

We can’t create bespoke pages, for you know: here’s our small screen view and here’s our tablet view and here’s our desktop view. It’s it’s so we’ve had to sort of pull back out a necessity just because we’re on the hook to deliver more features, more services to more users and more context using more devices in more ways than ever before, and it’s like unfortunate. Our budgets have been increased and our resources haven’t increased with that same sort of exponential curves.

So that’s what’s like sort of forced us to sort of step back and and reconsider how this all gets done, given that there are so many different viewport sizes and everything does that mean that the flat Photoshop file is no longer very useful as a means of Conveying the design, yeah, yeah and and still to this day, I’m working in if Photoshop might be a little long in the tooth when it comes to web design, but same thing happens in sketch in figma.

Just last week I got from the clients designers, you know a mobile version of the comp and a tablet version of a competent desktop version of a comp and and a lot of that’s just sort of wasted effort. Really because all three of those things in isolation are sort of one they’re already alive, because it’s a picture of a website not an actual website, but all those spaces in between is where things really fall down right.

You can sort of paint a picture, especially in a in a static design tool where there’s artboards and you could just sort of move things around in free space like that’s, not how things work in the actual browser right. There’s things like some order considerations and all that you can’t just sort of go on this side screen. I just want to move this from here to here, or this I’m just going to swap this around it’s it’s.

It’s really important to sort of make sure you’re. Considering the actual medium that this user interface is going to come alive and and do that much sooner in your process, I want to ask you about concept reviews before called design Det. What does that mean, and how do you avoid going design bankrupt? There’s no design debt and design bankruptcy. I’ve never actually heard design bankruptcy. Before I like that, I I think a lot of places could declare its design bankruptcy.

I think you know just when it comes to design debt. It’s you have. You know number of teams working on different things and just those we were saying you know working on different pages or different products right across a company and you sort of can can take a cross-section and sort of see a lot of discrepancies. Just in that. But that’s just one moment in time when you stretch out that process over time, especially products that have been around for a long time, the googles of the world or eBay or whatever it becomes like a little sort of Benjamin Button.

Like experience as you click through pages, you get further back in time in these older crustier user interfaces, you’re like how did I end up in 1999 and all of a sudden? So so I think that that’s sort of that sort of that visceral feeling of design debt where it’s like you have all of this sort of old stuff that was created. It’s you know once upon a time and that whenever that was launched, it was the new hotness and the new hotness becomes the old crusty experience.

You know pretty quickly these days right so so I think that the more sort of deliberate and the more sort of systematize you could sort of control and wrangle all of those those sort of user interfaces that are, you know out there in the wild. The better. Your chances are going to be as sort of like reducing that that sort of design debt and that’s again, I think, a big crux like that. The crux of design systems is to sort of help.

You know eliminate that debt to basically take those $ 19.99 designs and say: okay, we’re going to update them with a new design language, but we’re going to do it in a very sort of systematic way so that the next time we do a big redesign. We have actual hooks in there that we could actually sort of lift up the quality of in you know so to evolve that design language like flip the switch and roll that out to a bunch of places, sort of simultaneously or or in very short order.

Instead of like, oh, we have to do this big monolithic redesign, and we have to do that for each of our products again and again and again so the developer experience must be a lot better when you can have like a single source source of truth. For your design, but also the user experience as well, could you describe like what it might be like for a user to be on a site that has designed yet yeah? I mean it.

This happens all the time I mean so. The e-commerce example is a great one, just because I think that you know ecommerce sites, you know super sexy homepage or the super splashy super current right. It’s like it’s got the latest. You know shop fall trends, their shop Christmas like coming up or whatever. That’s like you look very campaign driven. So it’s often like a very modern experience. You sort of like click into like that.

Maybe a product detail page or a product category page that sort of feels modern ish. You know it’s like sort of a little bit more meat and potatoes like e-commerce stuff. So it’s like those templates sort of probably feel pretty good, but then, like you, might get to the shop card or if you like, actually log into your account, it’s like those things feel way different and and then you get to the checkout flow.

And then you know that might be sort of way long in the tooth or it might be sort of built by you know an external vendor or something because they’re processing, credit cards and stuff like that. So it might not actually be integrated with like the rest of the site at all. So what ends up happening for? Why that matters from a user experience standpoint? It’s not just about other things, look different like because who cares as long as that’s effective, then that consistency shouldn’t ever be like the number one goal of any of this, and I think that that’s when we talk about Design Systems, I think that’s another misconception as That, oh, we just want everything to look the same everywhere and that’s just really not true, because if your metrics are doing well and stuff – and you know the buttons look different on the checkout page then on the the product detail page, then that’s fine right! No harm no foul, but the problem is, is whenever you’re, a user and you encounter say a date picker or something – and this is a favorite one of mine just because those are hard to build so often times developers just sort of go and grab something.

You know a library they find on the internet somewhere and if you’re, you know say like at an airline or a hotel chain, and you have four different developers grabbing four different date – pickers across the site. Now, all of a sudden, every time the user needs to pick a date, they have to relearn that new library and that, even if it’s just fractions of a second or a second or two or the, where they’re like oh wait, I’m used to booking from the Homepage, but this is a different convention that slows down that process right and that has a negative hit on you know, certainly when you’re talking about you know booking flights or hotels or something that’s going to cause it dip.

So that’s sort of consistency from a user experience standpoint right that ability of like oh yeah. I’ve encountered this pattern before and I know how this works. So I could just sort of roll on and sort of fill things out a lot faster or interact with this thing faster like that’s. That’s what we’re after right, so that consistency for consistency sake not so much, but consistency from a you know, sort of mapping to what users are used to already like yeah.

That’s, that’s! That’s where it’s at one of the people, problems on a design and development team is not sharing the same vocabulary or calling the same components: yeah consistent yeah. So what are some of the problems of that? And how can designers and developers get on the same wavelength? Yeah, so that’s one of the biggest things that I encounter is as an one exercise that I like to do with design development teams whenever I’m working on design systems with them is right out of the gate, we conduct what I call an interface inventory, so we Basically go across their entire sort of suite of products, or you know, whatever user interfaces could be served by their design system and and sort of divvy things up is like okay, you go hunting for buttons, I’m going to go hunting for sort of.

You know input fields or whatever, and then we sort of do that as a group and then what we do is we get together and sort of present what we found to each other and that’s where it’s really fun, because, especially whenever you have designers in the Room developers in the room, QA engineers, business people in the room right like the product owners, like all these different disciplines and you actually sort of have to articulate what your UI is right.

So so somebody will get up and it’s like. Oh and here’s this admin bar and then somebody gets admin bar. We call that the utility bar right and then the developers are like. Oh, we we just mark that up as the gray bar right, and so it’s like. Okay, there we go right. You got everything out on the table right, these inconsistent names for the same thing, and of course that means you have to have again just like that sort of user experience you have to like slow down.

You have to have have a meeting to figure out what you’re going to call this thing like, and you know a lot – can get lost in translation in between design team or different disciplines, but also different teams in general right. If team one is calling it a certain name and team, two is calling it something else. That’s a big deal right, so so again, so bringing this all back to Design Systems. What that it, what a design system can do is sort of centralize your sort of UI patterns call them names right, give write guidelines around them, so that everyone is like, literally speaking, the same language right.

They know what you mean when you say utility bar, and you know how to use it where it’s useful, but also crucial. One of the other things that we found really valuable in in creating design systems for clients is here’s. What this thing is: here’s where it’s useful, but also maybe here’s some gotchas or here’s where it might not be useful, and maybe you want to use this other thing. Instead, what are some of the trade-offs of investing in a bespoke design system versus taking something off? The shelf, like a bootstrap yeah, that’s a big one and I’d say it’s tough, because tools like bootstrap and material design are already made.

They’re they’re, they’re well tested right, they’re in use by giant companies like this company called. Have you heard of Google before it’s like? It’s pretty big one. It sounds familiar yeah, so so a lot of these people right who are using tools like bootstrap and material design, they’re like oh, this has been tested by these. You know giant companies, so I could just sort of grab this and go and I don’t have to do all that work myself and that might be true and there are sort of instances of that um.

I think one of the big things that is important to sort of recognize and consider whenever you’re reaching for these tools is that it’s like you, don’t own it and it might be attractive from sort of you know, inefficiencies sake at first but as time goes on Right at the end of the day, your boss or your you know your product owners or your clients or whoever they are they’re going to say. Oh, we need to do this this way or we need to add this feature and all of a sudden, you’re you’re.

You have to learn and become sort of fluent in this other sort of system that you didn’t write, so so it can work and you can do things and extend things and customize things that works with the grain and these frameworks, but oftentimes. What I found is I work with clients that end up sort of working against the grain and they end up having to sort of undo a bunch of stuff and write a bunch of other custom stuff.

And then they end up in this sort of like weird messy middle ground, where it’s like. This is our sort of hacky stuff that we’ve done to sort of make things our own. But then also crucially, I’ll say that, from like a more of like a front-end architecture standpoint, I think that it’s sort of like safe, you know you got good bones to build upon, but like material design and boots actually offer a sort of anesthetic right.

They provide anesthetic and that could be helpful because again it’s like oh here’s, some good, looking buttons, here’s some good, looking form fields, here’s some good, looking components that I could use, but if Nike Adidas Puma, if you know Reebok whatever, they were all to use bootstrap For their redesigns, they would look frightening Lee similar right and that’s sort of not what they’re going for so there’s like there is this sort of branding aspect of it right this own ability that sort of gets lost whenever you’re sort of all using the same thing.

What are some of the challenges or unsolved problems of design of design? I mean I, I think, sort of specifically to design systems like a lot of there’s some things that are around sort of you know, tooling, and sort of figuring out how to keep design tools and tools, expanding quiff. You know what’s in code, that’s definitely one of the most. I feel like tangible sort of problems that but there’s a bunch of teams, doing a lot of work to try to solve that and startups and stuff that there are really exciting.

And so a lot of them look promising. And I don’t necessarily think that that’s you know far and away the biggest problem. That’s out there. I think so. Many of the problems with with design systems have to do with the sort of people have to do with communication and collaboration and sort of figuring out like how do we get this stuff adopted into our products right? How do we sort of communicate when things aren’t working as planned like? How do we sort of you know, establish solid processes for releasing new versions of the design system and letting everyone know like here’s one? You want to use the design system or here’s one.

It’s sort of safe to sort of you know, deviate from that system or build upon it or extend it, and how do you roll that back into the system? So a lot of that sort of coordinating a bunch of different people who are all suddenly relying on this, this design system product that stuff, I feel is – is still very tough to crack because it involves people and your you know the health of your your you Know design and development culture and like how well everyone sort of you know, collaborates together and like, of course, that’s that’s tricky right, so you could like you.

Could I could say things like here’s how I would create a governance plan for a design sister for a design system and here’s how I would you know, get these teams to work. You know and communicate more buts and you know easier said than done. Okay, so how much of a design systems success depends on the designers as opposed to the developers? What is their role in the success of it? I think, and – and this might be a little controversial design systems is sort of an unfortunate name because design systems are like.

Oh, this is about design, and it’s really not. The design system is, as I define a design system is, is how the official story of how an organization designs and builds tadaryl products and there’s a lot of ingredients to that story. And yes, like the design language, you know what what the brand colors are, and you know the the rounded corners or not of the buttons and stuff like that sure that that matters.

But that’s actually like a pretty tiny slice of what a design system entails, and so so when it comes to the success of a design system. So much hinges on that design system living in code and living as a thing that engineers and developers can sort of pull down into their application and sort of you know import a component and sort of see that design systems button or whatever show up on their Screen and then they’re able to sort of you know pipe in whatever sort of attributes and click handlers and whatever to sort of make it.

You know, breathe life into it, make it real, but you they sort of get that stuff for free right. If all you have is like a sketch library or some like Zeppelin file or some like like little, it’s a style guide thing where it’s like: here’s, our colors and here’s or whatever, like there’s so much that gets lost yeah if all the developers are doing is Like copying and pasting some hex codes in there, you know sort of crappy like development environments, and it’s just you end up with a bunch of spaghetti, even if they’re all using like the same color blue.

It’s not like systematize right. So what you want to get to is, you want to say like if we change our brand color blue – and this actually just happened on a project of ours – got a brand color blue and actually it wasn’t passing the accessibility level that we wanted, and so they Actually had to sort of you know: tweet the the color blue in order to make that sort of pass. You know because sort of cut the accessibility, mustard and with a design system like you literally, have you know a variables file or is these design tokens? You sort of tweak that value there and then that ripples out to the entire sort of design system right and then that gets packaged up in a new release of the design system in code.

And then you know next time the developers pull that down. Those sort of get and see those updates, so so, coming back to it’s like yeah, like the design language part of it, like the look in the feel of it that matters, I’m not going to say it doesn’t matter, but it’s almost just like you’ll, like do Your thing make it look good like I, you know. I trust you be systematic about it right. Thinking about motifs that are going to sort of like you know, translate well the different components, but, like so much hinges on like getting that stuff into a place where it’s consumable by the actual sort of you know, environments that users will be interacting with your products And that’s what we spend, probably the overwhelming majority of our time and effort on is actually like building out those libraries with components right, an HTML, CSS JavaScript.

You know bundling that stuff up and like sort of working with development teams to make sure that they have what they need in order to use the system successfully. So, to what extent should a design system anticipate the chaos of user-generated content like errors and long names? What is the actual like breaking point of a design system yeah? Well, I think that the breaking point of the design system has everything to do with how well you consider all of that stuff right.

So if, if it’s user-generated content that you need to account for and you’re in your UIs, then you have to you know, consider things like character limits and things like that. But you know there’s many other flavors of that as well. You know internationalization right, right-to-left languages or just you know, German will wrap onto multiple lines, and things like that – and this is where I think again – sort of designing and building components in isolation is a bad idea because you could sort of you surf fall into the Trap of saying like well, here’s this like perfect scenario where you know everything’s filled in and the card has this nice sort of you know image I found from unsplash and it’s like really nice.

Looking and you know, as it happens, the users name is Sarah Smith and Sarah doesn’t even have an H on it, so it just fits so nicely onto one line and of course, the reality of of our user interfaces is anything but that, and this sort of Also comes back to like the trap, was sort of relying on these sort of static design tools to sort of handle that they’re up until very very recently, there weren’t even conventions in place to sort of handle like dynamic data, so that’s sort of how we handle That this is where atomic design as a methodology – I think, really shines.

So what atomic design does is basically helps people consider the whole the pages, the actual product screens in various states and configurations, as well as the sort of parts of that hole right. So the underlying components that build up those screens and at the page level of atomic design, what we’re able to do is articulate here’s. What our homepage looks like with this. You know the fall campaign with the leaves – and you know this tagline and this call to action button that takes people to this and and whatever, but then you’re also able to say, okay and then here’s what this that same page looks like in German or here’s.

What that that same page looks like with you know the Christmas campaign and oh that’s, sort of image that we’re using that has a bunch of Christmas ornaments that actually is sort of you know, impacting the the readability of the text. That’s sitting over that image or something like that right, so you could start seeing where the UI starts falling down and then what you’re able to do is is sort of take that and learn from that and sort of go back to that hero component.

At a more atomic level and sort of say, okay, we’re going to maybe add a variation of the hero component that adds like a little gradient overlay so that the the legibility of the text always sort of you know pops over the the image a bit more. So how we sort of do things like in our own workflow, with that we sort of will create sort of you know, try to represent the whole bell curve. So it’s like what does a card? Look like what does sort of like a kitchen sink card? Look like with like the maximum character count that you might be able to sort of upload as a user or something or what happens if the user uploads the profile picture, what if they don’t right, and so all those various states and sort of you know, mutations Of the other component, so to get that sort of commonly used case down.

Of course, as like a starting point but like you really do have to represent like here’s, the extreme and here’s the empty and sort of everything in between as well and the only real way to test. If that actually works is by sort of plugging in real products and Aereo’s into your user interfaces and by sort of having that best sort of atomic design system wired up where, like the pages, informs and influences the underlying components, you’re able to sort of make changes To those components with which, then, you know, inform and influence that the actual page design, so it’s sort of like a virtuous cycle between like the design system and the pages and screens that that system builds.

Finally, what resources would you recommend for people eager to learn? More about design, Cisco there’s a lot I feel like. I have a hard time, keeping up with them anymore. There’s a there’s a number of really great resources, one that I help maintain is a resource called style guides i/o, which is a collection of, I think, we’re over like 200 50 examples of public design systems and style guides that are out there in the wild as Well, as sort of talks and books and resources and tools around a design system, so that’s just like an open source resource repository that people contribute to and sort of, submit poor requests to.

There is design dot systems which is maintained by Gina Ann who’s done so much work for the design systems community. She has a clarity conference, which is a conference dedicated to design systems. We have a podcast, which is a little bit in hiatus, but where we interview people that work at different organizations who have spun up their design systems and what they’ve learned and sort of you know struggled with as they’ve as they’ve done it.

Stu Robson has a really fantastic design systems newsletter. That’s part of the design, dot systems, sort of universe there and then there’s also a slack group all about design systems as well. So I’d save it like that sort of has me covered for sure and again there’s like a lot of activity there and new stuffs happening every day and people are learning from things you know from each other and plugging them in at their organisations and sharing what They’ve learned and like that’s really for me, the most exciting part of all of this is just sort of you know.

Here’s some concepts here are some things that we’ve found useful share. Those people take them, learn from them validate or invalidate them and sort of share. What they’ve learned and then everyone benefits from it, so your book is also available for free to read online right where it is yeah yeah, so you could read it at atomic design. Brad Frost, calm great breath. This has been great. Thank you so much for pyrite.

Thanks so much for having me, you can check out the links to everything we talked about in the description below thanks for reading, we’ll see you next time.


 

Categories
Online Marketing

Design Systems – The State of the Web

My guest is Adam Argyle he’s a developer advocate at Google and creator of the viz bug, design tool and today we’re talking about the state of design systems. Let’s get started Adam thanks for being here, so I want to ask you what purpose does design fulfill on a webpage? What are its goals? Mmm. That’s a good question at a high level. I feel like design, does a couple things we have.

You know it’s supposed to be guidance. You want to have credibility, so that’s like the better designed it is the more credible it feels right. You don’t want to spend money somewhere where it looks like there’s no design, even though that might not accurately reflect the product or what you’re investing in. But I like thinking about at a very, very high level. What design is doing is we have affirmative design and we have critical design and critical design.

It’s the type of design that is exploratory. It sort of provokes you Brutalism as a good example of critical design where you’re looking at something is like wow. This is like stark and shocking, even though it’s sort of retro in a way so there’s design, can do really interesting things to your psyche. In terms of like challenging you and or we can see more of this affirmative design, which is kind of getting more popular, it’s safer, where you’re sort of piling on to the social norms of like what’s going on in design because it’s safe and it’s familiar and So folks will visit your site and they might feel old into an action because they visit it and it’s beautiful and airy and they might be looking at something terribly, not attractive, like let’s say a scrubber.

For you know your sink. You can make a scrubber and a sink look very nice, so you visit the site and says: do you have problems with your sink feeling? Dirty and nasty. We’ve got the scrubber for you, so it’s like every design States the problem, and that brings in the solution and that’s sort of lulling you into this behavior there like eyes and this familiar you’re here it looks like a normal ad.

It has the normal flow. Let me guide you down this path and we’ll take you through this excellent experience. So design does both those things that’s really high-level, to does a whole bunch other stuff too, but yeah, I think that’s sort of what it’s trying to do is credibility flow. You know somebody else has done the work to organize it for me, so it’s supposed to be easy, I’m supposed to be here to consume quickly and get a task done, guiding the user towards the solution for that weapon yeah, and in that case it’s usually the Solution that the webpage wants you to go down, which is where you know, design, has a little bit of cunning in there.

Some people say design is a type of trickery as well, which right we have like dark patterns that are like legit trickery, or we have light patterns, which are it’s trickery or we’re just sort of like? No. This is just a healthy guidance. You can you could diverge it’s okay, yeah, so in terms of the tools that designers have what is a design system and what are its goals ooh, so a design system, that’s sort of it’s a hard one to nail down.

It’s gone through all these phases. Ah, my current opinion on what a design system is is where we previously had design deliverables that were sort of like a design system, and then we had engineering deliverables that were kind of like a design system. Well, we have with a design system, it’s a merging of the two where designers have their symbols and their files that generally represent the same components that engineers are making and there’s like this coming together moment and a design system.

That’s what I think we’re currently personifying that as we’re before engineering had like a pattern, library or component set, and then the designers had a style guide. So what are some of the principles of a good design system? Ah, yes, okay! So, at a high level, I think a design system intends to make future us have easier decisions like in the future. I shouldn’t have to invent a new button. I shouldn’t have to invent a new login form like these.

Things should be solved already, so at a high level. That’s one of its most. You know valuable propositions. Is that future you, or even, if you’re, being really consider it like other customers of your design system, customers being maybe other development teams or the designers? Maybe even like the marketing team? You have people that want to use that those are. I call them your customers. So a good design system is considerate of them and it empowers them.

But I like a low level when you’re implementing a design system, you should have things like reusability extendibility. You should have accessibility built in. Essentially, these LEGO pieces should have solved a bunch of problems for other people already and and be battle tested and have gone through. You know: ok, I’m gesturing right now, but the gesture is imagine a rock that I’m tumbling into a pearl like we’ll take and then we’ll have a bunch of pearls to give so that other people can and get their tests done easier and also there’s some something About that, where you need interactivity as part of your design system right, I have seen some design systems that don’t just talk about the component.

They give you levers to pull so you can visit a page and there’s some tools out there that do this. Like a story book is one we have other tools coming like frame racks, so there’s like design tools that are coming out very either very focused on this one particular use case, or you have ones that are a little bit more documentation focused so they’re less like Compose and build and more like no tinker and play and assess what component you need beforehand, and I like that tangible learning it.

It’s really nice, especially for someone visual like a designer to come into a design system website and peruse and find a component and be curious and play. It helps get really sticky the features and the capabilities of that in terms of the life cycle of a design system. Is it ever really done or is it more iterative? No, I think they really only grow. I have seen them be reborn or we, you know, we’ve seen them bring reborn with brands or they’re reborn as complete redesigns, but no, I don’t think they’re done.

I think they’re growing. I think we’re making teams now to facilitate these things, because they are so difficult and they only grow in complexity because well, there’s considerations that are often lost like mobile. You know. A lot of design systems are like a look at our sweet, desktop design system and they’re like cool what to do on mobile. We’re like we’ll get there same with like accessibility and layouts and there’s like a few other things that I think some design systems can do to grow and be even better, and I think that’s just what we’re discovering right now, like folks, are playing and they’re trying To figure out what aspects of the design system are really meaningful on? What’s crufty and you know for young industry we’re all still learning kind of like what this means.

Do you have any examples of older design systems that we draw inspiration from today? Whoo, yes, okay, whoo, okay, so old design systems. I have a bunch of them that I’m a big fan of we could go back in terms of like inspiration and things that are influencing what we’re doing today and go back to print and be like print. You made beautiful style, guides or brand guidelines. You would give Legos to a client and that client could go put them on an envelope.

They could put them on some stationery, so that was a very early set of like Lego deliverables that had some rules and some intentions. Then you have operating systems that feel very much like design systems as well right. The first iPhone had a design system for sure they even had a document, the hIgG right, the human interface guidelines. I would like to see more Design Systems have a hIgG. Are we super cool all right, and then we had Android with Halo.

These are inspirations to me, Android with Halo, and remember that one dark and glowy everything looked like it had like lightning, bolts or like neon around it. Actually, you know what it looked like that was looked like that Batman movie was. I was like a UI based on that was kind of cool. It’s right. We had platforms, we had web kits, oh yeah, so this is like material bootstrap, html5, boilerplate, jQuery, Mobile yeah, those were and what they call those right, those weren’t design systems.

They were component. Libraries at UI framework, UI framework, yeah pattern. Libraries, they had all these interesting names. I think we also take inspiration from fashion. We have this kind of goal right now. I have this metaphor. I like to think about a design system. It’s like you’re trying to make a capsule wardrobe. That’s everyone else in the company should want to wear right. You’re like okay, I’m the designer.

We need to make uniform, looking things across our site and they should be familiar and an elegant, blah blah blah. So what they do is they go make this this design system? That’s essentially like making a set of a wardrobe like you can’t screw this up. Just walk in the closet. Grab a shirt grab, some pants grab. Some shoes grab a hat. Who cares? It all goes together and that’s a that’s a term from well.

I learned it from Pinterest. I don’t know where else it came from though, but the capsule wardrobe idea is this yeah grab and go wardrobe and we’re trying to make a grab-and-go design system. I’m going to hoppy and grab a couple things make a new layout, be on my way, so fashion, I think, is influencing us in that way too. They want to be very minimal. Alright, it’s almost like Marie Kondo, your your wardrobe like go in and pull all the stuff that doesn’t fit in the capsule.

Make it reduced set like reduce your anxiety by you, know, reducing your options, but I have a question about that like when you limit your wardrobe or you limit like your UI elements. Is it true that you can have one size fits all UI elements or sometimes you need to reach out and use something new and different, whoo right cuz, you don’t want to wear my clothes. Do you know yeah you should like dude, your wardrobe is well.

It looks like your wardrobe right like what, if I want to have my own looking clothes, and this is where it comes down to like well, and I have two opinions here. One is, I don’t think designers want to wear other people’s clothes. So it’s to me it’s a little interesting that we’re trying to unite. I think the goal is super right, like that. We do need to make reusable Legos that are extendable and and are helpful for future problems, but at the same time, the more you try to abstract and reduce these like very subjective visual emotional things into like little units.

They start to feel very functional. They lose some of that that excitement that creativity and I think people want to start breaking out of your design system at that point they feel trapped. So there’s like a there’s, a there’s, a struggle here with design systems, which is we want to empower everybody, but we want to not be trapped. We want to be able to pick clothes every day that are really easy for us, but then we want to be able to go out to a fancy dinner and not look like we’re dressing from our capsule wardrobe and especially if you have customers, customers want to Have unique aspects of the site, and so naturally they’re always pushing on the design system to extend even more.

This is a good shout out to to material and Google material. The new version looked at what their customers were, doing, which the customers for materials tons right. People all over the world using it from dashboards to mobile apps, and in that case they looked at how people were using it and people were constantly customizing it right. They didn’t want material, vanilla. They wanted material with my Flair, whatever that Flair was like right, like I want crunch material, so oblong it doesn’t exist, but maybe I should make it no, but yeah that they looked at their customers and they empowered them to customize, in an extent material as a Base, I thought that was really observant and it was like research-based it’s just a very, very nice plan for the next version of a design system to lean so heavy into customization and enablement of people to fork.

It’s almost like they’re letting people fork to to manage their own and they can still pull updates in that’s a really great segue into my next question, which is there was a comment on our previous article in March, the state of CSS, with you know, Kravitz our Guests and this commenter is cool twisted TV says the problem. Seeing lately is that most websites now look the same. It’s like they all have this standard template or something, unlike back in the day when flash was a thing, people used to create out of bounds designs along with tons of nice animations, but nowadays everything is flat.

All gridded up the same way with a few minor positioning tweaks here and there I miss those kinds of designs that today we rarely now see all because everyone is now into this flat and blocky design. Look slap a few fonts on a page and add a few pics and color on the background and you’re done: that’s 2019 for you. What do you think about that? You know we’re. Can an agency even working at startups? We couldn’t take a lot of risks and we were moving so fast.

The only thing to do was affirmative design. I think what this question is kind of poking at is affirmative versus critical design and they’re upset that everybody’s gone affirmative they’re, like ah you’re, just piling on to the currently socially acceptable design patterns and strategies. That’s so lame, which I agree, because I built a lot of flash websites and yeah. You could land on one of my experiences and it was like you’re in a fishbowl right.

It’s like fishing yeah. You could hover over the treasure chest and would pop open and bubbles would come out. It was way more critical, design way more like experimentation and in creativity was like. You were unfettered, but at the same time, if we think back at that because there’s, I think, a lot of joy and and fun that was there, it was less serious and it wasn’t really achieving inclusive design as well.

I think one of the reasons folks other than you know you know being safe – is that flat and and choosing some these modern strategies. They really make accessibility easier because you’re not going critically, you don’t have to go undo something to be inclusive, so I think inclusive design, which is a really impressive and great push that we’re doing right now. It’s also kind of inhibiting some of our exploration because we want to be able to reach as many people as possible and affirmative design is lolling right.

You visit it you’re like all right. Well, I don’t really have to stress, while I’m here or do very much deep, diving, there’s the navigation menu, there’s my primary reaction, but if I scroll down nope, there’s three little things that tell me about the feature this: the other features of this product. Oh Harry Roberts, today, Harry Roberts today writes this thing, which basically is like recoating.

This person yeah, I have a quote here flat design in the rise of more and more digital products, does seem to have killed off a lot of that exuberance and experimentation, which is a huge shame. I missed the days of seeing what adventurous and out-there things people were trying to create. You would log in every day just to see what crazy stuff people built, whether it was flash or web. I feel that I think, there’s a there’s another tweet.

I can never remember that guy’s name, I think it’s John gold huh. I remembered someone’s name. Wow we’ll have it. I know your name, yeah, Rick Vesco me mm-hmm screen name. This tweet, though, had two images up and it was like which site? Are you building the one on the left? Are the one on the right and they’re pretty much identical? They they’re like big there’s an app bar at the top there’s, a big header image with big diner was text in it.

That’s like there’s a problem and then underneath that it’s like what’s a solution right and they’re, both there and they’re the same they’re like the practically the bootstrap templates that you could get for free they’re, practically the the theme for every WordPress site is now looks like This and the coolest and most creative and critical ones might have a article playing right. What text overtop like put some extra effort into that one that pictures animated? Do you consider bootstrap to be a design system? I do.

I don’t think they do well, and maybe this comes down to where I’m I’m curious about what a design system is and how it’s different than a pattern. Library. I think I think it’s that designers were more involved in a design system, whereas, like bootstrap is very developer, led, I think design kind of came in a little bit later after their Legos got really popular and so yeah. I think I think their design system that just kind of got there in a different way and the result, the thing that they have the tangible thing I can go pick up off the shelf and just like place in my tool belt right.

I’m I’m Wayne right now from Wayne’s World, so I just got my like from the back of the car. If anyone remembers the Shockers anyway, whatever that’s bootstrap right now, I could go get that off the shelf and be immediately useful with it and solve my future problems. It’s like the same value, props that I got and and we’re sharing about a design system. You could get them from bootstrap, but it doesn’t call itself a design system.

I can’t remember what their home page says. I think they’re one so, according to the HTTP archive bootstrap, is used, unlike one out of every four websites, at least in some fashion, which is a surprising stat who knows to y’all, but could that contribute to this feeling that websites are all looking the same? If 25 % of the web is using bootstrap with the same type of layout, is it possible that bootstrap is a victim of its own success in a way whoo? I, like that phrase victim of its own success, yeah.

Yes, I I think they are this. This is funny. This reminds me of two two metaphors I don’t want to share like bootstrap is funny it like. If you think back to high school, there was probably a super cool band that their album just came out and you really little dead band, so cool and you listen to him a ton. They made a second album with Chapter four made, a second album when you’re like this Bay, it’s still cool or bootstrap three, and then it gets really popular and everyone’s.

Listening to him. It’s like some fool who you don’t like, shows up wearing the band shirt and you’re like okay. That’s it done with this print and you start calling them a sellout and the reality is just like they’re now popular they’re, not making money they’re successful. You should be happy for them, but instead you’re turning your nose up and like this, like defensive, disgust like I don’t want to use it anymore, even though all the stuff you’ve built with it was great all the music and moments you had with that band.

We’re really nice, but it’s hard for anything to stay in fashion for too long, that’s kind of like the second metaphors, like the Wardrobe, we all had favorite stores we shopped at back in the day whether it was zoomies or gap or whatever right, and these were Like places, we went to go, make easy decisions that helped us get on with our day and that we were still picking something like relatively cool and meaningful, but then it just gets old we’re kind of rude as humans.

You know we we we burned through stuff. All the time we consume it and we’re like this is so good and then we throw it in the trash. So I think bootstrap is a victim of its own success, but it’s also very much still a success. I think being successful is hard. I mean look at any big framework of like whether it’s a JavaScript framework or big design tool. As soon as you hit the big shots and like you’re the cool one, everyone wants to take you down and that’s that’s a hard life to be in so bootstrap.

Stick it out, I think it’s still a great product. It’s obviously just reaching a different market. Almost like the pop band right, the pop band Green Day right loves their first couple. Albums third one came out, didn’t want to play that band anymore, but they reached a whole new set of people, and those folks fell in love with them. In a way that I didn’t – and I shouldn’t say that Green Day is bad.

I should say that Green Day is successful and they’re reaching new people and I still like their dewy, so you’ve spent a year as a UX engineer at the Google cloud team, as designed systems engineer so to speak yeah. What was your experience on that team? Yeah? That was really I was oh, so illuminating, so yeah I was a my title was really long ready for this. I was a UX engineer on the design systems team of GCP through a design lens, so they have two different types of UX engineers.

There’s UX engineer, engineer and then there’s UX engineer design, so I was in the design side. I was in a team of four or five other UX engineers who were supporting the design system, which had a big team, and I this was really cool to see how much commitment Google had to their design system. In so much that this team was made up. Of three teams there was a trifecta. It’s like a triforce of folks were managing that design system.

That design system is creating jobs, and it was really interesting to see how all of them were working together. What problems they were solving. There’s two things. I want to point out the first one I think is really interesting in meta, which is Google here I’ll just start with the first one it was built on angular, so is angular, which was transitioning from material one to Google, material and angular was doing a good Job at this work, the the struggles that they had were with how many customers that they had.

So this is where I like this meta comparison. You have Google clouds and their design system, which they call their design system, a condensed version of material. So it’s like a child seam. It’s like they forked Google material and made an enterprise, condensed version, that’s not as airy and fluffy. That’s interesting, because that means Google Cloud is a customer of another design system. Simultaneously, they have hundreds of customers, so they’ve got customers that are internal right, App Engine there’s like various products and each one of those products has a team.

Each one of those teams are consumers of this design system. That’s crazy! Then you have third-party players. People don’t want to add plugins or other support and other features into GCP that also want to use your design system. So they had this really really unique scenario where they were simultaneously a customer of a design system and a producer of a design system. Anyway, yeah. It’s meta I liked it and they were really adamant and very good at listening to all of these different customers and trying to make this thing work for everybody.

But it’s a very difficult task. They’re hiring they have tons of headcount, because this is GCP is humongous and they need help that and the UX teams they are really fun and really cool. So, if anyone’s looking for roles GCP in seattle, we’ll put a link in the description yeah sure so you mentioned something earlier. I want to come back to inclusive design. What is that, and what is the purpose of it? Oh man, this is so inclusive design.

We want this is so funny. It has a name, because I feel like it’s the thing that everybody’s wanted the whole time. We want our content to be accessible for as many people as possible right like. Why did we have to put a label on that? And I think the label is there and what it means is you need to have a site, that’s accessible, which really means you just need to test. First testing your site for accessibility is always this awesome.

Empathy experience where you’re like. Oh no, my sites, probably fine on that. Then you go tap through you’re like it works. It’s not elegant and that’s sort of like inclusive design, is like taking that extra step to empathize research. Ask folks and adjust your design to be more inclusive. So this can come down to things, like contrast, ratios font weights than this tab flows and stuff, like that, so looking ahead, what do you see the role of components and future Design Systems? I think we’re only going to get more complex as things go on we’re noticing now that our components aren’t good yet still, especially once you get to inclusive design areas where you thought you were done, and then you go test and you’re like.

Oh we’re not done. Sometimes those can shake the whole foundation of your application, and I think it’s healthy, though, that people are investigating that other future things. I would love to see you know voice. We have so much voice interaction coming in. Why don’t? We have a design system for a voice. I think that I’d be really interesting green lines. I would like to see design systems providing green lines.

Green lines are an accessibility indicator, so we’re a red line. Is you just saying I intend for this avatar to be 45 pixels wide and 45 pixels tall with a border radius of 50 percent? So it’s a circle like you’re. It’s a traditional way of marking up a document to encourage or or be precise, about, the presentation that you want. Accessibility is a similar, similar push. We’re like I’m going to go in here and I’m going to look at this little form input.

I’m going to look at this form button I’m going to go and indicate that these three areas should be tab. Indexed this way and it’s sort of a designer taking control of the accessibility, experience and saying, and I’m just being very deliberate and clear about what it is. They expect this to do and yeah it’s nice. It’s the designers making those decisions, as opposed to leaning on front-end, to do it and how about mobile mobile is usually forgotten.

All right, so we’ve got components or it’s funny. Material most of the opposite material is mobile first and then you sort of have to expand on a couple things to get desktop to work most Design Systems. I see these days our desktop focused and then they they start to squish things down as things go. So I’d love to see mobile, included, more components, yeah good call. How do you see the relationship between designer and developer evolving? I want to see them communicating a lot more.

John Maeda recently had a very provocative titled article, but ultimately, what he was pushing for is a switch and strategy where traditionally he was a proponent of design LED. He was like yeah. The designer should be at the top of the company, maybe even like making all the decision it’s like. If you do that, then elegance is sure to be achieved and that’s successful in a lot of ways. But what he’s seeing now after a few years of this is that engineering is really really important to engineering is required in order for elegant design to even be achieved.

So what he’s saying is no designer, I’m probably going to you, know, butcher this title, but no designer will be more successful than another designer unless they’re integrating themselves richly with engineering. The pitch is the designer isn’t necessarily the leader of the show anymore. He kind of says you should be a supporting actor or actress, and even though that might be a little hurt, some hurt some hurting to your ego.

You can still go see a movie where the supporting actor actress was the star of the show. There’s just a relationship that needs to happen here. That’s just richer and deeper integration. Designers needs to be included more across the the wide array of design decisions that are getting made and a lot of those design decisions are made in code, so designers get in there meet those folks sit with them every day and try to have rich conversations about The engineering side of things and getting greens they’ll ask you and they’ll want your opinion.

I think I felt like engineers make a lot of decisions today that they’d rather not make, and it’s just because no one is there to do the decision-making for them or to tell them what it is. So they kind of have to make it up as they go, which puts the front-end engineer into an interesting predicament. Wait. I just thought of something else. This one is this one’s huge for me. Okay, so we have in the front end, especially the dependency graph is getting really popular and we have back-end dependency graphs.

We have CIA CD dependency graphs, there’s no designer dependency graph. So what I want to see is like two really weird things. First off, I want to see design files pub/sub, where I want a design file to publish the colors and publish spacing units and like some of these, like really atomic units like think of tail wind tail. Wind is this: for I’m anali reduced design system, they have a file and I love it because it’s almost like, if you were to did you see the movie perfume the story of a murderer? No, I was a creepy movie, but he did something interesting which he was trying to distill the essence of beauty into like a thing that he could hold.

I feel like tale when did that they took a design system and they looked at all the different pieces and they started just like organizing and and plucking them and putting them into a nice list, and I, like that JSON object. I think it’s not JSON. Actually, it’s JavaScript, which is another cool feature of tooling anyway. It’s JavaScript file that is the most reduced design system into like atomic units that I’ve ever seen, and what I want to see is.

I want to see design files publishing something like that for a front-end to consume, and then I want to front-end to publish data models and other things for the design file to consume. I want to see a bi-directional communication happening between design, apps and front-end development that I want designers in that dependency graph publishing values. This is like why I want them in CI CD, like I want designers reviewing PRS, I want them creating PRS.

I imagine this like you’re in your design file. You changed a base color because it didn’t pass a contrast ratio. You know over here and some other tests, so you push and you save a change. You publish the change, which creates a PR that other people can go review designers, making PRS bypass the developer, bypassed the developer. I think it’s a decision the designers were already making. It just was like this long-winded feedback loop to get that work in they’re like I’ve got other crazy ideas too, or I think your design system should be a dependency graph.

Work clearly articulates what dependencies it has and what dependencies it creates for other things to consume. I’d like to see designers making kubernetes Canary deployments, I don’t even like to see I pitched GCP on this. I think there needs to be a design, focused cloud integration so that you’ve got. You know really rich cloud dev tooling, but we don’t have rich cloud design. Tooling, like their little design tabs over there, that a designer can go in create an a/b test which essentially makes a canary kubernetes container that gets deployed to five percent of the users.

Now designers can be in control of features of the front-end through some epic and really cool cloud integrations yeah. I want designers, I well here’s a challenge. I don’t know how to get designers into the backend dependency graph. I like pretty clear ideas on how to get the front-end and how to get them in CICE, but I’d love it if, like service designers, were included in API design and somehow there was again a pub/sub mechanism between these two or like the API team is publishing Something and the service design team is publishing something there’s just so much so much opportunity in this space for designers to get more richly integrated into the processes that are happening on the development side.

It’s not creepy. It’s super rad, like I want designers doing. Cember their design system should be versions just like the app and optimally they should match. It’d be really cool if, like the design system was out v 1.0 point twenty one, and so was the front end right because it was a consumer of that version. There’s a lot of opportunity. I think developers would like to have relinquished control over things like changing.

Colors and if the system is built well changing the value in one place like this master file and having it applied downstream to every button and everything else that depends on that color. I think they would love that. I I think so too. I think we just need some tooling. I there’s a bunch of people working on apps. I last time I did research. There was like 15 of them, but it’s sort of developers taking a design system building it and then publishing those Legos in like a design app, and so that’s what we’re seeing we’re seeing a bunch of design apps coming out where developers are saying, hey, I’ve exposed The levers to these components for you in this cool tool, where you can now go compose our Legos together and build something new and play in an almost production feeling like design tool, but really it’s still kind of prototyping, because the code it’s making is kind of Anyway, I think we’re headed towards a really cool integration layer there, between designers and developers, where they’re going to be richly working with each other and designers, will start to get more intimate with, like minor details about a component like what a boolean is and why a Boolean is different than an enum and why they should care and because those things are cool, I don’t think they’re scary all does viz bug actually fit into that vision.

This bug yeah. So if is bug school is it’s got a few of them? One of them is designer developer communication. You know a designer is often in their design tool. Land over here they’ve got an art board and everything’s placed XY, which made it really easy for them to. You know, highlight multiple and drag and delete. They had this. Like direct manipulation, but what is a bummer about that world is that it doesn’t translate.

Well, somebody’s, always translating it. So I was like a front-end engineer. I would receive one of those and I start looking at it, nice translating it to code and what viz bug does is it it sort of takes what the developers are making and lets? You inspect their work like it’s an art board and I’m I’m seeing folks that are having better communication with their engineers because they can feel things.

There’s like an empathy, that’s starting to happen, because the complexity that is the front end, is now something that designers can contribute to. They can go poke and inspect and modify and an experience why some of these things are complex or experience. How easy some of the stuff is, and so this book is definitely in there in the game to help designers and developers communicate better. It has some features where you know.

If you modify some CSS, you can show what changed in screenshot that and send it to an engineer so there’s an opportunity to even be like super articulate to a developer about what it is you need, but it’s also this book has to set their goal. So it’s kind of Sophie’s book is kind of like Firebug for designers. Its goal is to provide the same thing that Firebug did for developers, but it’s something for designers.

So give me tooling, that’s familiar to me in the end environment that can help me make better decisions, and it does that I think really. Well it a bunch of cool features too I’ll, just like breeze over and really quick, but there’s there’s guides. So you can hover and see lines and detect measure you can do measurements, you can inch. You can hover and instantly see any styles that are there, and I’ve done a lot of work to make sure that those styles that you see are the ones that designers want to see.

You’re not going to see all the craft. There’s an ally and accessibility inspector same deal. You click it. You just start hovering on stuff and it’ll. Tell you accessibility, details, there’s margin and spacing visualizations now, so you can hover and see, padding and see margin separate, so the dev tools shows them together and mine shows them separate and I support multi select. So you can multi select multiple things and as a designer or an engineer and see how the spacing is creating all that white space like where’s the white space coming from.

Is it a margin? Is it pushing or is it so? Those are interesting? You can also create, or you can’t create well now, you can’t create, but you can delete you can cut, you can copy, you can paste, you can double click, any text to change it. You can change any foreground color, you can change any SVG. You can there’s a position tool, you can just select something and then drag it around the screen and totally ignore the document flow.

So there’s tools to help you work with the flow tools to help you work out of the flow. It’s about, like you, feeling unfettered and getting an idea out right there, and, and it should feel fun like I wanted. It’s almost like. I wanted to break the glass four designers on a web page like we’re, constantly pulling down these magical pieces of paper and they feel so far away for designers like I can’t change that I’ll just go back over I’ll, just screenshot it I’ll come over here.

I’ll add a white box and cover up that – and you know like make this whole Franken thing and then ship that back to the developer and be like. Please like. Can you do this thing here and, and I’m hoping that folks start to do that in the browser which kind of comes into another value prop, but I do want to cover really quickly like this book wants to be more well. I have this phrase: it’s democratized the DOM and really what that means to me is.

I want the web and designing on the web to be more inclusive. I remember when it was easier and you know we were on MySpace and anybody could just go grab some CSS and paste it on the page and be like. Oh that’s, fun. That makes my brain tingle and a nice fun way better and worse for better or worse right. That’s vis bugs the same way. I’ve read or worse, people can go visit a page and play, but I think what that does is it opens up for children and adults too to feel like they can play like there’s like it’s now kind of a sandbox which simultaneously, I think we start to Like when you, when you start to learn by playing it first, there’s there’s just something different about starting that way than like going to school, and I starting all serious.

So I’m hoping that this can help people who are serious but also help people that aren’t that serious, be more inclusive and I forgot whatever. The second thing I was going to say was but yeah I mean, there’s lots of interesting features of his bug, but it’s trying to help wants to wants to be the design, debugging tools des tools. Perhaps oh I like that. So what resources would you recommend for people who want to learn more about design systems and everything else? We talked about yeah Design Systems, okay, so whoo, there’s folks, there’s three folks did I’m a big fan of dan mall.

You know Kravitz and Brad Frost there. They’re super articulate vocal public figures that are passionately talking about these topics and helping you ramp up or ramp down. Dan mall recently has been helping people not over focus on the Atomics of their design system, because you can get super like wrapped up in a button, and he did this really funny thing at a list of part. Recently he showed just was so good.

You should a button on the screen and then showed four companies that that could potentially be the button for and he’s like who’s button. Is that and everyone’s like? Oh, I don’t know, maybe that one, it was a blue button right and so the point was we can over focus on these little things and that’s not your brand and he’s essentially pushing you to real, like step back a little bit and determine like what’s unique About your business and and make make components and designs some out of those like your value prop like how are you different, because the Atomics are atomic, I thought that was really nice.

Yuna has a bunch of really cool things that she’s been pitching as well. She’s. Pitching accessibility in your components, which I think is really healthy and and she’s advocating for maybe you don’t need one so sometimes, and this is something I’m a believer in too, which is often we want to be the top dog like now, and so we go do Whatever the top dog is doing, we’re like alright, I need you know, legendary armor.

I need a sword of the gods of the ten thousand XP right, and so we like, we show up and we’re like level one, but we’ve got all the gear and we’re like this will make me good right and it does to a point. But it can also be a bunch of baggage and, like you, can’t even make it through the door of the first dungeon because you’re like to cover it in gear right. You got like magic shooting out of each fingers.

So I like that advice too, which is like look at the phase that you’re in as a team look at the phase Etrian as a product. You know notice that GCP, which is a very very large product, has an entire team dedicated to this. Now it’s that complex there is absolutely value coming out of a design system, but you got to look at the ROI like how much you putting in versus what you’re getting out, and I think that’s what that warning is it’s like.

You can spend a whole lot of time on the Atomics of your design system. You can spend a whole lot of time, making it really robust and then nobody uses it. So you got to make sure you have customers and anyway. Those three folks are really good to go. Look up and listen to they’ve got plenty of material for you to study. Well Adam. This has been great picks coming on the show, absolutely yeah. I was really fun.

You can check out the links to everything we talked about in the description below thanks for reading and we’ll see you next time.


 

Categories
Online Marketing

New Techniques for Responsive Design

We have different devices. Different needs even different data requirements, and this is at the core of the PWA attitude to building for the web. We need layouts and content that work across devices if your site doesn’t adapt to the user’s device, you break the illusion and lose trust.

These quotes are from Brad, Frost and Liza danger. Gardner. You should check out that blog post about responsive design, which are linked to from the course materials as Liza says, manage risk focus on content. You know you can make virtually any site usable simply by sizing elements and content correctly. The golden rule for great progressive web app content is not to let content inadvertently overflow horizontally, especially on mobile.

That sounds basic, but lots of sites break this rule by making images inputs and other large elements on the page with fixed sizes. Using relative measurement units and RAM percentages will reduce the severity of this issue. Adding a meta viewport tag will also solve a lot of problems. This tells the browser the size of the virtual viewport on which it renders a web page without setting the viewport meta tag correctly, most browsers scaled down the page to fit a virtual 980 pixel wide viewport.

I’ve seen some great examples of this in action on w3schools, we’ll give you the URLs for that in the course materials. With this article, the initial scale value sets the zoom default. For this page, don’t set a maximum value that will make it impossible for users to zoom and that’s a big problem for accessibility. One other thing you should be aware of the viewport meta tag will mess up the layout for fixed-width sites.

The Mater viewport tag is designed to work with responsive layout. If you use it in a fixed sized layout, it will break things until you convert the site to a responsive, lay out trade document.Documentelement client to see how the viewport meta tag affects the virtual viewport. Here’s another simple technique: this solves many layout problems, you’re setting the preferred size and the maximum size and works for article and audio too so yeah.

You might think that relative sizing would fix everything, in fact, for a while back in the day, some of us thought that relative sizing could solve everything we layout. We had, you know liquid layout, maybe even text could be relatively sized, but relative sizing isn’t enough simplistic. Relative sizing, like this a diagram, means that you have content areas that are too big on desktop and to smaller mobile.

This is why media queries were invented. It’s a simple concept, use different CSS for different sized viewport based on width. That doesn’t just mean making the same layout for every device on a phone. You might want a single column layout, a two column layout on a tablet. Maybe three columns for desktop and so on. You can use media queries to select different layouts depending on the viewport size, here’s a single column layout on mobile to column, on tablet and three columns for desktop.

So do you think about devices, and you might think you could get away with this? Ask yourself what could go wrong with this approach? What about new devices new viewport sizes? What about changing window sizes on desktop we’ll come back to this later now? Is that all there is, of course not. There is a better way go back to our original exercise. Remember content is king devices, keep changing and device, viewports are getting bigger and smaller, not to mention pixel density, pixel, shape, display quality and so on.

Don’t force your designers and developers to make a change every time a new device appears start. The design process with the smallest form factor then add the major breakpoints for the form factors that you work with phone tablets, laptops and widescreen devices. You can then create minor breakpoints to handle specific changes to elements that don’t affect all elements. The final detail to keep in mind is to optimize the content for reading, ideally keep the width of your content to 70 to 80 characters wider than that value makes content hard to read.

Now that doesn’t mean you stop thinking about devices and device classes. You might want one column for phones, two columns for tablets, three columns for desktop, like we’re saying or whatever you can find out more about these recommendations on web fundamentals. Now remember the earlier media queries example in the mobile first world of PWS. We need to turn that around make small viewports the default.

Look at the example here. By the way, there is no fixed rule about whether or not to include media queries, inline or use a separate file. Also, you might want to consider using m’s or REMS for units here, but I won’t go into that now. You’ll also do responsive layout in JavaScript. If you like, this is a simple way to do. Conditional content match media is well supported and there are polyfills. Calc is really useful in responsive design, where you want to use a combination of fixed widths and percentages.

In this example, we have two thumbnail images: side by side: 50 %, the width of the parent element with a 10 pixel margin between them, no matter what size. The viewport responsive design is about more than just changing layouts, as well as changing layouts. You might actually also want to manipulate content, depending on the viewport size and device type, for example, on a phone you might want to make sure page content is visible when the user goes to your home page, so you might opt for a hamburger menu for navigation And put banner ads lower on the page.

Also, if need be, you can just get rid of stuff on desktop. Your users will want full functionality, but not on mobile right wrong. Don’t guess your users needs based on viewport size, plan, content and functionality carefully and don’t assume users want less content or functionality on phones than desktop, for example. Again, this is a crucial part of the PWA attitude. Understand your users, don’t second-guess them.

Data-Driven design, design, content, layouts and transaction processes, so users can get to what they want as quickly as possible. Our data shows that every step to get to content loses 20 % of users rather than removing content. A more sensible option can be to choose different content. Now for images this is called art direction, choosing different images or different image crops and I’ll show an example of this later.

You might even want to provide different text for different viewports such as shorter headlines, but yeah be careful again not to assume that mobile users want less content for article. The general rule is to use a smaller resolution for smaller viewports. This can result in massive reductions in bite, size, playback performance and proven sand, also reduced streaming cost. The best way to do this is with adaptive streaming or HLS, not just media queries and yeah.

You can find out more about that more about adaptive streaming in the course materials. But just to reiterate, the key point here is that when you’re delivering article to mobile, don’t use resolutions larger than you need and talking about article content, don’t forget to caption articles using the track element. It’s really easy. Let’s take a look at the relatively new technique for creating responsive layouts, CSS flexbox provides flexible sizing and alignment element reordering and better performance than floats.

Css flexbox is well supported and we strongly recommend it easy centering is the holy grail of CSS. Take a look at the code here. It is incredibly simple. I still find it slightly thrilling by the way the materials that accompany this article have links to lots of flexbox examples, including this one. Let’s look at the CSS for the examples here. This uses CSS flexbox for three different layouts depending on the viewport width.

Let’s start with the defaults for smaller viewports, remember, mobile-first, the container is declared to use CSS flex. The flex flow property means child elements can wrap. Rather than being squashed onto the same line. You can also use inline flex, that’s shorthand for flex direction and flex wrap properties. The default is ro, no rap 100 % width for each div in the container add a different layout for slightly larger viewport and different again, once the width hits 800 pixels.

The container is now a fixed width and centered horizontally using margins. Let’s take a look at the example here. Once again, this uses CSS flexbox for three different layouts, depending on the viewport width and again, let’s start with the defaults for smaller viewports. For view puts over 600 pixels in width. The order is changed on the smaller viewports. We wanted to give child 1 full width, but for a slightly larger viewport, we can put it next to child 2.

I could go on anyway, to other properties. I’d like to draw your attention to justify content, how items are packed and aligned items how items are aligned. Css grid is in some ways related to the grid system concept, familiar to graphic designers. A page is thought of in terms of lines tracks between lines, cells and areas. Css grid is coming, and it’s already behind a flag in Chrome and Firefox you’ll find more information in the resources for this article.

The lab exercises that accompany this article will help you get started with media queries, breakpoints grids and with flexbox


 

Categories
Online Marketing

Introduction to Service Workers

You’Ll learn what a service worker is and what it can do for your apps. A service worker is a client-side programmable proxy between your web app and the outside world. It gives you fine control over network requests. For example, you can control the caching behavior of requests for your site HTML and treat them differently than requests for your site’s images.

Service workers also enable you to handle push messaging now. Service workers are a type of web worker, an object that execute the script separately from the main browser thread. Service workers run independent of the application they are associated with and can receive messages when not active either, because your application is in the background or not open or the browser is closed. The primary uses for a service workers are to act as a caching agent to handle network requests and to store content for offline use and, secondly, to handle push messaging.

The service worker becomes idle when not in use and restarts when it’s next needed. Now, if there is information that you need to persist and reuse a course restarts, then service workers can work with indexdb databases. Service workers are promised based now we cover this more in other materials, but at a high level a promise is an object. These are the kind of placeholder for the eventual results of a deferred and possibly asynchronous computation service workers also depend on to api’s to work effectively fetch a standard way to retrieve content from the network and cache a persistent content storage for application data.

This cache is persistent and independent from the browser, cache or network status now because of the power of a service worker and to prevent man-in-the-middle attacks where third parties track the content of your users. Communication with the server service workers are only available on secure origins served through TLS using the HTTP protocol will test service workers using local host, which is exempt from this policy.

By the way, if you’re hosting code on github, you can use github pages to serve content. Their provision with SSL by default services, like let’s encrypt, allow you to procure SSL certificates for free to install on your server Service Worker, enabled applications to control network requests, cache those requests to improve performance and to provide offline access to cached content. But this is just the tip of the iceberg.

We will explore some things you can do with service workers and related api’s caching. Assets for your application will make the content load faster under a variety of Network conditions. Two specific types of caching behavior suitable for use are available through service workers. The first type of caching is the precache assets during installation. If you have assets, HTML, CSS, JavaScript images so on, and these are shared across your application.

You can cache them when you first install the serviceworker when your web app is first opened. This technique is at the core of application. Shell architecture now note that using this technique does not preclude regular dynamic caching, you can combine the pre cache with dynamic caching. The second type of caching is to provide a fallback for offline access using the fetch API inside a serviceworker.

We can fetch request and then modify the response with content other than the object requested use this technique to provide alternative resources in case the requested resources are not available in cache, and the network is unreachable. Service workers can also act as a base for advanced features. Service workers are designed to work as the starting point for features that make web applications work like native apps, and some of these features are blog messaging API, which allows web workers and service workers to communicate with each other and with the host application examples of this Api include new content notifications and updates that require user interaction.

The notifications API is a way to integrate push notifications from your application to the operating system native notification system. The push API enables push services to send push messages to an application service can send messages at any time, even when the application or the browser is not running. Push messages are delivered to a service worker which can use the information in the message to update local state or display a notification to the user background.

Sync lets you defer actions until the user has stable connectivity, and this is really useful for ensuring that whatever the user wants to send is actually sent. This API also allows servers to push periodic updates to the app, so the app can update when its next on line. Every service worker goes through three steps in its lifecycle, registration, installation and activation to install the service worker.

You need to register it in your main JavaScript code. Registration tells the browser where your service worker is where it’s located and to start installing it. In the background, for example, you could include a script tag in your site’s index.Html file or whatever file you use. Is your applications entry point with code similar to the ones shown here? This code starts by checking for browser support by attempting to find Service Worker as a property in the navigator object.

The service worker is then registered with navigator dot Service Worker dot register, which returns a promise that resolves when the service worker has been successfully registered. The scope of the service worker is then logged with registration, dot scope. You can attempt to register a service worker every time, the page loads and the browser will only complete the registration. If the service worker is new or has been updated, the scope of the Service Worker determines from which path the service worker will intercept requests.

The default scope is the path to the Service Worker file and extends to all directories below it. So if the Service Worker script, for example, Service Worker dot gif, is located in the root directory, the Service Worker will control requests from all files at best domain. You can also set an arbitrary scope by passing in an additional parameter when registering in this example. We’Re setting the scope of the Service Worker to slash app, which means the service worker will control requests from pages like slap slap, slash, lower and slash out, slash, lower slash low directories like that, but not from pages like slash, app or slash, which are higher a Service worker cannot have a scope above its own path.

This is in your service worker file, service worker, dot, j s now thinking about installation. Once the browser registers a service worker, the install event can occur. This event will trigger if the browser considers the service worker to be new either, because this is the first service worker encountered for this page or because there is a bite difference between the current service worker and the previously installed one.

We can add an install event handler to perform actions during the install event. The install event is a good time to do stuff, like caching, the apps your static assets using the cache API. If this is the first encounter with the service worker, for this page, the service worker will install and if successful, transition to the activation stage upon success once activated, the service worker will control all pages that load within its scope and intercept corresponding network requests.

However, the pages in your app that are open will not be under the serviceworkers scope, since the serviceworker was not loaded when the page is opened to put currently open pages under serviceworker control, you must reload the page or pages. Until then, requests from this page will bypass the serviceworker and operate just like they normally would service workers maintain control as long as there are pages open that are dependent on that specific version.

This ensures that only one version of the serviceworker is running at any given time. If a new serviceworker is installed on a page with an existing serviceworker, the new serviceworker will not take over until the existing serviceworker is removed. Old service workers will become redundant and be deleted once all pages. Using it are closed. This will activate the new serviceworker and allow it to take over refreshing.

The page is not sufficient to transfer control to a new serviceworker, because there won’t be a time when the old serviceworker is not in use. The activation event is a good time to clean up stale data from existing caches. The application note that activation of a new serviceworker can be forced programmatically, with self dot skips waiting service workers are event-driven installation and activation events, fire off corresponding events to which the serviceworker can respond.

The install event is when you should prepare your serviceworker for use. For example, by creating a cache and adding assets to it, the activate event is a good time to clean up old caches and anything else associated with a previous version of your serviceworker. The serviceworker can receive information from other scripts through message. Events. There are also functional events, such as fetch push and think that the serviceworker can respond to to examine service workers navigate to the serviceworker section in your browsers, developer tools, different browsers, put the tools in different places, check debugging service workers in browsers for instructions for Chrome, Firefox and opera, a fetch event is fired every time a resource is requested.

In this example, we listen to the fetch event and instead of going to the network, returned the requested resource from the cache assuming it is. Their service workers can use background sync here. We start by registering the service worker and once the service worker is ready, we register a sync event with the tag foo. The service worker can listen to sync events. This example listens for the sync event, tagged foo in the previous slide.

Do something should return a promise indicating the success or failure of whatever it’s trying to do if it fulfills the sync is complete. If it fails, another sync will be scheduled to retry retry syncs also wait for connectivity and employ an exponential back-off. The service worker can listen for push events, push events are initiated by your back-end servers through a browsers push service. This example shows a notification when the push event is received.

The options object is used to customize the notification. The notification could contain the data that was pushed from the service service workers can be tested and debug in the supporting browsers, developer tools. Screenshot here shows the chrome dev tools application panel. There are lots of great resources to help you get started and find out more access them from the materials that accompany this article.

In the lab materials that accompany this article, you can practice working with service workers and learn more about intercepting Network requests.


Website management packages are important for any business these days. Check out the video from Allshouse Designs to see what can be done for your company and yes, for how much. 

 

Categories
Online Marketing

Intro to Web Push & Notifications

This diagram gives an overview on the client side. Your webpage interacts with service workers which in turn receive push events via the user agent, also known as the browser and on the backend.

You send messages from your application server to the push service, which then delivers them to the correct client. Let’S look at the notification API first, this allows developers to display notifications to the user. Before we can create a notification. We need to get permission from the user. This code will prompt the user permissions to show notifications. You can try this out from the browser console as you’ll see later, permission is requested automatically when subscribing to a push service.

So there’s no need to call this function when using just push notifications. Let’S take a look at some examples for configuring and displaying a notification from a service worker. We first check that permission has been granted. Then we call show notification on the service worker registration object and pass in the notification title. You can also try this out from the browser console. Try it on the new tab page now for push notifications.

You call show notification in the service worker in response to a push event. When a message arrives, we can specify an optional options: object to configure the notification. This is passed in as the second argument. In the show notification function, the body property is the body text displayed below the title icon? Is the image displayed at the top of notification? Vibrate is the vibration pattern for phones, in this case 100 milliseconds on 15 milliseconds off 130 seconds on so on, data is the arbitrary data we can retrieve in the service worker when the user interacts with the modification.

In this example, primarykey allows us to identify which notification was clicked when handling the interaction in the serviceworker. Let’S try that out. We can add action buttons to the notification that we can then handle each in a different way. Here’S what that looks like notification, interaction events are handled in the service worker tapping clicking or closing the notification. There are two notification interactions you can listen for in the service worker notification.

Close the notification close event only triggers when the notification is dismissed via a direct action on the notification. If the user dismisses all notifications, the event will not trigger, and this is done to save resources, notification, click. If the user clicks the notification or an action button in the notification, the notification click event is triggered. If the user clicked on an action, the action is attached to the event object of the notification click handler.

We can check which action was triggered and handle it separately. Now, let’s see how the two handlers work in a service worker. First notification close: we access the notification, object from the event object and we can get the data from the notification object. We might use the primary key property from the data to identify which notification was clicked in a notification click handler. We can determine what action button.

The user pressed by inspecting the action property on the event object. Note that each browser displays notification actions differently and some don’t display them at all to compensate. We put a default experience in this example in an else block after checking which action was clicked so that something will happen on a simple click of the notification. Now, let’s see how you send push messages from your server and handle incoming messages on your client web app.

Each browser manages push notifications through its own system called a push service when a user grants permission for push on your site, you subscribe them to the brow. Push service: this creates a subscription object that includes a public key to enable messages to be encrypted and an endpoint URL for the browser’s push service, which is unique for each user from your server. Send your push messages to this URL encrypted with the public key.

The push service sends the message to the right client. Now the service worker will be woken up to handle incoming push messages when a push event is fired, and this allows your app to react to push messages. For example, by displaying a notification using service worker registration show notification, your app doesn’t need to listen to or Pole for messages and the browser doesn’t even need to be open.

All the work is done under the hood as efficiently as possible by the browser and the operating system, and this is great for saving battery and CPU usage. Let’S go through that step by step in the apps main JavaScript call push manager subscribe on the serviceworker registration object, get the subscription object and convert it to jason, get the endpoint URL and public key and save this to your server, for example, by using a fetch Request send the message payload from your server to the endpoint URL encrypted with the public key.

The push message raises a push event in a serviceworker which we can handle in a push event handler in push event handler. We get the data from the message and display a notification. The push API allows users to subscribe to messages sent from your app server that are sent via the push service used by the browser and subscribing, of course, is done in the JavaScript. For the page, responding to push events, for example by displaying a notification, is done in the serviceworker, just to repeat subscribing to the push service and getting the subscription object happen in the JavaScript for the page.

First, we check if the user is already subscribed and update the page UI accordingly, if they are not subscribed, prompt them to subscribe, if they are already subscribed, update the server with the latest since that may have changed by the push service, since it was last used When the user grants permission for push on your site, you subscribe them to the browsers push service, as I said before, this creates a special subscription object that contains the endpoint URL for the push service, which is different for each browser, along with a public key.

We send the subscription object for this user to the server and save it now before you subscribe a user check if you already have a subscription object, if you don’t have the object again update the UI to prompt the user to enable push notifications, and if you Do have the subscription object, update your server database with the latest subscription object. The ready property of the service worker defines whether a service worker is ready to control the page or not.

It returns a promise which resolves to a serviceworker registration object. When the service worker becomes active, the get subscription function returns the subscription object or undefined. If it doesn’t exist, we need to perform this check every time. The user accesses our app because it is possible for subscription objects to change during their lifetime. This is the process of subscribing to the push service register, the service worker from the main page main jeaious.

This request goes to the user agent. The user agent returns the service worker registration, object, use the service worker at registration, object to access the push manager API and from that requests are subscribed to the push service. This request is passed on to the push service. The push service returns. The subscription object, which includes the endpoint URL and the public key, save the subscription object data to your server and send push messages from your server to the endpoint URL encrypted with the public key.

Like I said now before sending notifications, we must subscribe to a push service. We call push manager subscribe on the service worker registration object to subscribe and the resulting push subscription object includes all the information. The application needs to send a push me such an endpoint and encryption key needed for sending data each subscription is unique to a service worker. The end point for the subscription is a unique capability.

Url knowledge of the endpoint is all that is necessary to send a message to your application. The endpoint URL therefore needs to be kept secret or other applications might be able to send push messages to your application. Here’S an example of the subscription object. This is the object returned from the push service. When we call reg push manage, add subscribe. The subscription object has two parts.

The first part is an endpoint URL. The address on the push service to send messages to this includes an ID that enables the push service to send a message to the correct client and service worker. The second part of the subscription object is the keys property. The p25 6d H key is an elliptic curve, diffie-hellman ECD H public key for message. Encryption. The earth key is an authentication secret that your application server uses in authentication of its messages.

These keys are used by your application, server to encrypt and authenticate messages for the push subscription and, let’s see how the process of sending a message is done. The server generates a message encrypted with the public key and then sends it to the endpoint URL in the subscription object. The URL contains the address of the push service along with subscription ID, which allows the push service to identify the client to receive the message.

The message is received in the push service which routed to the right, client and the process of sending a push message from the server works. Like this. A back-end service on your server sends a push message to the push service using the endpoint URL from the subscription object. The message must be encrypted with the public key from the subscription object. The push service uses subscription IDs encoded in the endpoint URL, to send the message to the right user agent.

The push event is picked up by the service worker. The service worker gets the data from the message and displays a notification in this example. We’Re using Google’s web push library for nodejs to send a push message from a node.Js server. The TTL value in the options specifies the time in seconds that the push service should keep trying to deliver the message now. This is important to set correctly some messages.

Have a short life some may be valid for several hours or more. We then pass in the subscription object. Payload and options object to send notification. You need a way to ensure secure communication between the user and your server and between your server and the push service and between the push service and the user. In other words, the user needs to be sure that messages are from the domain. They claim to be from and have not been tampered with by the push service you need to make sure the user is who they claim to be valid, was created to solve this problem.

This vapid identification information can be used by the push service to attribute requests that are made by the same application server to a single entity. This can be used to reduce the secrecy for push subscription URLs by being able to restrict subscriptions to a specific application server. An application server is further able to include additional information. The operator of a push service can use to contact the operator of the application server in order to use vapid, we need to generate a public/private key pair and subscribe to the push service using the public key.

The public key must be first converted from URL base64 to a you in 8 array. This is then passed into the application. Server key parameter in the subscribed method. The web push library, provides a method generate vapid keys, which generates the keys. This should be used once in the command line when push generate vapid, keys, Jason and the keys stored somewhere safe. We can use the web push library to send a message with the required vapid details.

We add a vapid details, object in the options parameter. That includes the parameter required for the request signing now. Let’S look at messages from the receiving end in the web. App on the client handling push, events happens in the surface worker, the service worker will be woken up to handle incoming push messages and a push event is fired. This allows your app to react to push messages, for example, by displaying a notification using service worker registration, show notification to display a push notification.

You listen for the push event in the service worker. You get the push message. Data from the push event object in this example, we simply convert the message: data to text The Wrap, show notification in a wait until to extend the lifetime of the push event. Until the show notification promise resolves, the push event will not be reported as successfully completed until the notification has displayed.

You can practice working with the notification and the push API by following the lab that accompanies this article, one small gotcha, don’t use private or incognito mode for this lab for security reasons, push notifications are not supported in private or incognito mode. You


Website management packages are important for any business these days. Check out the video from Allshouse Designs to see what can be done for your company and yes, for how much.