Skip to content

Conversation

@schultek
Copy link
Contributor

Updates jaspr to 0.22.0 and migrates everything.

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • 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 pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@schultek schultek requested review from a team and sfshaza2 as code owners December 10, 2025 14:18
@schultek schultek requested a review from parlough December 10, 2025 14:18
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @schultek, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant upgrade of the Jaspr web framework to version 0.22.0. The core changes involve migrating the existing codebase to align with the new Jaspr API, which includes separating client and server configurations and updating component rendering syntax. This ensures the application leverages the latest capabilities of Jaspr and maintains a modern, efficient architecture.

Highlights

  • Jaspr Upgrade: The Jaspr framework has been upgraded to version 0.22.0, along with its associated builder and content packages, ensuring compatibility with the latest features and improvements.
  • Client/Server Separation: Jaspr configuration has been refactored to separate client-side and server-side options into distinct files (main.client.options.dart and main.server.options.dart), improving modularity and clarity.
  • DOM API Migration: Numerous components across the site have been updated to use the new Jaspr DOM API syntax, specifically changing how text nodes and fragments are created (e.g., text('...') to .text('...'), Component.fragment(...) to .fragment(...)).
  • Global Scripts Refactoring: The client-side global script initialization logic has been streamlined, moving from a StatefulComponent to a direct function call within main.client.dart.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@flutter-website-bot
Copy link
Collaborator

Visit the preview URL for this PR (updated for commit 1d0232b):

https://flutter-docs-prod--pr12806-chore-upgrade-jaspr-6k2nfs99.web.app

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades Jaspr to version 0.22.0 and migrates the codebase to align with the new API. The changes are extensive and touch many files, primarily updating component creation syntax (e.g., text() to .text(), raw() to RawText()) and splitting the application into server and client entry points, which is a significant improvement for code organization.

My main concern is the re-implementation of the RawNode component in site/lib/src/components/util/retake_element_web.dart. This creates a dependency on Jaspr's internal implementation, which could be a maintenance risk. I've left a specific comment with suggestions on how to address this.

Other than that, the migration appears to be thorough and correct. The code is cleaner in many places due to the adoption of new syntax and patterns from the latest Jaspr release.

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.

Exciting! Thanks for the great release and this update!

Once you have a chance, can you complete it for dart.dev as well?

@parlough parlough merged commit dea162d into main Dec 11, 2025
9 checks passed
@parlough parlough deleted the chore/upgrade-jaspr branch December 11, 2025 10:02
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.

3 participants