25: Make Brilliant Messes with Diana Mounter and Emily Plummer
Diana and Emily create design systems at GitHub.
Chantastic asks them about the story of design at GitHub, what role React will play in future systems, and what community tools that make their job easier.
They talk Rails, Lerna, monorepos, Figma, component APIs, and the importance of supporting your design system by supporting designers and engineers.
It’s a great discussion for everyone looking to improve processes in a legacy application.
Featuring
- Diana Mounter — Twitter, GitHub, Website
- Emily Plummer — Twitter, GitHub
- chantastic — Twitter, GitHub, Website
Links
- Jon Rohan — Systems Designer at GitHub
- Jina Anne — Design Systems OG, DSC organizer @sf_dsc, @NYC_DSC
- NYCDSC — Design Systems Coalition meetup in New York
- Donut.js — Emily's web development meetup in Portland. Organized by Matt McVickar
- Primer Style Guide — Resources, tooling, and design guidelines for building websites with Primer, GitHub's front-end framework
- Minimal API Surface Area — JSConf EU talk by Sebastian Markbåge
- BEM naming methodology — Conventions for extendable and reusable interface components
- Design systems at GitHub — A Medium piece by Diana on everything design systems at GitHub. It goes into the tech and support roles of the Design Systems team
- Lerna — 🐉 A tool for managing JavaScript projects with multiple packages
- Using Figma designs to build the Octicons icon library — An article by Jon Rohan on their new icon system
- styled-system — ✨ Responsive, theme-based style props for building design systems with React
- emotion — Performant and flexible CSS-in-JS
- Probot — GitHub Apps to automate
and improve your workflow - Primer Component — GitHub's React component driven style system
- Next.js — A React framework
- MDX — Markdown for the component era.
- mdx-docs — 📝 Document and develop React components with MDX and Next.js
- Andrew Clark: React Suspense — A powerful new set of primitives for addressing longstanding problems in UI development
- @githubprimer — The design system that powers GitHub. Maintained by @broccolini, @jonrohan, @shawnbot, & @emplums
Transcript
[00:00:00] Michael Chan: This is React Podcast. I'm Chantastic. Design systems are an incredibly hot topic right now in the world of design. And React is a natural pairing. I was able to sit down with Diana Mounter and Emily Plummer, who work on the design systems team at GitHub. And they are brilliant. Now, I'm personally excited about this call because GitHub is an app that is 10 years old and sits on a Rails foundation. So when we talk design systems, this isn't like some pie-in-the-sky idea. There's a lot of work that goes into transitioning the existing code onto this new design system. So we talk dirt, we talk about how messy it can be to transition that code and how important it is to support your team as you make that transition. If you work on a project with a lot of legacy code, I think you're really going to love this episode. There's absolutely something in here for you. And if you work on an app that doesn't have any design systems in place yet, this is also for you. So without further ado, a word about our sponsor, and then we'll jump right in. Hey, everyone. This episode of React Podcast is brought to you by React Training. They provide in-person, hands-on training for development teams from React community leaders and experts. For more information, visit reacttraining.com. I'm on the line with Diana Mounter and Emily Plummer from GitHub. On their design systems team, and I'm just thrilled. So I'm gonna let them each introduce themselves, and I'd like to know, how did you come to design systems and GitHub?
[00:01:59] Diana Mounter: Okay, um, I'm Diana. I'm the uh design operations manager, but for most of the time at GitHub, I have been the design systems manager and gone from being an IC to leading the team. I've been at GitHub for 2.5, 3 years now, but my interest in design systems started from when I was working at Etsy on on their style guide. Uh so when I started at GitHub, I just immediately gravitated towards that, and uh fortunately there was support for that, and that became my full-time job. We went from just me and one other designer, Jon Rohan, um to 4 people. And with Emily, who's on the podcast today.
[00:02:42] Michael Chan: Awesome, awesome. Now, you also lead a meetup group in New York?
[00:02:48] Diana Mounter: Yes, that's right. Yeah, thanks for reminding me. Yeah, um, I run the uh New York chapter of the Design Systems Coalition. Awesome. It was started in San Francisco by Gina M. and there's um a lot of them popping up in different uh parts of the country and the world. And yeah, I've been running that for a couple of years now and we have a meetup uh bimonthly with talks, um usually lightning talks and Q&A, and then we have a happy hour um on the sort of um opposite uh month. So yeah, if you're interested in coming or speaking at it in New York, then yeah, definitely look that up.
[00:03:28] Michael Chan: It's so well branded. Every time I see like an event, I'm like, I
[00:03:32] Michael Chan: need to fly out there.
[00:03:33] Diana Mounter: It has a design system. And it's and the site's built in React, of course.
[00:03:40] Michael Chan: Beautiful. Emily, please tell me how um you got into React and design systems and what brought you to GitHub.
[00:03:47] Emily Plummer: Yeah, so I've always been typically like a front-end engineer at every job I've been at. I in my previous jobs, I did front-end work. I was at Buffer before this and I did some work on their component system and just lots and lots of work in React and When I saw the job listing for design system engineer, to be honest, I didn't even know that was a job title that I could have. And I was like, this is perfect. Like everything in this job description is exactly what I want to do in my job. So I was super excited. Um, and yeah, it's been great. We've been building out a little component library and it's been a lot of fun. I also have a meetup in Portland. I don't totally run it anymore, but I started it a few years ago. It's called Donut.js. It's a donut-themed meetup. Nice.
[00:04:35] Michael Chan: Excellent.
[00:04:35] Emily Plummer: Lightning Talks, it's now run by Matt McFigurer.
[00:04:38] Michael Chan: I don't even know anymore, I just wanna go.
[00:04:39] Emily Plummer: Yeah, it's great. We actually had a designer who just like, we had an issue on GitHub and we were like, we need help, we need a logo, we need a website, and this guy, his name is Paul Peterson, he just designed the whole website for us. No one knew who he was, he just like dropped in. And now we have like sprinkles raining down on our website and all this stuff. It's now run by Matt McFigurer and it's in Portland, so if anybody is in Portland. That's awesome.
[00:05:05] Michael Chan: What um what topics do you cover?
[00:05:07] Emily Plummer: Uh all kinds of stuff. It's mostly it's called "Dana.js," but we've had like Ruby talks, we've had all kinds of different technologies, and then we have people come in and talk. I think someone did a talk on meditation and work-life balance, so kind of any kind of tangentially related topic is fair game.
[00:05:27] Michael Chan: Nice. I would love to go to a Portland meetup. It seems like might be a little bit more freeform than some of the ones-
[00:05:34] Emily Plummer: It's pretty freeform.
[00:05:36] Michael Chan: So I'd love to know a little bit more about the history of design systems at GitHub, what they've looked like in the past and kind of where they're headed right now.
[00:05:47] Diana Mounter: Okay. Um, I can definitely uh start on the history and and sort of roughly where we're heading um from the viewpoint right now. So Prima actually started as a uh a gem, um actually, that I I learned only a few months ago. which just had common styles and assets that were helpful for um Ruby applications that GitHub was building. And at some point, that evolved into just being about um the CSS. And uh it's gone through many iterations. Um so before people were using the term design systems, um there was there was for a long time at GitHub an effort to to uh you know find a way to share like um common styles and patterns. Uh and then and then I think 2013 or so, they started to write documentation for this. And in 2015, um that was open sourced as Primer and um that documentation was made public. But yeah, there has been like um various versions of Primer uh used internally for years and years. Uh, so I started at GitHub at the end of 2015 and started poking around the design system and the styles. And I just noticed that there was a lot of things that weren't really built with reuse in mind. And there were a lot of— uh, there's a sort of ever-growing amount of code bloat, CSS bloat in the .com repo. Uh, I'm probably gonna say .com instead of github.com, but that's what I mean when I say .com.
[00:07:25] Michael Chan: We'll alias it in our minds from now on.
[00:07:29] Diana Mounter: So yeah, I try not to use internal lingo too much, but um you basically had to write a lot of CSS to to implement any new design. And there was, I think because it was open source and it was in this separate repo and also every single um module, every component had its own repo as well, which made making like updates across the whole design system really, really difficult. So we kind of brought that all back into the .com codebase and talked about what is what should this really be. And we're like, this needs to be GitHub's design system first. We shouldn't be afraid of open sourcing stuff because it's not useful to other people. But you know, if we build a good design system, the chances are a lot of it will be useful to to other people, um if it's nice and reusable and composable. Um so we brought that all in .com. Uh kind of made a big mess, uh did another 3 versions of documentation sites. And and then uh really, we just uh after a cascade of like or like the perfect storm of uh npm publishing problems happened and and failing tests and things, uh we realized that we really needed this design system to live in its own repo again. Yeah. And we kind of needed a little bit more friction between being able to make updates to it. Because at that point, anyone working in a .com codebase could update something and forget, not realize that this is actually published and there's other GitHub sites using it. Uh so that's when, and this is not a short story, I'm trying to be quick, but- No,
[00:09:07] Michael Chan: it's
[00:09:07] Diana Mounter: great. That's when we decided, uh actually it was funny at this time, I say we decided it was, there's a few of us discussing this, but I kind of uh took this upon myself, um when the other team member was on um paternity leave, which is maybe not the best idea to do something like create uh a new- turn all these small repos into a monorepo and set up Lerna and everything all on your own. And so when um Jon Rohan came back from paternity leave and we shortly after that onboarded Sean, who's the other systems designer, they were kind of launched into this, help me like finish up this massive huge PR, making a monorepo and setting Lerna up. For the first time. So that was a nice onboarding experience. But that that helped us like um sort of a bit more of a robust sort of pub publishing process. So that gave us like a good sort of system for um working with Sass. And we had done a lot to it. We've done things like add like utilities or functional CSS sort of classes, um and used BEM to like manage our components. But that only gets you so far, as anyone who's worked with that knows. Uh and so this year, we started on the React component library because we have just got all these like repeated chunks of markup. And even though we've pulled out our design system, there are still uh a lot of like custom overrides in in the .com codebase. And you just can't really contain that. Someone can change one thing, you know, in one area, and it blows up a bunch of stuff somewhere else. So we're drawn to React because of the opportunity for encapsulating anything in just one component and it not leaking out that mess onto everything else.
[00:11:02] Michael Chan: I um I deeply identify with the the process that you mentioned. And I think it's super fascinating that you pulled it out into a gem and then had to kind of like insert it back into the .com codebase again before knowing how best to pull it back out again. You mentioned fighting the separation of concerns and how a lot of engineers were having to reimplement big parts of like CSS or whatever with each view. What are some of the ways that traditional systems fail in terms of like CSS and templates and JavaScript all being separate?
[00:11:38] Diana Mounter: So just as a background, I come from a product design background. So I'm not- full disclosure, I'm not an engineer, but through getting interested in front-end design systems, I spend more time in code uh than in design tools, although now I'm a manager, so not so much. Um, so I think um that one of the the problems with like that separation is that they're separating the languages and not the concerns and not what the component is doing. And it means that if there's um a repeated chunk of like markup And that looks all the same but just takes in different data. And you have to just repeat that. There's not really great ways to do that in Ruby. I mean, there's like helpers, but there's there's less things you can do with that, I guess. And it also means that people, engineers and designers, have to make a lot of- they have to like get that string of class names right. So like the benefit of having utilities and and and using BEM syntax makes it easier to read the markup and know what the CSS is doing, and especially if you use very obvious like naming conventions that sort of make it clear. Um but the the the downside is that you often end up with a a a larger amount of class names to string together. And um that kind of is tough when you have to repeat that chunk a lot. And and it still means like a lot of kind of decisions someone is making when they're implementing that design.
[00:13:12] Emily Plummer: It could kind of make you go down the path where you're almost expecting the engineers or the designers who are developing the UI to kind of like learn a whole new system, almost like learning a whole new language. So there's still room for error there. If you put the wrong class name on or if you forget this piece of markup. There's a lot of more room for error and for like deviation from what the design system is supposed to be. Whereas React components, it's pretty straightforward. It's all encapsulated in one place, which is great.
[00:13:44] Michael Chan: Yeah. And it seems like maybe it does a better job of being a closed system as opposed to CSS, which is kind of open-ended and anyone can insert insert anything that will screw up anything along the line.
[00:13:56] Emily Plummer: Yeah.
[00:13:57] Diana Mounter: Yeah. I mean, there's good thing, good and bad things about inheritance, right? Um. But yeah, with components, it's like you can make a mess inside that component and it doesn't have to affect anything else. It's harder to do that with just CSS.
[00:14:12] Michael Chan: So, um, Dana, you meant- you wrote a post about a lot of the things that you're doing at GitHub, the way you're implementing design systems, the approach you're taking, the things you're learning, and how you're documenting everything. Um, you mentioned in that solving the high-impact problems first. What were some of the high-impact problems that you solved first at GitHub and are continuing to solve?
[00:14:35] Diana Mounter: Mainly the feedback loop of designing something and implementing it and being able to see if it works in in in a real application. The time for implementing design was like the biggest thing that we wanted to tackle. So in a way, our first audience was GitHub staff. But one of the main reasons we wanted to tackle that is because if people are spending all this time trying to just hook up a design, rather than iterating on it in code, you know, maybe trying a few different versions with users and with other staff, then they're then they're not spending time like making the best experience for this feature. They're spending more time writing CSS or like figuring out how to hook up all the all the pieces. That was really the problem that we were we've been trying to solve and still want still are working on is yeah make it easier to implement design and and do it successfully. But yeah, I think the developer experience of implementing design is like the the main thing that we have been working on and continue to work on.
[00:15:37] Michael Chan: I said this to a lot of people on our team, is that you could have the greatest, newest, awesomest, shiniest product or idea on the planet, but if you don't have a migration strategy or a support strategy, you only have half of a product and that thing may never see the light of day. So what are some things that that your team does to support the developers so that you can find success in the design systems?
[00:16:02] Emily Plummer: Yeah, so um one big thing for us while we've been building out the React component library is um thinking about the public API a lot. Like we've had uh weekly meetings for probably the past few months while we've been working on this on Wednesday where we kind of check in and we just talk about what is the public API for this component, like how Will a developer use this? And a big thing that I think will make um adopting the new system easier is the way that we look at props. So a lot of the props actually match up to some of the CSS rules that they were using before, like our utilities. Um previously, if you wanted to add margin in Primer, it was my-2, which is margin-top-2. So our our props are similar. And then In places where that public API, you could call it, for our CSS was kind of weird, we take the liberty to kind of change that on our own and create new patterns for people to use.
[00:17:01] Diana Mounter: Yeah, I think slightly different area of support. I think one of the other things that we do is do a lot of just in-person support. So I think, yeah, I think the best thing that we can do is to build a a really great API for the design system. That's really important. So Minimal API Surfaces is a great talk and I I actually want to watch it like multiple times more and I and I want to get make my team watch it again because I think there's a lot of really great advice that you and that is actually, even though it's not necessarily talking about design systems, like it's all very relevant. And I think that is one of our big goals is create like um an API within that you can learn from just by using it really quickly. And make and like if you learn how to use a component over here, um there's some similarities or consistency with how you apply props to this other component in this other area. The API is the most important thing, but we still have to support people in real life learning to use the system. And so we do a lot of in-person things. So as well as documentation, we also do things like um we have a first responder rotation. triage issues that are coming in. We we make ourselves more available than the rest of the team to respond to questions and answer. Like people, we have a Slack channel and people post questions in there. Um we review every pull request in .com that is touching CSS and and help make sure that they um know how to use the design system and give us some just general CSS guidance. And so um we started doing that with React too. But that doing pairing, doing the first responder, being available in Slack, and probably running some in-person like tutorial sessions will be all part of the things that we need to do to help people really learn how to use the system and support them. Otherwise, you're sort of like building it and then going, "Have fun!"
[00:19:01] Emily Plummer: Yeah. And one thing I actually did was I I knew a particular team was using React and they were interested in using our So I just pulled their code down and I replaced as many components as possible with our design system components. Um, I wrote up some documentation about kind of my thought process and on which components I took out and replaced with the design system components and how uh one might go about migrating um our components into their project. And that was, I it was kind of more for me than for them, but it was also helpful. for them. And then when someone else approached me from a different team, I could point them towards that documentation as well. So, um, I think just like getting your hands dirty and getting in someone's project and actually using the components in a real-life project yourself, not only was super helpful for them, but it I made a bunch of PRs on the design system itself to fix some things or make some APIs easier to use. So I definitely recommend that.
[00:20:02] Michael Chan: What is the the range of components that you're building? Are they just UI um components or are there interactions built in? How far do those um how far do those go?
[00:20:12] Emily Plummer: Yeah, so for now, we're mostly just focused on presentational components, so just UI and that's it. Um and we've built, I don't know, like 30 so far of those. So I found like jumping into other projects, that covers a lot of surface area so far. And I think next we will start thinking about building more of those like container components that actually implement some um interactions and stuff like that.
[00:20:41] Diana Mounter: This the last few days I've just been rebuilding like one of our Primer websites with Primer React and I pretty much have everything I need. So it's got quite good coverage already. Um but that's something we'll do is build um we'll build our own Like we have a bunch of documentation sites, like we have like the Octocons website that is in desperate need of refactoring. So we'll test our own, we'll test our own library and and to help us understand like what that might be like for developers at GitHub, whether even if it's just like an experiment or a prototype or like some actual GitHub apps working with the API.
[00:21:18] Michael Chan: So you mentioned the Octocons and Icons seem to be just torturous when you try to split them between platforms. I'm curious how your experience has been.
[00:21:31] Diana Mounter: So we, we have um a bunch of variations of it. We actually turned that into a monorepo recently because we had like the sort of similar situation of we have like this source of SVG files, but then we need to distribute it for use with Rails helpers in .com and then maybe a Jekyll site. And then more recently like React. So there's 4 or 5 different sort of formats you can use Octicons in. So we version it according to um whether there's been updates to the actual icons. Uh and then and then just distribute the different formats for use in different web applications. Sorry, I don't know if that's really relevant or interesting. We think about versioning a lot because of yeah managing variations of the design system.
[00:22:20] Michael Chan: Well, it's really easy in terms of that support and kind of people who are consuming the design system to be able to know, oh, hey, I don't have this thing, and then look at the version and then be like, I just need to do these things and then I'll be back up to date or whatever. So I feel like that kind of goes back to your support role of developers.
[00:22:39] Diana Mounter: Definitely. Yeah. I mean, yeah, we use um uh Semver um for versioning. And I I'm like, I have to go- so at Etsy, we did not have versioning, at least when I was there. I think they do definitely do now. But um that was a pain point for us is like we need to make breaking changes. So to come to GitHub, of course, that was already happening. So um that was like really nice. It just took us a bit of time to like get a really good publishing workflow set up, and I think we still hit problems with that sometimes.
[00:23:11] Michael Chan: Yeah, so how has your experience with Lerna been in terms of managing the component libraries and whatnot as a monorepo? I'm assuming, based on your statement, that those components are independently versioned. Unlike the Octocons.
[00:23:25] Diana Mounter: In in Prima CSS, the Prima CSS repo is independently versioned and probably will will will stay like that for now, at least, because there we have to kind of care a bit more about the the bundle size of the of the CSS. And we've also split it into meta packages for use in marketing sites and more of an application that has lots of form fields and things like that. Yeah, so that that's partly for convenience of the the sort of apps that are consuming the design system. And so yeah, that's independently versioned. And honestly, Lerna was a godsend like after the the previous workflow. And um I had to read through people's commits to try and understand what type of changes they had made and like make my- because any at that point, anyone could update anything. And try and glean from that whether it was a breaking change or not. And then just yeah, having something, having it all in the monorepo was great so we could make changes to variables that affected a bunch of different components and then just run a command and publish it. I think we created some problems for ourselves with automating too many things and and sort of pushing it a bit, but-
[00:24:40] Emily Plummer: Yeah, yeah. I have I've run into a few issues, yeah, and I think it's more related to like the automation aspect of it and like having to delete all of my tags and getting in this like weird tag hell, basically. Um, but other than that, I don't I couldn't see us doing it any other way.
[00:25:01] Michael Chan: Yeah, when it goes wrong, you kind of realize how much it's doing for you.
[00:25:04] Emily Plummer: Yeah, yeah, totally.
[00:25:06] Diana Mounter: Setting up a monorepo and using Lerna is a really good way to just finally make yourself understand like Senva and how npm and publishing works. And it like I am so glad I did that, even though it was really hard at the time. It's like, yeah, it's a really good way to learn all that stuff.
[00:25:25] Michael Chan: So I want to ask a little bit as we're talking about automation and integration, um as far as I understand, the icons that you've made are all managed in Figma. Um how has that been for you? Um has it been an unmitigated win or have there been some challenges there?
[00:25:42] Diana Mounter: The win of using Figma for the way you make edits to um icons or where you can make edits to that is that you can access Figma in the browser, right? You don't need to have a particular operating system to use this design software. And it has an API that we can interact with. So that's been like super awesome and is why we um switched from our previous setup to using Figma. And people can still make those edits in code if they are an expert at handcrafting SVG. They can, you know, some people- I know some people. Um, then they can do that. So that that's great. And I I think we are always looking for ways to allow people to make changes in the tools they feel comfortable with. So for designers, um, that might be, you know, design tools, and for engineers, that might be You know, in code, and but sometimes those those lines blur a bit. So that's one of the things that we really like about using Figma and that API. Um I just think that we haven't used it enough to like iron out all the kind of cracks at the moment. Um uh we just had a designer um add a new icon recently, and that highlighted a few issues with the workflow. But it's um it's stuff that we can fix, and um it's definitely so, so much better than than previously. We're also using GitHub's bot, uh Probot. Probot accesses the Figma API to grab like an image of the Octocon and publishes that on the PR, um so that you can kind of see a diff of of like what's changed.
[00:27:20] Michael Chan: Awesome.
[00:27:21] Diana Mounter: Probably explained that terribly, but something like that. But yeah, that's like what we all want, right? We want to make changes in design, see it on the PR in code, you know.
[00:27:30] Michael Chan: So is Probot a fairly open-ended system then? You can kind of automate whatever you want into PRs?
[00:27:37] Emily Plummer: Yeah, like commenting and all that kind of stuff. Any kind of PR workflow.
[00:27:43] Michael Chan: Interesting.
[00:27:44] Diana Mounter: Yeah. Some people have written apps that like close stale issues or automatically reply on issues with certain labels or comments in, so yeah. It's pretty cool.
[00:27:57] Michael Chan: As you've moved some of your um front-end work into React components, have people responded pretty well? As we've talked about some of the the problems that we've had with those long strings of CSS and kind of the open-ended nature of CSS, um has this been something that people are excited about or does it feel kind of cumbersome to some?
[00:28:18] Diana Mounter: People want to use it and we haven't finished building it yet. So that's like a really positive- We're like being- we probably would have been more openly talking about it if we hadn't gotten the problem of people being so excited and trying to use it before we were like, "Ah, we're actually gonna make like probably several more breaking changes to this." Yeah. Emily had to directly deal with some of that because of um we we did try out in another application and you had to make like a bunch of updates and you
[00:28:53] Emily Plummer: Yeah, yeah, that's that's when I came back and made a bunch, but they're also on, I think, like our first version. And then I think a month later, we did a sprint a couple weeks ago where we refactored everything and broke everything. But I mean, that was like pretty clear from the beginning, like this is super, super beta. Um, and then once we are at kind of our public beta stable version, I'll go back in and and migrate what I need to migrate. We've been kind of like, okay, let's like break all the things we need to break now.
[00:29:23] Diana Mounter: Yeah, so we don't we kind of don't want to get more people using it on GitHub until we're like a bit more happy with the API and that we like we're of course we're still gonna make changes and make breaking changes. Like a design system is always evolving, but I think like we haven't quite got got to the point where like we feel like things are really solid and well set up. But yeah, I think we're getting close.
[00:29:46] Emily Plummer: On the other hand too, I think like being able to use these components in a real project has helped us come up with those things that we need to fix this or we need to make these breaking changes. So it kind of it's kind of like a careful balance of how much you let out for other people to use before you're ready to call it stable.
[00:30:08] Michael Chan: Absolutely. So are there libraries that you're able to use while developing your system, kind of off-the-shelf libraries that have been helpful to you, or are you doing everything from scratch, ground up?
[00:30:20] Emily Plummer: Our first iteration of the components, we pretty much were just using like basic React, and we were using all of the classes from the Primer CSS system that we have. So we were using like a small library called Class Names to kind of string those together. And then in our last iteration, we realized we have these set of props that we want to have on each component. So stuff like margin and padding and color and background color. Those are on most- most components get those. And then we also have like typography props for, you know, font size and that kind of stuff. And then some layout props as well. So we're using a package called styled-system. You can give it a group of props on each component and those props will automatically get applied. Um and we have some like like a constants file that kind of handles like which groups map to which styled system props and that kind of stuff. And we're also using Emotion to generate that CSS, so we have a little bit of CSS-in-JS going on. I mean, we still have some of that primary CSS class name stuff. Eventually we might go all the way over to that system, but for now it's kind of a bit of a mix.
[00:31:28] Michael Chan: Nice, so styled system allows you to apply uh props to a bunch of components without having to explicitly apply them on all of them.
[00:31:37] Emily Plummer: Yeah.
[00:31:38] Michael Chan: Very cool.
[00:31:39] Emily Plummer: And then that also hooks up to like our theme file too. So you could just write as a string for color blue.4, and it'll automatically find the 4th value in our blue object in our theme object and create the CSS for that. So that's been really cool.
[00:31:56] Michael Chan: Very cool. It's nice. One thing I love about components, and it sounds like you're experiencing this, is that if the API kind of stays consistent, you can change the un- like what's under the hood, and no one really has to be the wiser as long as it still does the same thing.
[00:32:12] Emily Plummer: Yeah, yeah. And for most of those those changes, that rewrite, it didn't break a ton of things. There were a few props that were renamed, and then we also- and this was like unrelated, but We had a whole conundrum with a component called block and a component called box, and we kept-
[00:32:29] Diana Mounter: Naming things.
[00:32:31] Emily Plummer: It was a whole thing. So we we changed the names for those, and that that wasn't really related to the the other refactoring, but we did that at the same time. So yeah, we basically like stripped a ton of the underlying stuff out and replaced it, but it didn't really change the the API too much.
[00:32:49] Diana Mounter: I kind of want to add a bit more history to that. When we were like, oh, we're gonna build a Primer React component library, it, you know, I actually, uh, we did actually start off with um styled-components and styled-system, um, partly because that was something I was familiar with and could quickly make a a sort of prototype of what a Primer React design system might look like. But, you know, it wouldn't it didn't make sense for us to like rewrite the styles for every um component that we have in Prima as as a starting point. I think there is uh or was a little bit of like resistance to CSS-in-JS, or like what does that really mean or look like? So it made sense to us to be a bit more like pragmatic and we could make quicker progress by just using the existing class names. And but when we got to the we kind of got to this inflection point with uh what we call our system props or system utilities, because they're kind of like what people might have used in CSS. And we were trying to do that with our own sort of approach and using class names. And it just got to the point where we were like, we could just use styled-system.
[00:34:02] Emily Plummer: We were basically rewriting styled-system.
[00:34:06] Diana Mounter: And it was a lot of work, but it was like, we wanted we wanted that API. And and so we're like, let's just use that. So yeah, that's why we have a bit of a mix of both, but I think over time we will gradually replace like um all our sort of CSS class names with Emotion and and style system.
[00:34:23] Michael Chan: Very cool. Well, I love I I just love hearing um the migration path of certain apps, um 'cause it's almost never clean. Like people who are doing this work to change from one thing to another and evolve the patterns, um it can be a real mess. Um, so it's it's encouraging to hear that that yours is a mess as well. But um also encouraging um to know that React and the component model is giving you a way to present a new API um and kind of hide those details away and allow you to have those discussions when they're critically important, not just in theory important. What are you excited about? Who's doing great work that you want to mention or throw props to?
[00:35:09] Emily Plummer: Last week, I redid our docs site again, and I'm using- I set it up with Next.js and Now.js, and I was like, going into it, I was like, oh, I'm gonna have to learn these new technologies. It might take me a while, but everyone's talking about this stuff. It must be kind of cool. And I figured it out in like a few hours. It was so easy to use. It made our documentation workflow so much simpler than what we had before, and I really liked it. We're also using um MDX docs for our docs now, so all of our docs are in Markdown. I feel like GitHubbers are really into Markdown, I've noticed, since I've joined. So that will just make everything easier. Um, yeah.
[00:35:50] Michael Chan: MDX is amazing.
[00:35:51] Emily Plummer: Yeah, it's pretty cool.
[00:35:53] Michael Chan: I set it up for the first time this week, and I was like, this lives up to the hype.
[00:35:59] Emily Plummer: Yeah, I mean, it replaced so many other tools that we were kind of mixing together to work for our docs. We're basically using like 3 technologies now. It's a lot easier to work with.
[00:36:11] Diana Mounter: Are we using MDX Docs or just MDX?
[00:36:14] Emily Plummer: We're using MDX Docs. It's kind of like a framework around MDX that allows you to have a layout component that puts a sidebar and a header and a a like center area and kind of handles all of that for you really easily. There's a like a code sandbox syntax that you can use. You basically just do like backticks and .jsx and it just puts a code sandbox in your page, which is really, really awesome. I'm excited to keep building upon that.
[00:36:43] Diana Mounter: Technologies I'm excited about or stuff in the React space, even though this is deeper into the sort of engineering side than I am frequently sort of getting into, I'm really interested to see what happens with React Suspense. I saw Andy Clark speak at the Zeit Conference and that really excited me 'cause even just from the designer side, I think that yeah, we could do a lot better with our loading state than just, yeah, here's a spinner and now wait for all of the content to load. And I think this, I think it helps solve some really great design problems.
[00:37:21] Michael Chan: Yeah.
[00:37:21] Diana Mounter: So I think it's really interesting when stuff comes from the sort of more the engineering development side of things that actually really influences and and kind of teaches the design world as well to um some new things. So that's really exciting. And I'm just really excited about what we're building and using, yeah, Next, Now, MDX docs, and then things like styled-system and Emotion. It's just like, it feels awesome. I feel like, yeah, finally, fine, I feel like I'm finally in the future. I mean, even just like, are you, have you heard of MDX Deck? So I used that for my slides for Zeit, and I was just like, this is amazing. I was like making my illustrations in Figma, which is a web tool. I'm writing my slides in Markdown and using React components. And I was like, this is all the technologies I want to use. I like, I don't have to use Keynote anymore.
[00:38:18] Michael Chan: My typical workflow is, you know, maybe you make some examples and then you write kind of some thoughts in Markdown. And then kind of try to figure out how to jam it all together. And this is already jammed together. Like everything that you were gonna do for that workflow is all in one place now. It's brilliant.
[00:38:33] Emily Plummer: I feel like there could be a whole podcast just on like horror stories of what engineers have done when they needed to make slide decks. Like I definitely just built an entire website from scratch and did all the JavaScript on my own because like the one framework that I found just wasn't quite exactly what I wanted.
[00:38:53] Diana Mounter: Yeah.
[00:38:53] Michael Chan: Totally agree. Our next time together, we'll discuss that.
[00:38:56] Diana Mounter: All I can think about now is like how awesome Markdown is and being able to just do everything in some format or like MDX more importantly. It's just, unsurprisingly, at GitHub, even if you're not an engineer or a designer or a touch code, you are still writing Markdown. So it's like the connection of Markdown. That's all I can think about. So yeah. Um but I guess a good ending thing might be watch out for our public beta of um our Primer React components. We will be making that open source and we'd love people to check it out and give us feedback and tell us what what they think.
[00:39:36] Michael Chan: Awesome. And that'll be at github.com/Primer/PrimerReact presumably?
[00:39:41] Diana Mounter: No. We'll we'll tweet it from the GitHub Primer Twitter account. So.
[00:39:49] Michael Chan: Perfect. Okay, awesome. So follow GitHub Primer on Twitter if you wanna wanna see all this.
[00:39:56] Diana Mounter: Yeah.
[00:39:57] Michael Chan: Cool, well, thank you both so much for your time. I learned a lot and it was really just fun for me to talk with you and share some of those frontend Rails React horror stories. Um, appreciate it. Thanks.
[00:40:09] Emily Plummer: Of course, thanks for having us.
[00:40:11] Diana Mounter: Yeah, thanks for having us on the show.
[00:40:19] Michael Chan: This has been episode 25 of React Podcast. For links to the people, projects, and presentations mentioned in this show, visit reactpodcast.com/25. A special thanks this week to new Patreon subscribers Daniel O'Connor and Herminio Garcia. If you'd also like to support the show, visit reactpodcast.com/partner. And don't forget to join us next week for an episode with either Brad Frost or Laurie Voss. Either way, it is one not to miss. They're both incredible. Thank you so much for listening. We'll be in your ears next week.
chantastic.fm