Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So microsoft/fast 2.0 is out or what? #7034

Open
jurijsk opened this issue Nov 12, 2024 · 3 comments
Open

So microsoft/fast 2.0 is out or what? #7034

jurijsk opened this issue Nov 12, 2024 · 3 comments
Labels
status:triage New Issue - needs triage

Comments

@jurijsk
Copy link

jurijsk commented Nov 12, 2024

I want to share a bit of developer experience with all of you (As ex-dev, trying to get back to coding).

I've decided to try to use the library, so I go to https://fast.design/ and the badge to the top says 2.0 is out. Drop-down with version number says "2.x". Great, very promising.

Span off new vanilla vite project with typescript, ran npm install @microsoft/fast-element and copied the code as Quick Start advices.

Got 3 errors right away:

Image

I had to google profusely to just make it compile. Added experimentalDecorators: true, switched module, target to ES2020 and 'strict' to false. Plus change HelloWorld.define({..,}) to HelloWorld.define(HelloWorld, {...}). Just. To. Make. It. Compile.

And it still was not working after that. The name attribute was not taking the value. You have to find this issue from 2021 to know that you have to switch useDefineForClassFields off, otherwise the whole enterprise is kind of useless.

And only after that, I had a bright idea to check with the version of fast I have installed. Of course, it was 1.14.0, why would I think it would be anything close to 2.0.

Anyway, so what is up with v2.0 and is that experience I've just got is what I should expect from microsoft/fast as a base for UI I want to build?

@jurijsk jurijsk added the status:triage New Issue - needs triage label Nov 12, 2024
@KingOfTac
Copy link
Collaborator

There was a recent publish of the 1.x version to fix a bug, which with how npm install works the most recently published version of the package is what gets installed by default. You can get the latest 2.x version by specifying the version number when installing i.e. npm install @microsoft/fast-element@2.0.0.

@chrisdholt we should probably look into this some more and try to find a way to smooth out this experience. I have noticed this also affects what version is returned when using the CDN link as well.

@chrisdholt
Copy link
Member

@chrisdholt we should probably look into this some more and try to find a way to smooth out this experience. I have noticed this also affects what version is returned when using the CDN link as well.

This came up with @janechu yesterday, it's definately top of mind.

@jurijsk
Copy link
Author

jurijsk commented Nov 15, 2024

Thank you for looking into this. Please note that the following tsconfig.ts settings are also assumed, and it takes a minute to figure out:

{
	"compilerOptions": {
		//...
		"useDefineForClassFields": false,
		"strictPropertyInitialization": false,
		"experimentalDecorators": true
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:triage New Issue - needs triage
Projects
None yet
Development

No branches or pull requests

3 participants