Set up shared package for components and utilities.#13259
Set up shared package for components and utilities.#13259
Conversation
|
Visit the preview URL for this PR (updated for commit c4007b2): https://flutter-docs-prod--pr13259-feat-site-shared-oeuo1lvo.web.app |
69aeaec to
be6ce85
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new site_shared package to centralize common components, utilities, and SCSS previously duplicated across the site and other packages. Key changes include extensive refactoring of SCSS imports, relocation of numerous Dart files to the new site_shared package with corresponding import path updates, and significant improvements to component handling and hydration logic, particularly for ComponentRef. Specific component updates include adding trailingIcon to Button, new parameters for CookieNotice and CopyButton, and refactoring quiz parsing in tutorial/quiz.dart. Review feedback points out two critical issues: inconsistent markdown parsing and weak validation in tutorial/quiz.dart for quizzes defined in tags, and a potential crash in util.dart's getOS() function due to web.window access during server-side rendering.
|
Thanks for tackling this Kilian! I'm excited. Hold off on landing this. I'd like to take a look first. I should have time early next week. |
be6ce85 to
78d9219
Compare
parlough
left a comment
There was a problem hiding this comment.
Exciting!! I haven't tested the stage site yet, but generally the direction looks great to me.
I had a few small comments and main has some updates to integrate.
Thanks so much for tackling this :D
There was a problem hiding this comment.
Can we move the individual syntaxes to the src directory?
There was a problem hiding this comment.
Can you add a basic README to this directory as well stating something about how it's intended for APIs meant to be used by dart.dev and docs.flutter.dev.
There was a problem hiding this comment.
generated something
Adds a new
site_sharedpackage that contains components and other utilities for sharing with dart-lang/site-www.