Skip to content

Decoupling Material's ProgressIndicator#11526

Closed
justinmc wants to merge 1077 commits into
mainfrom
decoupling-progress-indicator
Closed

Decoupling Material's ProgressIndicator#11526
justinmc wants to merge 1077 commits into
mainfrom
decoupling-progress-indicator

Conversation

@justinmc

@justinmc justinmc commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

I'm attempting to move a minimal widget from Material to material_ui in order verify that everything is working. I've chosen ProgressIndicator because it makes only a few other imports from the Material library, but it still has examples/ that we can copy over as well.

Not viable without copying over nearly everything?

Wow there are a lot of transitive dependencies. Two big offenders:

I'm going to start with another PR copying just a leaf file (not a full widget).

TODO

  • Copy over referenced files.
  • Export from material_ui.dart.
  • Try installing and using the package locally.
  • Any other files needed for the examples or anything else you're forgetting?

goderbauer and others added 30 commits December 20, 2022 16:03
* Updated to tokens v0.150.

* Updated with a reverted list_tile.dart.
* Updated to tokens v0.150.

* Updated with a reverted list_tile.dart.
* Remove ThemeData.buttonColor references

* Fix test

* Remove more buttonColors

* Macro the definition of color scheme

* remove doc reference
* Remove ThemeData.buttonColor references

* Fix test

* Remove more buttonColors

* Macro the definition of color scheme

* remove doc reference
* Add Decoding Flutter videos to API docs

* Review comments

* Update widget of the week videos too
* Remove superfluous words from comments.

* Revert `win32_window.h`

Which seems to come from `gallery`
…9799)

* Add missing variants and *new* indicators to useMaterial3 docs

* add missing *new*
…(#119360)

Co-authored-by: Renzo Olivares <roliv@google.com>
* Update to v0.158 of the token database.

* Update checkbox template

* Fix DatePickerTheme test

---------

Co-authored-by: Qun Cheng <quncheng@google.com>
* Update to v0.158 of the token database.

* Update checkbox template

* Fix DatePickerTheme test

---------

Co-authored-by: Qun Cheng <quncheng@google.com>
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
Co-authored-by: Qun Cheng <quncheng@google.com>
* Add ActionButtonIconsData for overriding action icons

* Fix formatting issues

* Add missing exports in material library and add copyWith method in ActionButtonIconsData

* Move all action buttons, and icons to action_buttons.dart

* Rename actionButtonIcons to actionIconTheme

* Refactor buttons in action_buttons.dart to extend a private class for common implementation

* Refactor icons in action_buttons

* Fix docs in action_buttons_theme

* Fix #107646 always use 'Icons.arrow_back' as a back_button icon in web

* Update documentation for action buttons and add style parameter to every action button

* Fix analyzer warnings

* Add missing style argument in IconButton of _ActionButton

* Add tests for action buttons, action icon theme, drawer buttons, and back buttons

* Add example (+test) for action icon button's action icon theme in examples/api

* Fix analysis errors

* Add missing license header in action_icon_theme.0.dart

* Fix deprecation notice in theme_data.dart

* Update theme data tests for actionIconTheme

* Remove iconSize parameter from ActionButtons and update docs

* Fix failing tests

* Update button color during backbutton tests to red

* Fix analytics issues

* Fix format
Fix `ExpansionTile` double tap to collapse/expanded and expanded/collapsed states semantics announcements
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Apr 17, 2026
@google-cla

google-cla Bot commented Apr 17, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…rogress-indicator

Bringing in main progress_indicator.dart source
@justinmc

Copy link
Copy Markdown
Contributor Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

I think this bot comment is because one or more of the committers in the history that I copied in has not signed the CLA, even though I have.

@justinmc justinmc mentioned this pull request Apr 20, 2026
4 tasks
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

I think this bot comment is because one or more of the committers in the history that I copied in has not signed the CLA, even though I have.

Yes, every commit's author is checked. The standard way we do this for imports is to use the built-in cla/google override mechanism once we are ready to land a PR, with an explanation that it's an import for a repo that was already enforcing the CLA.

@justinmc

Copy link
Copy Markdown
Contributor Author

From discussion on #11543, it seems that we'll have to do everything in a single mega PR to avoid duplicate commits. So I'll close this PR.

I'll make a note on the new mega PR about overriding the CLA check, thanks for the explanation.

@justinmc justinmc closed this Apr 21, 2026
@justinmc justinmc mentioned this pull request Apr 21, 2026
5 tasks
@justinmc justinmc deleted the decoupling-progress-indicator branch April 21, 2026 17:43
@justinmc justinmc mentioned this pull request Apr 22, 2026
9 tasks
@justinmc justinmc mentioned this pull request Jun 11, 2026
11 tasks
stuartmorgan-g added a commit that referenced this pull request Jun 12, 2026
A recreate of #11669 by
recopying all flutter/flutter stuff from scratch, and cherry picking all
of my subsequent commits.

This is a single super mega PR attempting to migrate all Material and
Cupertino code from flutter/flutter to material_ui and cupertino_ui.

### How the PR was created

```
git filter-repo --path packages/flutter/lib/src/material --path packages/flutter/test/material --path examples/api/lib/material --path examples/api/test/material --path packages/flutter/lib/src/cupertino --path packages/flutter/test/cupertino --path examples/api/lib/cupertino --path examples/api/test/cupertino --path packages/flutter/lib/fix_data/fix_material --path packages/flutter/test_fixes/material --path packages/flutter/lib/fix_data/fix_cupertino.yaml --path packages/flutter/test_fixes/cupertino 
cd ../packages
git remote add source-origin ../flutter
git fetch source-origin
git merge source-origin/master --allow-unrelated-histories
```

I then cherry picked everything I could from the previous PR
(#11669), skipping merge
commits.

### What was included in the copy

 * The main source code (packages/flutter/lib/src/<material/cupertino>).
 * The widget/unit tests (packages/flutter/test/<material/cupertino>).
 * The examples (examples/api/lib/<material/cupertino>).
 * The example tests (examples/api/test/<material/cupertino>).
 * The dart fixes (packages/flutter/lib/fix_data).
 * The dart fix tests (packages/flutter/test_fixes).

### TODOs

 * [x] Do exports for Material and Cupertino.
* [x] Confirm the directory structure (current plan: lib/src/ for now,
reorganize after 1.0.0).
 * [x] Try installing and using the packages locally.
* [x] Try running the tests locally (works except for tests with cross
imports).
* [x] Try running the example tests locally (work after migrating
`package:flutter_api_samples` import).
 * [x] Verify examples work.
* [x] Verify that `git blame` appears the same in both repos on various
files. (Yes, but the SHAs are different, as expected.)
 * [x] Add auxiliary files for dart fixes and tests.
* [x] Port imports of material/cupertino in places like examples/test to
use the new packages.
 * [x] ~~Fix~~ Skip all test cross imports.
* [x] Make sure the analyzer is working in the same exact way as it does
in flutter/flutter. (#11692)

### Open questions

 * ~~Are we sure about the directory structure?~~
   * Confirmed with @dkwingsmt and @QuncCccccc.
* Anything else that should be ported along with this? If these commits
touch files that are not included in this PR, but that we later port in,
the commits will likely have different SHAs.
* I'm hoping we got it all at this point but if anyone notices anything
let me know.
 * ~~Do we like the examples setup?~~
* Worked with @stuartmorgan-g and @chunhtai to get this to match the
other packages in this repo.
* Are we cool with skipping cross imports tests and fixing them later?
This approach should not fracture commits because the commits were made
in flutter/flutter after the code was copied.
   * Tests are in the temporarily_skipped_tests folder.

### How to try using these packages

Add the local packages to your project:

```
flutter pub add cupertino_ui --path ../../packages/packages/cupertino_ui
flutter pub add material_ui --path ../../packages/packages/material_ui  
```

Then import the packages instead of the libraries in the SDK:

```diff
- import 'package:flutter/material.dart';
- import 'package:flutter/cupertino.dart';
+ import 'package:material_ui/material_ui.dart';
+ import 'package:cupertino_ui/cupertino_ui.dart';
```

### How to review this PR

 * Do read the PR description at the top, including Open Questions.
* Don't read all 600k+ lines changed! Ignore the main source code and
test files. The only thing I changed in there is to change imports from
`flutter/material.dart` to `material_ui/material_ui.dart` and the
equivalent for Cupertino.
* Do look closely at the file tree browser on the left side of the
"Files Changed" tab, though. Check the directory structure of
material_ui and cupertino_ui and make sure it looks good to you.
* Do take a look at the small config files like pubspecs,
analysis_options, etc.
* See the examples and their tests now located in
material_ui/material_ui_examples and cupertino_ui/cupertino_ui_examples.
* See the data driven fixes in lib/fix_data and their tests in
test_fixes.

And let me know if there is any code that's not in this PR that you
expected to be. It will be best to get everything we can in this one PR
rather than following up later in order to prevent fragmenting commits.

### Resources

 * Closed PR where i tried to import everything but forgot dart fixes.
    - #11568
* Closed PR where I tried and failed to import a single widget by
individually importing all of its transitive dependencies with `git
filter-repo` commands.
   * #11526
* Closed PR where I tried to import just colors.dart (no dependencies),
but found that it would create different SHAs between it and this mega
PR.
   * #11543
* Closed PR where I tried to import all of Material, before realizing
that I would create different SHAs between that PR and a future
Cupertino PR.
   * #11549
* Closed main big PR with most of the history:
#11669
* Closed PR where I tried to cherry pick everything:
#11887
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.