-
Notifications
You must be signed in to change notification settings - Fork 3.4k
FWE clean up #12900
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
base: main
Are you sure you want to change the base?
FWE clean up #12900
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
Visit the preview URL for this PR (updated for commit e2383b8): https://flutter-docs-prod--pr12900-ew-fwe-cleanup-4r555rqf.web.app |
sfshaza2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is draft but lgtm
| bool _isVideoEmbed(Node node) { | ||
| if (node case ElementNode(tag: final tag)) { | ||
| final lowerTag = tag.toLowerCase(); | ||
| return lowerTag == 'youtubeembed' || lowerTag == 'lite-youtube'; | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| /// Finds a video embed child in a list of nodes, returns it if it's the only | ||
| /// meaningful content (ignoring whitespace text nodes) | ||
| Node? _findVideoChild(List<Node>? children) { | ||
| if (children == null) return null; | ||
|
|
||
| Node? videoChild; | ||
| for (final child in children) { | ||
| if (_isVideoEmbed(child)) { | ||
| videoChild = child; | ||
| } else if (child case TextNode(:final text)) { | ||
| // Ignore whitespace-only text nodes | ||
| if (text.trim().isNotEmpty) return null; | ||
| } else { | ||
| // Non-video, non-whitespace content found | ||
| return null; | ||
| } | ||
| } | ||
| return videoChild; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was written by gemini. It feels wrong to me, but I'm not sure what the proper Jaspr way to accomplish this is.
| if (outroContent != null) | ||
| section(classes: 'tutorial-outro', [ | ||
| builder.build(outroContent), | ||
| ]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely unneeded (and currently not being used at all). I will remove it before merge
| @@ -0,0 +1,132 @@ | |||
| // Copyright 2025 The Flutter Authors. All rights reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure this isn't idiomatic. Maybe this shouldn't be here at all. It felt better than putting a bunch of in every markdown file. Is there a better way?
| sitemap: false | ||
| --- | ||
|
|
||
| <TutorialLesson> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to style each tutorial page the same without putting a bunch of tags in the file?
|
|
||
| Learn how to create layouts that adapt to different screen widths. | ||
|
|
||
| <YouTubeEmbed id="jckqXR5CrPI" title="Decoding Flutter: Unbounded height and width"></YouTubeEmbed> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong video. Its just so we can see what it'll look like.
|
@parlough, @schultek -- I'd greatly appreciate if you can look at the code I added to tell me why its bad :) I left comments with what I think is wrong with it. Otherwise, please look at the staged site and tell me what you think about how it looks! Also, there are still some content edits I need to make before this lands. |
Description of what this PR is changing or adding, and why:
This PR contains fixes to the remaining issues related to FWE lessons.
Issues fixed by this PR (if any):
PRs or commits this PR depends on (if any):
Presubmit checklist
of 80 characters or fewer.