Live data from Hacker News

Base Web, Uber’s New Design System for Building Websites in React

eng.uber.com

51–60 of 156 posts

Re: Base Web, Uber’s New Design System for Building Websites in React

#52
post #19

Earlier quoted context omitted.

You're ignoring the fact that many already went through that phase and ultimately decided that complexity is the only enemy worth fighting in software. It always pays off to take a closer look at the things you can't think or say, to ask why.

> You're ignoring the fact that many already went through that phase and ultimately decided that complexity is the only enemy worth fighting in software. No, this doesn't match my experience. The people who resist types are usually web designer types who haven't actually worked with type systems at all so they view it as ivory tower nonsense - complexity for complexity's sake. There is the occasional person who worke…

Personally, I've worked with both Flow and Typescript, plus Java, C# and Actionscript professionally, and C, C++, D, and Rust for fun (and also Ocaml, SML and Haskell to a lesser degree).

And I still choose to write plain JS sometimes for various reasons. I have many co-workers with several years of work experience who share caution against static typing kool-aid.

Anyone that pits types vs no types as if it's some sort of competition or some elitism thing is probably forgetting to consider that there are in fact perfectly valid scenarios where one is more suitable than the other (and vice versa)

Re: Base Web, Uber’s New Design System for Building Websites in React

#53
post #23

Earlier quoted context omitted.

My only issue is TS usage with extremely large/complex components/containers. For example, files around 500 lines of code, I've temporarily removed TS, done a few other optimizations (ternaries for obvious If/Else statements, etc) to reduce to ~200-230 lines total. The file is instantly easier to reason about and modify. I wish there was a plugin that just did this automatically so you could toggle it back on when do…

It's best to leverage type inference if possible. I can point to entire TypeScript files that could be copied and pasted into a JavaScript file and work with no changes. At some point, yes, you have to use annotations to get the most of it. But, ultimately, I'd much rather trade the additional characters now for the alternative: insanity producing runtime errors in production later.

The big problem with type inference, at least at API boundaries, is that its hard to tell who's "fault" an error might be.

FuncA() returns T1, inferred. FuncB() expects it to return T2. Is FuncB expecting the wrong thing? Or is FuncA returning something incorrect?

Always annotating the return types fixes this. That's one area that I think inference is always risky.

Re: Base Web, Uber’s New Design System for Building Websites in React

#54
post #48

This article makes a lot of noise about Uber's commitment to accessibility. So I am led to believe that this new React gizmo is fully accessible. Yet Uber can't be bothered to make efforts to get basic accessibility right on the page that tells us this. The main content is not in a element, this element being the landmark that tells people using assistive technologies where the main content is. Then the navigation li…

Those are issues with the CMS being used to host the blog. The blog has been around for a long time and isn't using BaseWeb. What you're suggesting is that when someone releases a library with a commitment to accessibility, they are also responsible to reach out to some completely unrelated comms-focused team, take over their CMS workflow, rewrite it entirely with the new framework, and only then make a blog post abo…

So, what you're saying is, Uber is committed to accessibility when its easy for them and there's big PR points to score. That's probably correct.

Re: Base Web, Uber’s New Design System for Building Websites in React

#55

Finding a good React UX library is tough. None is ideal. Too heavy, too small, too slow, too dirty. Settled on ant.design for a while, not perfect but good enough.

Ant.design is actually quite nice. I picked them for my open source project mainly because it's written in TypeScript.

Re: Base Web, Uber’s New Design System for Building Websites in React

#56
The overrides system is weird, to say the least. Any consumer can change styles and erbitrary HTML attributes deep inside a component's DOM tree

This breaks encapsulation. As an app developer how do I know my change will be future proof? As a component developer how can I refactor a component or change its behaviour without breaking my consumers?

It feels like stuffing the worst parts of jQuery and old-school CSS back into React.

Re: Base Web, Uber’s New Design System for Building Websites in React

#57

Earlier quoted context omitted.

It's important, because you don't need to care about props vs state, instead, just consume the context deep in your component tree. One use case, is, suppose you have two independent contexts at two branches, now, if you want to share those data to 3rd branch, you just create new context with value from the first two contexts.

This is starting to sound like the scope from Angular 1.

Contexts in React are like raw pointers in C++. There are reasons to use them, but every time you do, it should raise eyebrows, because they are finicky, complicated to reason about, and thus full of pitfalls.

Re: Base Web, Uber’s New Design System for Building Websites in React

#58

I guess we can add Uber to this list of corporate frameworks... https://news.ycombinator.com/item?id=18235887 https://element.eleme.io/ https://ant.design/ https://quasar-framework.org/ https://at-ui.github.io/at-ui/ https://developer.microsoft.com/en-us/fabric https://vmware.github.io/clarity/ http://appnexus.github.io/lucid/ https://ng-lightning.github.io/ng-lightning/ https://blueprintjs.com/ http://www.jetbrains.…

I've been evaluating most of these frameworks, and as far as I know Base UI is the smallest and lightest out of all these: https://bundlephobia.com/result?p=baseui@6.15.1

Re: Base Web, Uber’s New Design System for Building Websites in React

#59
post #6

Can you use this outside of React? I'm interested in the styles, but I'm not using React.

This is why Web Component interest is growing, especially w/ enterprises and large teams. The killer app for WC's is building Design Systems that don't force specific frontend framework decisions.

Do you have a source? I’d like to explore WC, but from what I have gathered WC evangelist are dying out to React ecosystem.

Re: Base Web, Uber’s New Design System for Building Websites in React

#60
Before even looking at the details ... why would I use this? Uber is not a company that is known for great websites. They get (I'm guessing) 99%+ of their usage through native apps. So why would I believe they're particularly good at building for the web?
Post reply on HN