Earlier quoted context omitted.
The template strings are sort of typed, using tagged template literals. These even come with editor support using extensions previously built for lit-html and the like.
You get compile-time checks for embedded JavaScript expressions. But you don't get checks for html tags and attributes. With JSX the TypeScript compiler checks JavaScript expressions as well as mismatched tags and attributes, all without any add-ons.
Microsoft Fast Design
101–110 of 216 posts
Re: Microsoft Fast Design
#102Earlier quoted context omitted.
I honestly don't understand what this definition of "frameworks" means in this exact context and I've been building websites since 1994, survived the XHTML collapse, etc etc... What's the main advantage here? That we have a standardised way of writing HTML markup so that CSS / JS knows how to operate on it? I'm almost certainly coming across as "old man yells at cloud" (lol just realised a pun there) but what would y…
Frameworks mean React, Vue, Angular, etc. Usually, if you make a TextInput component in React, you can't use it in Vue and vice-versa. If you create a web component, then you can use it in any of these frameworks (or with no framework at all), like a native html tag.
It's like a while back I trained myself up on GWT because in my mind it was the future of reusability.
Sure it was Java based and everyone hates Java these days I guess, or at least hating Java is a meme. But the entire concept and value was that you write everything as reusable components.
Then all you really needed to do was choose your compile targets and the compiler would do the rest, generating cross-browser / device versions of your application code as needed.
I can see now what the OP means and honestly from my point of view the post-XHTML / DTD / XSD diaspora is circling back around to trying to find standard ways to separate data from presentation.
I think I get it now, thank you.
Re: Microsoft Fast Design
#103Re: Microsoft Fast Design
#104I find it hilarious that they put a dark mode toggle in the corner (why would I want this on a per-website basis?) that doesn't even change the rendering of their sample components (the only reason I can think why that would be useful).
They detect your OS preference and display their light/dark style automatically based on that [1]. The toggle is just there if you wanna switch it manually. My Mac is in dark mode but I usually prefer reading docs in light mode, so that toggle is handy.
Agree that it should update the background of the examples tho. Probably just a bug or something they didn't think about.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...
Re: Microsoft Fast Design
#105I find it hilarious that they put a dark mode toggle in the corner (why would I want this on a per-website basis?) that doesn't even change the rendering of their sample components (the only reason I can think why that would be useful).
> I find it hilarious that they put a dark mode toggle in the corner (why would I want this on a per-website basis?) They detect your OS preference and display their light/dark style automatically based on that [1]. The toggle is just there if you wanna switch it manually. My Mac is in dark mode but I usually prefer reading docs in light mode, so that toggle is handy. Agree that it should update the background of the…
That it doesn't change the example on the web page seems like a giant oversight, or a rendering error on Safari.
Re: Microsoft Fast Design
#106There are also weird extra spaces and alignment issues on things like basic links or the list numbers in the tab demo.
Bit of a shame
This is on Firefox on Android.
Re: Microsoft Fast Design
#107"Have you ever needed a reusable set of UI components that you could drop into your app and have an amazing experience? That's FAST."
...and think 'That's FAST'. They'd immediately think "That's Fabric (or Fluent)".
Re: Microsoft Fast Design
#108Earlier quoted context omitted.
I appreciate the support I guess but at the same time I don't understand what you mean by there are an unspecified number of people on my side and that silence is golden - either that means I should be quiet and join the throngs of the self-superior invisible some-jority which I think is condescending to the fine folk here, or it means I personally should be silent and not express my honest confusion, frustration and…
Theory: web components provide a standardised component model for the web so that you don't need to rely on frameworks and a bunch of JavaScript to create interchangeable interoperable components that are no different from built-in browser components. Oh, and you can extend existing built-in components with your own behaviours. Reality: - WebComponents is a collection of 4 web standards, one of them is already deprec…
1. Define elements in script by extending htmlelement
2. Follow the allowed structure in the DOM so that the custom elements don't break / conflict with anything
3. Use CSS to make the custom element look nice.
Then, basically what we have is:
1. A class-based way to attach event listeners in a standard interface (which is nice)
2. what we always had to do anyway (unless framework forces using JS to inject HTML at runtime)
3. what we always had to do anyway
4. Can't use custom events anymore... Encapsulation fTW.
But now that brings us to a situation where, essentially, it comes down to which htmlelement classes take precedence in our dependency hierarchy. Some libraries are probably compatible but you can't guarantee it because there's no explicit package dependencies between different implementations, so if you choose two different component libraries you may end up with unexpected behaviours and bugs.
So if I were to build a component library that is "compatible" with all major component libraries, essentially what I'd have to build is a shit-ton of "mappings" and exceptions that define an order of precedence of which component variants my library should interact with or cede to? I don't really like the idea of "just magically working with incompatible libraries" right?
Does that seem about right?
I think I learned something new and fundamental today, and the overall approach makes sense if you pick a single library to build your application but I can't see it having any realistic value if you're to try and jimmy it into existing products, in fact I can see that being an extremely expensive exercise and potentially adding a load of overheads to maintain and configure.
Also I can see now why no one really answered the question about ARIA tab orders and accessibility, it's not the job of these libraries.
I'm not a very smart person, thanks again to you and everyone else jumping on my thread to take the time to explain :)
Re: Microsoft Fast Design
#109Is this a pre-pre alpha preview of the preview? Because it feels like
Re: Microsoft Fast Design
#110Earlier quoted context omitted.
Theory: web components provide a standardised component model for the web so that you don't need to rely on frameworks and a bunch of JavaScript to create interchangeable interoperable components that are no different from built-in browser components. Oh, and you can extend existing built-in components with your own behaviours. Reality: - WebComponents is a collection of 4 web standards, one of them is already deprec…
Okay I think I get it: 1. Define elements in script by extending htmlelement 2. Follow the allowed structure in the DOM so that the custom elements don't break / conflict with anything 3. Use CSS to make the custom element look nice. Then, basically what we have is: 1. A class-based way to attach event listeners in a standard interface (which is nice) 2. what we always had to do anyway (unless framework forces using…
This is definitely true for "dumb" components aka leaf components such as labels, footers, links, basic inputs. However, since you need more (for example, data-binding and reactivity), this may become a question of interoperability, and I don't really know how that plays out in the real world.
> I'm not a very smart person, thanks again to you and everyone else jumping on my thread to take the time to explain :
No stupid questions, right? :) And the whole web components discussion is extremely muddied. Mostly because people expect you to already know what they are about, and talk about and use libraries on top of them: lit-html, stencil etc.