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

Fix the code sample from dart web get started guide #5688

Merged
merged 4 commits into from
Apr 9, 2024

Conversation

jsiedentop
Copy link
Contributor

I have discovered that the dart web get started code example does not match the new dart:web interface. Therefore I have updated the documentation.

Fixes: There is no specific issue, but it certainly helps #5674 and #5525


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
  • This PR doesn't contain automatically generated corrections or text (Grammarly, LLMs, and similar).
  • This PR follows the Google Developer Documentation Style Guidelines — for example, it doesn't use i.e. or e.g., and it avoids I and we (first person).
  • This PR uses semantic line breaks of 80 characters or fewer.
Contribution guidelines:
  • See our contributor guide for general expectations for PRs.
  • Larger or significant changes should be discussed in an issue before creating a PR.
  • Code changes should generally follow the Dart style guide and use dart format.
  • Updates to code excerpts indicated by <?code-excerpt need to be updated in their source .dart file as well.

@MaryaBelanger MaryaBelanger self-assigned this Apr 5, 2024
@MaryaBelanger
Copy link
Contributor

Hi @jsiedentop! This is so helpful, thank you.
I'll take a look at the test failures and let you know how we can fix it, stay tuned!

Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for thinking about this and for the PR!

The build is failing as the [! highlight mechanism currently doesn't support multi-line spans. The goal is to transition away from this mechanism in the future, so support likely won't be added. To work around this limitation, you can add the brackets to each line :)

src/content/web/get-started.md Outdated Show resolved Hide resolved
src/content/web/get-started.md Outdated Show resolved Hide resolved
jsiedentop and others added 2 commits April 9, 2024 08:46
Co-authored-by: Parker Lougheed <parlough@gmail.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
@jsiedentop
Copy link
Contributor Author

I haven't had a chance to set up the development environment locally to see why the build is failing. Thanks for taking a quick look.

It's a bit offtopic but I have some feedback on the documentation: If someone wants to get started with Vanilla Dart on the web, the DevEx is currently suboptimal. My impression of the last few days, was that it takes good will and a lot of extra effort to get into web development with Dart. However, I've noticed that there is a lot going on at the moment (new web/js_interop libraries, wasm, extension types, more documentation).

Would you be interested in me writing down my experiences in more detail in a suitable place? But if the topic doesn't fit into the agenda currently, I wouldn't create an issue. Unlike good wine, issues don't really get better with time 😉

@parlough
Copy link
Member

parlough commented Apr 9, 2024

It's a bit offtopic but I have some feedback on the documentation: If someone wants to get started with Vanilla Dart on the web, the DevEx is currently suboptimal. [...] However, I've noticed that there is a lot going on at the moment.

You're right that the experience is evolving a lot recently and there's still a lot of work in progress, particularly for documentation. Beyond that, as you noticed, there are some developer experience tradeoffs with the new interop mechanisms. It's my understanding that some of these are unavoidable due to other goals (such as Wasm compatibility and performance), but it seems the team working on it is very interested in improving the developer experience where they can. So send feedback their way :)

Would you be interested in me writing down my experiences in more detail in a suitable place?

Feedback is always appreciated, and is even more impactful while Dart's web story is continuing to evolve :D

If you don't have anything super specific or just want one place to file your thoughts, https://github.com/dart-lang/sdk/issues is likely a good place to at least have your feedback be heard.

However, if you have feedback related to specific portions, it can help to separate that discussion into more focused issues. The following table has some related topics and where feedback for them might be the most helpful.

Topic Relevant repository
JS interop dart-lang/sdk
package:web dart-lang/web
Extension types from a language or syntax perspective dart-lang/language
Extension types in relation to JS interop dart-lang/sdk
The webdev tool dart-lang/webdev
Tooling/IDE DevEx for JS/web development dart-lang/sdk
Web/JS interop documentation dart-lang/site-www

@parlough
Copy link
Member

parlough commented Apr 9, 2024

/gcbrun

Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this and the PR! Looks good to me :)

I pushed some more formatting fixes to fix the build and some other nearby cleanup.

@dart-github-bot
Copy link
Collaborator

Visit the preview URL for this PR (updated for commit 2c2d86d):

https://dart-dev--pr5688-update-dart-web-example-3utizk7u.web.app

@parlough parlough merged commit 316efff into dart-lang:main Apr 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants