Newton website builder
Hello and welcome to this website builder Web Designer Newton video tutorial.
I’m Owen Corso from Google.
And today, we’re going to build a rich media expandable creative with video.
Let’s start by selecting file, New File.
This opens a dialog box where we will set up our ad.
First, let’s make out high of project.
We have four options– The default is Display & Video 360so we will leave that as is.
From product design to virtual reality
KENT: My name is Kent.
I'm the creativespecialist on the Google Web Designer team and I'd like to review dynamic exits in Studio A dynamic exit refers to the URL loaded when a dynamic ad is clicked on It's usually related to the product being shown and that URL comes from yourdata feed This video describes the workflow for setting up dynamic exits in Studio Now the simplest case is an ad which doesn't use a gallery or carouselcomponent Here's an example from another one of my videos titled Dynamic inStudio - Google Web Designer You'll see my creative contains only placeholder content But when I preview it in Studio you'll see it loading data from my feed Refresh it Now we're seeing product number 0 Look at my feed for product 0 we're seeing this name, this image and here is the URLfor my exit for this product Now when I set up this ad, I used the simple static exit So when I click anywhere on the ad it'll load a static URL like a landingpage What we want to have happen is this to exit to the URL associated for that product Let me show you how to do that in Google Web Designer First thing we'll do is select the current event and delete it Then we're going to look over inour components panel and open up Interaction and grab a taparea Then with the Transform control selected I'm going to stretch this out to cover the ad And in my Dynamic panel I'm going to click the plus icon to make a new binding We'll select that tap area We're going to look for Exit override URL And we'regoing to drill into our feed the first item, exit URL, and get the URL Click OK and we'llpublish this Now when that's done we'll switch over toStudio We'll reload our creative I'm going to click on the ad Now I'll see we'regetting product one Just to make sure this is really working let's reload itand get another image Here's number five Let's click on that Here's product fiveso that's good Now next thing you might want to do is combine static and dynamicexits in a single ad so you might want to have a logo up here which goes to a home page and maybe some disclaimer text down here which goes to a legal page So let's see how we can do that Back in Google Web Designer I'm going to double click this newtaparea and give it a new name exit-default then I'll copy and paste it I'm going to call that one exit-product and this layer is on top So I'm going tomake this just cover the product area and I'm going to select exit-default andchange the exit on that Now one trick over here in the Dynamic panel I can choose Selection and now I would just see the binding on that selection I'm going to select it and delete it With it still selected I'm going to move to the Events panel click the plus icon and add a new event Google ad, exit ad, gwd-ad I'm going to put an arbitrary ID in here and I'm going to put a full URL to mylanding page OK and we're going to publish again Now when that's done, we'll switch back to Studio and reload the page Now when I click in the corners I'm getting my static URL And when I click on the product I'm getting the correct product That concludes this demo, dynamic exits in Studio Thanks for watching.
Newton website builder
Next, we can select the type of ad.
We want to make an expandable, so we select Expandable on the left.
Next, we can set again ad’s dimensions.
We are building a 320 by 50that expands to 480 by 250.
So I will make those changes.
We then assign the Newton creative a name.
I will leave my Save ToLocation as the default, and leave the talk about set to Quick.
Once I’m happy with my settings, I click OK.
Google Web Designer creates the initial pages of the ad for me with the dimensions I defined.
The collapsed page already contains a Tap Area event to expand the ad and an expanded pageNewton with a close tap area to collapse back down.
Latest Dental Implants To Be Used
When I joined Google a little more than 2 years ago, I was asked by a few people to tell the story of how I got there and what my experience was.
I promised I would but I never actually did. Maybe I was shy, maybe I didn’t have the time or maybe I simply thought, probably wrongly, that it wasn’t interesting enough.
I decided to finally honor that promise and write about it.
I hope this is not too late and that it will be useful to some people.
I will try my best to sum up my experience and stories and provide a few advices from them.
Oh, one more thing. This is not a guide on how to get a job at Google. Based on my experience, I do not think such a thing exists. It will not describe the interview process in detail (such as the questions asked) nor disclose any confidential information.
The sole purpose of this article is to talk about my pre-Google personal experiences. I hope this will be useful for you, at least a little.
Baguettes and berets
If you don’t know me, I’m a 27 years old Frenchman born in a small city in Paris suburban area called Lagny. I spent the first 6 years of my life there and then moved to the south of France where I lived and studied in various cities such as Toulon, Hyères, Arles and Marseille.
Today, I’m a visual designer for Google Chrome and Chrome OS, living in San Francisco.
I got a High school diploma in what was called “social and economics”, then I studied 2 years in a general technology school and 3 additional years in a multimedia project management school.
What these schools and courses had in common is that they taught you a general approach on various subjects. It didn’t specialize you. Thinking back, I think I was taught how to become an effective swiss army knife.
I started by learning the basics of social science and economics mixed with history and philosophy. Add a bit of math to that and you get my High school diploma.
The following two years were all about introducing you to everything you can do with a computer, a screen and a camera. From code to design to filming and photography. Very broad subjects.
The last three years that led to my masters degree were multimedia management. It was all about managing people, project, public speaking and… wearing a suit.
Looking back at it, the more I was going through these school courses, the less I was learning the skills I use in my current everyday job.I learned at school what I didn’t want to do.
School is not about teaching, not really. It’s about opening your mind. I forgot most of what I learned at school but it helped me visualize and understand the things that I wanted to do and the things that I wanted to avoid.It’s by learning a subject that you realize it’s not for you.
I had to learn math to discover that I hated it, I had to learn to code to discover that my appeal to it wasn’t as strong as my appeal to align pixels.
I had to wear a suit to realize that this is not something that I would want to wear everyday. I learned how to manage projects and people to understand that what I really wanted to do is to spend my entire day in Photoshop, listening to Hans Zimmer and Amon Tobin.
Maybe it’s not the best path to follow to learn things, but it was mine. Don’t get me wrong, I learned a lot of useful things in these schools but somehow, it’s the things I hated to learn that gave me the most beneficial lessons and drove me to my key skills.In any given project, I always volunteered for the design part, it was my refuge. In response to possibilities of acquiring more knowledge, I specialized in one thing.
In the 5 years following my High school diploma, I dismissed a lot of potential knowledge to obsess over details in interfaces.
Is it a good thing ? I do not know. I’m not a fast learner. I found what I was good at and instead of searching to acquire a broader range of skills, I maximized the strong ones.
Let’s summarize who I was after my studies:
An obsessed interface designer focused on web and mobile design. I was comfortable and self-confident enough to present my ideas in front of people.
I had a daily schedule made of an hour and a half of web browsing to discover, save and categorize inspiration across the web followed by 8 hours of visual design in Photoshop and Illustrator. Also, I was fluent in English, and this was key.
My work history is tightly linked to my school history. My 3 years of multimedia management were alternate. I had to spend a month at school and the other in any company nice enough to welcome and form a newbie.
I was lucky enough to work for companies who made me do some actual work besides bringing coffee and I will always be grateful for that. Here is the biggest thing I learned and that I have absolutely no doubt about whatsoever:The best way to learn is to work for real people, in real companies.
The benefit from working and learning at the same time with people who actually make a living out of what you want to do is by orders of magnitude more beneficial than school. Any internship will teach you more about real life work than any class.
Now I’m not saying that you don’t learn anything at school. You need it to give you the basics, the by-the-book approach of design and tech but being able to apply learned principles and confront them to real situations and projects is priceless. Combining school and in-situ internship is for me the best pedagogical approach to learning a subject, at least in our field.
The first Year
During the first year of alternation, I learned print, logo and identity design. From an intern perspective, I did a decent job. From a professional designer standard, I was terrible. My work was messy and full of mistakes. Thankfully, it was ok, because I was with the right people.During your life, if you’re lucky enough, you will meet people who will help you grow. People who will help you reach what you think was too far, by standing on their shoulders.
This was the kind of person my boss was during this first year. We were a two people company, he had a ton of experience and was eager to share it. He was patient and when he detected the smallest amount of talent in me, he helped me expand it.
I wasn’t expecting that, it think it’s rare to meet somebody who needs to make a living and is still available to help you grow professionally and personally. I’m trying to carry on this lesson, but I’m not there yet.
It takes a lot of selflessness.
The second and third year
I spent the second and third year of my alternation in another company. I left my first year one because I needed to make a little bit more money, he couldn’t assume an intern anymore and I was ready to move on.
The company was a small web agency created by one person who was sick of being given orders and wanted to make cool things by and for himself.
Now let’s take a break here for a quick advice to any aspiring designer who wants to land any job/internship:Smile and engage.
As simple as that. At the time I was a shy guy with a bit of confidence issues when it came to selling myself. Saying that my presentation was underwhelming is an understatement. If I wasn’t supported by an employee of this same company, I think I would still be searching an internship right now. Hurray for networking and string pulling.
Ok, back on the subject. You remember what I wrote earlier about my first boss ? Well you can re-apply this here. Two in a row can be considered lucky, and it is. Luck is an important factor in your career but I will get back to that.
These two years improved my visual design skills at an incredibly fast rate.
I was working on a large range of projects from complex web-design to phone applications. It was a balance of internal and client projects. A good way to keep some freedom in your work while making a living. I even did a few email design for mass mailing which I’m not very proud of but teach you the realities of the field. This is also important:
Following the same logic as for school, doing something you do not like builds you and defines you as a designer.
This work was thankfully secondary. A large majority was incredibly interesting projects with a lot of challenges for a young designer. I grew exponentially with every work because I had freedom and responsibility. My boss was a safety net, a knowledgable guide that was there when I needed him. But he trusted me from the start, giving me enough responsibility to feel involved in everything I was doing.Be a safety net for the person you want to see evolve. Make him feel impactful and in control of his decisions and projects.
I finished my studies and was hired full time in this company. I stayed another year before being hired by Google and I loved every second of it.
In addition to school courses and learning with pros, learning by yourself will be a great asset in your career. Some may say that it is all you need, especially in our line of work.If you have the passion about something, self teaching should come naturally. If you have fun learning stuff, you are where you’re supposed to be.
My favorite way of learning was by looking at other people’s work and learn from the .psds they were sharing, that’s why I’m still doing that to this day. A way to return the favor.There will always be more talented people than you.
Look up to them and try to catch up.
Networking and design communities
Something you need to know: I hate networking. Actually I used to. I’m getting a little bit better at it but even today, I’m awkward. I have this weird expression on my face that makes people think I’m obnoxious sometimes. I don’t know, maybe I am a little bit. But I think it’s mostly shyness.
Anyway, I learned very early that networking is important to develop your career, especially in our field. Dennis Covent will probably explain why better than me in his blog post so I will not spend too much time on it.
That’s the beauty of internet, you can network without engaging anybody in the real world. You can build yourself as a designer and build your web presence simply by participating in communities. If you are alone on an island, you have virtually the same chance of being recognized for your work as anybody else.
Of course this is not entirely true, an outgoing person living in San Francisco will probably network easier than a brown bear living in a south France cave with poor internet connection but you know what I mean.
Thankfully, I wasn’t a bear, I had a decent internet connection and a need to share things. So I started a little blog using Tumblr.
It was simply about sharing things about design and writing various notes about it. Some sort of personal Pinterest. Very few readers but that was fine. I enjoyed it. Heres an important note about that:
So I continued writing my little blog and I was eventually contacted by a bigger french site focused on web-design and various source of inspiration for designers. My audience suddenly exploded, of course. This blog had way more visibility. I started shifting from sharing inspiration to creating my own design resources, or “freebies”, after discovering the work of Orman Clark and his work on Premium pixel. I was and still am a huge fan.
It was a great way for me to improve, satisfy my compulsion for pixels and gave me things to share. I also learned a lot from reverse engineering other designers freebies, it was my way to give back. I even started writing tutorials.
And then the owner of the blog asked me this question:
“Do you need an invite to Dribbble?”
This deserves a section of his own simply to make a point. Dribbble played a huge part in my career and I think this is the case for a lot of people.
I joined it the 6th of March 2011 and published this shot:
My first shot made me rapidly get followers. At the time I was publishing a freebie per week. It took a lot of time, I was pretty much doing nothing else during the week besides working and creating photoshop goodies to share and updating my blog. Doing this created a lot more opportunities than I ever thought it would. Suddenly, people contacted me for work, outside of France.
Oh and also, it’s where Google found me.
A little bit of freelance
Remember that at the time, I was working in the web agency. That’s during my full time year that I started receiving work inquiries from companies outside of France via Dribbble. The first one I received was from a print company based in Sweden. That was a big deal for me. I was speaking enough English to understand them, but we were talking about business here. I was fresh out of school and not that confident about handling my own projects.
So I proposed to my boss to make this request a company project. He would teach me the business part of it and I would handle the rest.
This is how I started my first “sort of freelance project”.
It went smoothly, they were satisfied by the result, I delivered in time and we built a pretty good relationship. This project added to my portfolio, I was more confident because I went out of my comfort zone and did it.Going out of your comfort zone will greatly improve your confidence.
I was continuing my constant flow of freebies on Dribbble and spending half of my day in photoshop, designing mock-ups after mock-ups for sites, mail, iPhone apps and iPad apps. I was designing everything I could from video players to upload panels (why?! I’m not sure). I was getting more followers and more work inquiries.
I accepted projects from France, Denmark, and the United states. Each one opening new design horizons. From social platform to DJ-ing software.
As the inquiries got more numerous, I learned to choose the projects I wanted to work on, taking them both for the companies and starting a few projects on my own. Usually, everything went well for a simple reason: I got all my inquiries via Dribbble from clients who knew what they wanted and knew what to expect from me based on my previous work. Being able to choose your client is a luxury. I was able to do that because I had a full time job.If you have the time and if your situation allows it, taking side projects as a freelancer while you have a full time job is a good way to try it out and see if it’s something for you. Be careful though because you will not see the sunlight a lot.
Getting all these clients also helped me to do one important thing, build up a portfolio. Which brings me to this.
Working for free
Before anything else I suggest you read this article by Dann Petty.
I know this is a delicate subject. Every work deserves payment. There are a lot of people that will take this opportunity to exploit young designers and I received my share of “I need a design for a youtube-like site, $200 should be enough.” or “there is 5 other designers working on this, I will pay the one I pick”.Working for free is all about building your portfolio.
Now, you will only be able to do that if you actually manage to pay for your internet bill first of course. One benefit to it is that you will choose the project you want. You will work on what makes you happy and what you will be happy to show as a work reference. If you work with the right persons, it will open doors for you.
That’s why I accepted a lot of requests with no money involved, any student party that needed a poster, every little website design with very low budget because I knew the guy, this kind of thing.
Do it when you are a student, when you’re eager to do over hours and work on various stuff. Yes they will get something for really cheap or even nothing, but as a young designer you will get invaluable experience, you just need to be careful.
As for being able to pick your clients, working for free is a luxury, it is not for everybody. I was able to do it because I had a supporting boss, family and a full time job. If you can to, consider it but do it for the right people.
“Want to chat ?”
The year went by and I received my first recruitment email from a company in Spain. That was weird. For the first time somebody wanted me to work for him, in a big structure, out of my country. He wanted to know if I would consider “a chat”, and they would bring me to their headquarters for it.
I actually told my boss about it what he told me was: “go for it!”. Remember what I wrote earlier about the kind of people that will help you grow?
So I went for it and accepted to go there just to chat. Why not after all? I wasn’t that in love with the city I was living in, I loved my job for sure but I saw an opportunity to grow.If you see an opportunity, if you have the slightest doubt or “what if” in your mind, just go for it.
They paid for the plane ticket and the hotel just to talk to me. I know, now it sounds completely normal to some people but that was crazy for me in a world where I heard clients not willing to pay more than a few hundred bucks for a website design… when they were actually willing to pay anything.
So I did the interviews and got to know them a little better. Things were clicking and I was starting to consider the fact that I could move from France to Spain. It wasn’t that far after all and these people were pretty awesome. But a week after being back home I received another email.
I think this is spam
This email was from Google as you probably guessed. I really thought it was spam. It was completely out of the blue.
I answered… you know… just in case.
At the time it was during a US holiday so it took five days to receive an answer, reinforcing my spam theory in the meantime.
Turned out it was real and I couldn’t wait to know more.
After checking a few things like my willingness to move to the US in case this ever works, the recruiter told me that I was going to enter the process, starting with a call from a Googler.
At this moment I thanked the thousand of hours spent listening to various American TV series while working at home. Otherwise I would have struggled to understand anything during our conversation. It was still hard though, it is way different to passively learn a language than it is to have an actual human interaction, and my brief 2 weeks school trip in the US when I was fourteen didn’t really help.
I thought I did terribly on the phone but apparently not as they were willing to continue the process. The next step was a design exercise.
This part was very stimulating for me. I had the opportunity to demonstrate how I think and deliver polished visuals. It really wasn’t that different from what I experienced several times with clients, maybe the result was a bit more life changing…
So I sent the finalized exercise crossing my fingers hoping to get a positive answer and avoiding imagining them laughing at my work.
Around two weeks later, they told me they wanted to see me in person, in Mountain View.
What am I doing here ?
At the time I had a two weeks trip in New York with a friend planned 4 month earlier. Some sort of “we’re done with school” trip because we wanted to discover New York and the US.
The confirmation email came during this time. I was stopping twice a day at a Starbuck to get some Wifi and check emails. I mentioned I was in New York and that it would be a good idea to meet during these two weeks, you know, to avoid crossing the atlantic and come back again.
They agreed, set up my flight, two days later I was flying somewhere I’ve never been before, California.
I landed in San Francisco and before realizing what was happening I was driving a rental car on a highway that was going to become the one of my daily commute. The “What am I doing here” moment was when I realized I was driving for the first time on a Californian road, passing signs with cities like San Francisco, Palo Alto and Cupertino written on them. Big deal for me.
The next day were the on-site interviews. It went really fast and was over before I could realize it. One thing I do remember is that, between two interviews, I was asked when I considered joining Google. I answered that I never considered it and that I never imagined being here, it was just not a realistic possibility for me.
Retrospectively, this was a probably a weird if not bad answer but it was the simple truth. I was too tired and disoriented to start thinking about what could be a good answer.
Thinking about it, maybe it was what to do. It sounds cheesy but I think this applies to a lot of situations and to any job applications. You may talk your way into landing a job by finding the right answer at the right moment but you would be at risk of not finding the right thing in the end, something that is neither for you or your employer.
This time I didn’t forget to smile though.
And that was the end of it, I just had to wait for the final decision. I jumped in the plane back to New York, looking to San Francisco by the window, a city I would never enter until I discovered it for the first time, searching for a place to live.
If you want more information about the Google hiring process,
head this way. You will find some useful details on that.
I received the call on a Friday. I was asked if I was interested in joining Chrome. This couldn’t have been better. I didn’t hesitate a second and gave a positive answer. The web made me and now I was going to help make it better.My Dribbble announcement post.
One thing you may say if entering Google is one of your objectives is that I got really lucky. I was lucky to have the studies that helped me figure out what I wanted to do, lucky that I got two great bosses in a row, lucky that I got a Dribbble invite at the right time with a Googler looking at my work at the right moment, lucky that I was already in the US when they wanted to see me, lucky that there was still some visas available when I applied, and you would be completely right.
Luck played a huge part in this and I wouldn’t be writing this if it wasn’t for it. One addendum though:Be prepared for luck, if it ever happens, make sure you can take your chances.
Reading this article myself, it sounds like I described some sort of magical story made of rainbows and ponies and that I am a huge fanboy writing an advertisement. You may also not agree with what Google is doing, although reading this to the end would seem like a huge waste of your time. This is only my view of it.
I tried to stay true to what I felt at the time and how things worked out.
I feel grateful to be where I am surrounded by people way more clever than me. Is it awesome every day ? No. It can be frustrating and you may not agree with everything. You are part of a gigantic machine that makes things at an unimaginable scale. That’s also part of the thrill.
Will I be there forever ? I do not know, I had my ups and downs but I do love Chrome, Chrome OS, my team and Google.
For now, I’m not going anywhere.
I think it’s an extraordinary experience simply to be here, not just at Google but in the bay area. I’m trying to remind myself that when I tend to act like a spoiled kid. Deep-down, I’m still waiting for them to realize that I’m a fraud and put me on the first plane back to France.
Get in touch
I didn’t cover everything, it was a long story.
If you have any questions or just want to chat or connect, here is some shameless social network self-advertisement:
Building Expanding Creatives - Google Web Designer
Ant (GitHub) is much more than a React UI kit with a minimalist design aesthetic and every component under the sun. It is a rabbit’s hole that leads to a giant maze of interconnected libraries, with a serious ecosystem surrounding it. There’s a custom build tool based on Webpack called ant-tool, several CLI apps, community scaffolds, and a complete framework (dva, which has its own CLI as well). And the UI components are mini-projects in and of themselves — see this repo for information on each component.
Many of these libraries appear to be very polished, including an entire React animation library. And I’d love to learn more about them, but Ant comes with a challenge — the majority of the documentation is in Chinese.
How’s Your Chinese?
Let me preface this by pointing out that the components library and its terrific style guide have been translated into English by generous volunteers, so the UI kit is completely usable. And the translation effort demonstrates the project’s intentions to open up Ant to a wider audience, boding well for companies considering adopting it.
However, there are some language issues that remain. The English is sometimes confusing or obscure. The maintainer of the library has commented here that they welcome PRs for improving the documentation, so that could be a great way to get involved in this amazing project.Good luck hunting down issues!
Another issue is that issues in Ant.Design are mostly filed and debated on GitHub in Chinese. This could be a deal breaker for enterprise applications, but I’m not sure it should be one for early startups since Ant can be used quite minimally, without making use of smarter features like built-in form validation. Still, if you find an issue or bug with the library, it will be difficult to research previous solutions to your issue, and that’s why I recommend making minimal use of the surrounding ecosystem at this stage.
Popular UI libraries for React include Material-UI, Semantic-UI, Foundation, and Bootstrap (this and this), and they are all fairly mature. Material-UI should be singled out as it massively eclipses the others in popularity, with over 22k stargazers — and over 600 open issues. But it turns out that Ant.Design is a surprisingly worthy candidate as well. It’s battle tested by some of the most well-trodden sites on the web (Alibaba, Baidu), and it boasts a brilliant style guide, custom tooling, and, of course, a comprehensive catalogue of components. It also has only 85 open issues at the time of writing, which is a good thing considering its popularity.
So let’s take a tour of the library, see what it has to offer, and how to get started using it.
The Ant components list is dizzying. Sure, it contains the basics — modals, forms (inline and vertical), navigation menus, a grid system. But it also contains a ton of extras, such as a @mentioning system, a timeline, badges, a seriously nice table system, and other small fancy features, such as an involved address box (see the Habitual Residence field). Have a look — it has everything that a modern web application should, with a tasteful, minimalist aesthetic.
There’s a nice, concise section in the documentation on the guiding principles of Ant.Design. I found it a great read as it got me thinking a lot about UI/UX considerations, especially the “Provide an Invitation” section, where they discuss different ways of making interactions discoverable by a user. By the way, if anyone can recommend me a good book on UX, I would be grateful.
The Ant layout system is comprised of a 24-aliquot (a great new word that I learned from the translated documentation — it means parts of a whole) grid and a separate Layout component than you can choose to use. The grid uses the familiar Row/Col system, but you can also specify a prop called flex which allows you to harness Flexbox properties to define a responsive UI. (See a previous blog post of mine for help grokking the Flex standard.)
Flexbox is now fully supported on just about every browser (with partial support on IE 11 as well as some older mobile browsers), so it should be fine to use. If your customer base is largely Internet Explorer users, which does happen in some industries or countries, you would be wise to abstain from using flex Rows or the Layout component, as Layout is built strictly on Flexbox.
Layout includes components for a Sider, Header, Content, and Footer. Again, these are strictly based on Flexbox, so there’s no choice here — but to be honest I’m not sure what these components give you on top of using the standard Row/Col grid system, aside from a couple extra props you can make use of and possibly some built-in design choices. All in all, it doesn’t seem to me to be hugely useful.
Col elements can be supplied with a span prop to define how many aliquots a column takes up and an offset prop to define an optional offset; Row can take a gutter prop to define space between columns in a row (in pixels, not aliquots).
Here’s a UI example from a side project of mine. It contains one row with two columns:
The code would look something like this:
Ant does not let you down as far as forms are concerned, with options for inline, horizontal, and vertical forms, amazing select boxes, and clear validation messages and icons. In fact, it goes a little overboard here. It allows you to wrap your entire form-rendering component in a higher-order component à la Form.create()(<Component />) to gain access to a built-in validator syntax and custom two-way-binding system (cue audible lip biting). You can then specify standard rules such as ‘required’, or supply custom validator methods. (What are Higher Order Components? Check out this excellent post by James K. Nelson.)
Do you need to use their HOC? Absolutely not, and I’m not sure you should. As I said above, going down that path could expose you to language risk should you encounter bugs and I don’t see why you would want to use a custom two-way binding data system anyway. But you could easily use the HOC and just not use the two-way data binding.
Au Naturel — Plain React Forms
So let’s go over how to use the Ant validation messages without using their higher-order component.
Ant gives us three props that we can supply to each Form.Item component to display validation messages or icons:
- validateStatus — This determines the colour & icon scheme of the validation message (see photo above) — valid options are success, warning, error, and validating.
- help — The validation message to display.
- hasFeedback — This is one of them props that don’t require a value. Just include if you want to display the associated icon, and it defaults to true.
Here’s an example of a simple form element that displays a validation message:
Notice that I used the long-form Form.Item component name. You can make yourself a shortcut for this and any other Ant sub-components as follows:const FormItem = Form.Item;// .. allows you to use:
Form Validation using the Ant Higher-Order Component
Now what if we do want to make use of the Ant Form decorator? It’s fairly straightforward to implement. Create your React component class, and then pass it as an argument to Form.create(). The component can then be exported:class SomeComponent extends React.Component
render() <place_form_here.. />
FancyFormComponent = Form.create()(SomeComponent);export FancyFormComponent as default ; // imported as SomeComponent
Inside your form, decorate your Input fields using the getFieldDecorater method, which exposes a ton of extra props on your component. You can now manipulate form elements directly from the props (eek!).
This example in the documentation gives a thorough demonstration on using the complete higher-order component.
Interactive Components — Message (Alert)
Ant provides a number of other components that give web applications a high degree of interactivity. A great example is alerts — or messages, as they’re called in Ant. Adding an alert is as simple as calling message.success('Great! Item has been saved.') in your component. Message types include success, warning, or error. Just don’t forget to import message (lowercase) from ‘antd’.Minimalism at its Best
As I mentioned above, you can either go all-in on the Ant ecosystem (with its custom Webpack adapter), or just opt for the design framework. I went with the latter and I suspect you might too, not the least because using other parts of the ecosystem could require a working knowledge of Chinese. But I’ll cover both options.
Option 1 — Use the CLI
Ant comes with antd-init, a CLI for generating a complete React application with Ant installed. I do not recommend this route for non-Chinese speakers, but if you want to try it, getting started is easy. Just install the CLI using npm, create a new folder, and run antd-init:npm install antd-init -g; mkdir demo-app; cd $_; antd-init;
You will then be greeted by the following message:antd-init@2 is only for experience antd. If you want to create projects, it’s better to init with dva-cli. dva is a redux and react based application framework. elm concept, support side effects, hmr, dynamic load and so on.`
It’s a rabbit’s hole. Open your new application and you will see that your familiar webpack.config.js file is no longer familiar — the CLI uses ant-tool, a “Build Tool Based on Webpack” that I mentioned above. The documentation is in Chinese, but it appears to set common defaults for Webpack and then allow you to just supply values that you want to override. Here’s what the config file looks like:// Learn more on how to config.
// — https://github.com/ant-tool/atool-build#配置扩展module.exports = function(webpackConfig)
]); return webpackConfig;
The index.js contains a lovely demo page that uses the understated Ant styling.
Option 2 — Use Standard Webpack
This would be my preferred route, but it can be more complicated getting your Webpack settings right at first. The Getting Started page includes some good instructions. First install Ant in your React app:$ npm install antd --save
Ant recommends using their own babel-plugin-import in your .babelrc:"presets": [
"plugins": ["transform-decorators-legacy", ..., ["import", [ libraryName: "antd", style: "css" ]]
Make sure your Webpack includes loaders for .js and .css files, and you should be good to go. To use an Ant component, import it in the module file. E.g.import Row, Col, Icon, Button from 'antd';
There’s no doubt that Ant has a lot to offer as a UI framework, with a formidable catalogue of components and a serious ecosystem around it. It does, however, come with some risk. If you experience an issue with the library, you may be stuck communicating in Chinese. Ultimately I recommend trying it out if you like the minimalist aesthetic, while keeping usage of the peripheral Ant ecosystem to a minimum.
ADRIENNE PORTERFELT: You've probably tried to buy somethingonline or had to fill out some formfor your kid's school, and it's reallyhard on your phone.
It's really hard.
MUSTAFA: There seemsto be a dark art when it comes to nativeapplications, and they're such small details thatyou're actually working on.
[MUSIC PLAYING] Quite often, developers willjust throw on input fields onto a page and not reallythink about the UX that's attributed to that.
So they'll think ofa flow of a form, but they won't necessarilyfeel that individual input, so how a user struggles.
And we know thatautocomplete really helps speed up theuser experience and makes fillingforms quite nice.
What are your feelingsand experiences on autocomplete andAutofill as a thing? ADRIENNE PORTER FELT:From the user experience, you've probably triedto buy something online or had to fill out someform for your kid's school.
And it's reallyhard on your phone.
It's really hard.
It's even hard on desktop.
You don't want to get upand get your credit card out of your purse,which is downstairs.
And these browserfeatures just really improve the userexperience of using a form.
In fact, we find that peoplefill out or submit the form 30% faster if the formworks with Autofill.
So we very much suggest thatweb developers think about this.
You want people to besubmitting your forms.
Right? So if you really want yourforms to be submitted quickly, easily, work with Autofill.
MUSTAFA: And why do you thinkdevelopers don't do that? Is it very difficult to do? I'm assuming it's just a fewattributes you add to inputs.
Right? ADRIENNE PORTER FELT: Yeah.
It's actually not that hard.
So you basically need to setup autocomplete attributes, and you need to makesure that you're not doing any fancy things thatreplace the normal select and input elements withother types of elements.
I think most of these developersjust don't think about it, don't realize,that you just need to put a littlebit of extra effort in to make sure that yourform works well with Autofill and to test it out.
MUSTAFA: Is that oneof the challenges, I suppose, like people makingthese custom UI things, which are not native but justlike divs or whatever and replacing that? Is that where thingsfall down with Autofill? ADRIENNE PORTER FELT:Honestly, there's a few things that can go wrong,but that's one of the big ones.
Yeah, so someone wants thisreally beautiful custom form where the dropdown isall fancy and custom.
And as a result of that,they're using all divs.
And the browser can'tfigure out, oh, this is supposed to be a form.
And then in that case,Autofill isn't going to work.
MUSTAFA: And Isuppose there's a lot of accessibilityissues connected to that as well, it looks like.
But from your pointof view, you've got designers anddevelopers, they want to do something custom,like unique experience.
But then as someone whoworks on the browser, you want to say, now letthe browser do the work.
Do you think there'sa middle point there? How can developers at leasthave a custom experience that's unique to theirproduct, but at the same time without breaking standards? Because this is one of thebiggest challenges on the web.
ADRIENNE PORTER FELT:So there's a lot of things you can do tochange the look of the form on the page while stillusing the select and input elements that HTML provides.
Right? You can customizethem in many ways.
I have to admit, there is onething you can't customize, and it's the lookof the dropdown, like in a select element.
But everything else, the wayit statically looks on a page, you can customize.
And the browser will stillknow that they're fields.
What you see is thebiggest challenge then, for Autofillor implementation, from your point of view? ADRIENNE PORTER FELT:I think it's honestly that developers don't thinkabout it, that people don't think to themselves that theyreally need to be testing their forms in this way.
When you've made it yourself,you've filled it out 100 times.
You tested it yourself.
And you don't thinkabout the fact that a user is goingto be coming to it in a different state of mind.
They are tryingto fill it out as fast as they can on the phone.
So I think developersjust aren't really thinking about the factthat they need to take these extra small steps.
MUSTAFA: So in terms ofbrowser compatibility, the things you're using willbe Chrome-specific stuff? Or is that open source-- not open source, butit's cross-platform.
ADRIENNE PORTER FELT: Yeah,that's a good question.
So specifically autocompleteattributes for Autofill, that's standardized.
All the browsers respect them.
With that being said, thereis one part, turning Autofill off-- that's the autocompleteoff attribute-- is not respected by all browsers.
But if you say,this form should be a credit card, thatwill be respected by all the major browsers.
MUSTAFA: But eachexperience, is there slight quirks per browser? Because obviously, that's goingto be a browser-specific thing.
ADRIENNE PORTER FELT: Some are-- they have veryslightly different UIs.
For example, maybe they'llbe integrated with a keyboard widget versus a dropdown.
But I think they're prettysimilar across browsers.
MUSTAFA: You work on theactual Chrome UI itself.
ADRIENNE PORTER FELT: Yes.
MUSTAFA: So are you actuallybuilding that design and code yourself, or are youworking with UX designers in that process? ADRIENNE PORTER FELT: Sowe have a design team.
And the design team helpsus figure out what those UI elements should look like.
We actually have a bigredesign coming up this year that I think is going tomake those substantially more beautiful and also help clean upthe code, which I know that it won't affect most people becauseit won't look any different.
But from our perspective-- MUSTAFA: It's much cleaner.
ADRIENNE PORTER FELT: Man,the code's so much cleaner.
MUSTAFA: What's the actualprocess of you actually creating UI? Because for me, I do front-enddevelopment and code.
But it's like there seemsto be a dark art when it comes to native applications.
And they're such smalldetails that you're actually working on, which the user maynot notice because it works.
But if it's broken,they will see it.
What is the actualprocess that you go through with your Chromedesigners to actually making the UI or testing it? I'm asking lots ofquestions all at once.
ADRIENNE PORTERFELT: Yeah, it's OK.
So I'll talk about theprocess a little bit.
So usually at the beginning,Product, Eng, and the designer will get togetherand talk about what they hope for from the feature.
Often, the designwill then come up with some conceptualmocks of what they feel the feature could look like.
They'll get feedbackfrom Product.
They'll get feedback fromthe engineers, like can we actually build this, whatare the corner cases we need? And then we'lliteratively get closer to what we actually can ship.
So I work on across-platform team, which means that whatwe build has to ship on all of Chrome's platforms.
People think of Chromeas one platform.
But actually, it'sWindows and Mac-- which previouslyhad different UIs, but we're coming toone single standard-- Android, iOS.
And so we have to havedifferent mocks that relate to the specific platforms.
So some things may bepossible for some subset.
Anyway, the designers get allthis feedback from engineers, like, we can do thishere and not there.
And then we iterativelycome through to red lines, which isour final set of designs.
And that's what we implement.
MUSTAFA: So in termsof do the designers work with the actual W3C? Because you'redesigning something which has to beconsidered cross-platform at the same [? time.
?] So likewhen the payment request API, like I was working withsome of the team there, there seems to be thingswhere you have to really be seeing whateveryone else is doing so that the experiencethat you're creating is not so widely different.
And that can be quitechallenging for the designer and developer because youinstinctively want to make it, I don't know, "better.
" But you don't want to makeit so vastly different, because then you stick out.
ADRIENNE PORTER FELT: That'san interesting question.
The challenge here isthat with specs, we try not to specify whatthe UI has to look like.
We try to talk about what theuser experience should be so that we can have the appropriatecallbacks, et cetera, to build that experience.
But we don't like tostandardize the UI itself, which is a fine balance becauseyou have to have a UI in mind when you're designing the API.
But we try to make itas general as possible so that we can build differentUI experiences on top of it.
MUSTAFA: Are you workingwith the browsers as well at the sametime to do that, or is it you do things independently? Because there's the thing.
It's like if you do it[INAUDIBLE] the browsers, then you may be leddown a path that's not the best for everyone.
That it's, OK, it'slike a compromise.
But at the same time, you don'twant that complete disparity.
ADRIENNE PORTER FELT: Itdepends a lot on the standard, honestly.
Some of them willbe heavily driven by Chrome or some other browser.
They really want this API.
They'll drive it, and thenget a little bit of feedback along the way fromother vendors.
Whereas others,from the beginning, there's severaldifferent browser vendors working together.
So honestly, it differsfrom standard to standard.
MUSTAFA: And we're coming to the10-year anniversary of Chrome.
What do you thinkthe future of say, Autofill, or just workingwith the other browsers? Because it seems like thingsare getting much better.
I was speaking toDarren, and it was like, the implementationof Flexbox was a nightmare becausethe standard kept changing.
But with CSS grid, it'samazing that there's so much cross-collaborationbetween the browsers, which is great for the users and thedevelopers working across this.
What do you think the futureis for Chrome as a platform and, I suppose, Autofillas well as a specific? ADRIENNE PORTER FELT: Sofor Autofill specifically, it's hard to saybecause I don't think the limitation there reallyis the lack of browser vendors cooperating.
I feel like actually, there'sbeen a lot of discussion, for example, aroundpayment request.
There's a lot of collaborationbetween Safari and Chrome.
I think that thereal problem we have is that Autofill dependson developer adoption.
Right? If it's hard for thebrowser to figure out what form's in thepage, we're not going to be able to Autofill it.
And so I think thething we really care about is whetherwe can get developers interested in andusing the tools that we have provided for them totry to improve the Autofill experience.
Do you ever have toremove a feature when you see there's not wide adoption? Because I can seefrom an engineer, you're working on Chrome.
You spent your heart andsoul working on this feature.
And then you know it'sgreat for user experience.
You know from theresearch that Autofill will help transactions,and it's just nicer.
But if adoption doesn'thappen, how do you [INAUDIBLE]?? It's the biggest-- ADRIENNE PORTER FELT: Yeah,that's a really hard one.
I've been througha few deprecations.
They can be really challenging.
It's very hard.
So there are a few waysyou can look at it.
One is how many usersinteract with websites that are using such a feature.
And obviously, thatnumber is large, you don't want to create apain point for a lot of users.
But even if thenumber is very small, it might be that there are afew websites, a few companies, whose entire businessmodel depends on having access to this API.
And so that can make itvery difficult, where OK, even if it's thisreally a niche thing, it still can behard to deprecate.
So I think there have beenlots of ongoing discussions in general about howto make that trade-off.
Some of the onesI've been involved in relate specificallyto security and TLS, where if something is makingthe web as a whole as safe, we may have to breaksome connections in order to deprecate it.
And it can be areally painful thing when you've got old serverson the internet that aren't being upgraded.
And maybe it's only a smallpercentage of overall page loads, but it'sstill frustrating when a user is trying to getto a website and it's broken.
But ultimately, fromChrome's perspective, it's the user's experiencethat's paramount.
Right? ADRIENNE PORTER FELT: Yes.
MUSTAFA: And theirsafety and security.
So it's like HTTPS, you couldprobably explain it better, but there's a cutoff pointwhere if your site is not loaded on HTTPS, you're goingto get a message saying, this isn't secure.
Right? ADRIENNE PORTER FELT: Fora long time in Chrome, we showed HTTP as neutral, HTTPas just plain text and no TLS.
MUSTAFA: Sorry, what's TLS,just for my non-designer-- ADRIENNE PORTER FELT: Oh, TLSis the underlying protocol that makes HTTPS HTTPS.
It's why it's secure.
So there is HTTP,which doesn't have any of the end-to-endsecurity bits on it.
And HTTP websiteswere just shown as a neutral standard thing.
Right? Most websites on the web wereHTTP, but that's changed.
We went from a few yearsago, we were at 25% HTTPS.
And now, it's the opposite wherewe're at more like 75% HTTPS.
So made changes in theUI to back that up.
So now when you go to awebsite that says HTTP, it's going to also say"not secure" next to it so people reallyunderstand what that means.
MUSTAFA: That decision mustbe quite tough, though.
In some respects, you need toforce the developers to say users' security is paramount.
But at the sametime, does it feel like you're breaking the web? ADRIENNE PORTER FELT:It doesn't really feel like we'rebreaking the web.
First of all, Ithink people have seen this a long time coming.
We've been talking aboutit for a long time.
We've rolled it out in phases.
So first, we started showing"not secure" specifically for pages with passwordsand credit card form fields.
And then it was for allform fields and web pages when viewed in incognito.
And now we're rolling itout for all HTTP websites.
And as you can see, becauseHTTPS adoption has really increased, it's onlyimpacting less than a quarter of page loads at this point.
MUSTAFA: So really,we're just talking about protecting the user.
ADRIENNE PORTERFELT: Yeah, and I think users have a right to knowthat their information isn't secure when they'regoing to this website and help them make adecision about whether or not they want to keep using thatservice or go to another one.
MUSTAFA: And do youthink users are quite savvy now to see those things? Or is this part of theeducation for the user as well to say, look,there are certain things on the web which arenot secure that you have to take into consideration.
ADRIENNE PORTERFELT: I'll be honest.
We have literally billions ofactive users, so it's hard to-- MUSTAFA: Make ageneral [INAUDIBLE] ADRIENNE PORTERFELT: --say generally whether people are goingto understand it or not.
We think enoughpeople understand it that they have a reactionand that they can reach out to sites saying, hey, Ireally like this site, but I wish it were secure.
And we see people doing thatas we've been rolling out these warnings.
SPEAKER 1: The way thatcellular networks are set up is that there's alwaysthese fringe areas, and there's alwaysthese breakdowns.
And higher latencyis always there.