-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Set up shared package for components and utilities. #13259
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
Closed
Closed
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
121bc76
move common components to site_shared package
schultek aedd5a2
move tutorial and do some cleanup
schultek 0f19aaa
move styles
schultek 78d9219
adapt tutorial components for shared use
schultek 01243a8
share styles_hash_builder
schultek 068b597
remove unneeded deps
schultek eda96e2
move shared components in subfolder
schultek 99ab0d2
create shared dash layout
schultek 752434c
move extensions to shared package
schultek f7ebc71
fix formatting
schultek 2b74570
add reset styles and banner component to shared package
schultek ed4f1e6
Merge branch 'main' into feat/site_shared
schultek bb0d4ed
apply review
schultek c4007b2
add readme
schultek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| include: package:analysis_defaults/analysis.yaml | ||
|
|
||
| formatter: | ||
| trailing_commas: preserve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| builders: | ||
| stylesHashBuilder: | ||
| import: "package:site_shared/src/builders/styles_hash_builder.dart" | ||
| builder_factories: ["stylesHashBuilder"] | ||
| build_extensions: | ||
| "web/assets/css/main.css": | ||
| - "lib/src/style_hash.dart" | ||
| auto_apply: dependents | ||
| build_to: source | ||
| required_inputs: | ||
| - ".css" | ||
| defaults: | ||
| dev_options: | ||
| fixed_hash: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,4 +68,4 @@ | |
| display: block; | ||
| } | ||
| } | ||
| } | ||
| } | ||
26 changes: 26 additions & 0 deletions
26
packages/site_shared/lib/_sass/components/_menu-toggle.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Toggle between menu and close buttons if sidenav is open or not. | ||
| body:not(.sidenav-closed) #menu-toggle { | ||
| @media (min-width: 1024px) { | ||
| display: none; | ||
| } | ||
| } | ||
|
|
||
| #menu-toggle span.material-symbols { | ||
| &:first-child { | ||
| display: inline; | ||
| } | ||
|
|
||
| &:last-child { | ||
| display: none; | ||
| } | ||
| } | ||
|
|
||
| body.open_menu #menu-toggle span.material-symbols { | ||
| &:first-child { | ||
| display: none; | ||
| } | ||
|
|
||
| &:last-child { | ||
| display: inline; | ||
| } | ||
| } |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,4 +93,4 @@ ul.nav-tabs { | |
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright 2025 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'package:meta/meta.dart'; | ||
|
|
||
| import 'src/analytics/analytics_server.dart' | ||
| if (dart.library.js_interop) 'src/analytics/analytics_web.dart'; | ||
|
|
||
| /// Used to report analytic events. | ||
| final analytics = AnalyticsImplementation(); | ||
|
|
||
| /// Contains methods for reporting analytics events. | ||
| abstract class Analytics { | ||
| @protected | ||
| void sendEvent(String eventName, Map<String, Object?> parameters); | ||
|
|
||
| void sendFeedback(bool helpful) { | ||
| sendEvent('feedback', {'feedback_type': helpful ? 'up' : 'down'}); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.