RFC: Improve React Developer Experience #1113
Replies: 4 comments 9 replies
-
Agreed. I think the default getting started page should have links to each frameworks docs as part of the first thing someone sees when they come to the site.
Agreed. We should put it under React as well as Start Here - same goes for other frameworks.
I don't think this is stated anywhere, which is a bad oversight. |
Beta Was this translation helpful? Give feedback.
-
I'm sorry upfront for being so long-winded. Just trying to offer quality feedback.
The concepts needed to understand working with Web Components should be carried through all frameworks that you support. However you want to organize it (link to a central location, copy the section into each docsite, etc), it should be one of the first links after "Getting Started" perhaps a "Core Concepts" section that goes over some of the nuances. Also the design tokens you expose would be important to call out in that section. One of the things that tripped me up starting out, was how to use those design tokens the CSS file we're told to include contains. So using this as an example, maybe the "Core Concepts" section outlines something to the effect of:
I'm sure you've already thought of this, or done this, but this is something that's just not clear enough for me to know with certainty. I would typically just dig through the source code, but a lot is left up to interpretation when you're doing that. I've also found myself getting confused on whether the "CSS Shadow Parts" are actually "CSS Custom Properties" contained within the Shadow DOM. I would expect them to have two dashes next to them
Yep, Agreed. My experience is when I look at the source and see all this it is intimidating, and also looks like you are offering a web-component library wrapped with React. I noted that the When I first saw that massive
On a separate occasion, I was expecting to be able to find the props for a component fairly easily, however, I found I had to mentally convert the web-component props into camelCase, and if I wanted a more in-depth look I had to open my editor, find something like export namespace Components {
interface RuxBreadcrumbItem {
/**
* The href property of the breadcrumb item link
*/
"href"?: string;
}
} Then there are events. I remember a foot-gun about how events are named for React, while doing that mental conversion that didn't work, and since
I didn't know that was there, if that helps you understand how well-hidden.
Agree. When I'm implementing a component, and click "Docs > [example] > Show Code" I'm expecting to see an example with the library I'm using. I like the screenshots you shared. Also examples of testing with React Testing library, and jest would be helpful. I know it's hard when there are so many options for testing, but one of my issues was understanding how to pierce the Shadow DOM and use React Testing Library events to type. I'm pretty sure @micahjones13 has done some work in this repository that had it working. I'm just looking for more context, "Now we need to include xyz here, because web components use abc and Jest doesn't know about that." That way when something breaks, you can understand the layers of the program better. So to sum up my thoughts, for now, it would be:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@mrclean-oa @jarod-oa we're updating our Storybook site to better convey web component usage and framework specific documentation as well. There's a deploy preview up, and we'd love your thoughts on it if you have the time! |
Beta Was this translation helpful? Give feedback.
-
The developer experience for our React users is less than ideal for a number of reasons
I really like how Storybook has this context switcher globally for the site.
Beta Was this translation helpful? Give feedback.
All reactions