Skip to content
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

[rfw] Add some more documentation for RFW #4349

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

Hixie
Copy link
Contributor

@Hixie Hixie commented Jun 30, 2023

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@github-actions github-actions bot added the p: rfw Remote Flutter Widgets label Jun 30, 2023
@Hixie
Copy link
Contributor Author

Hixie commented Jun 30, 2023

test-exempt: documentation-only change

@stuartmorgan
Copy link
Contributor

Given that you are adding a bunch more code here, this would be a good time to undo rfw's temporary grandfathered-in exception to the code-excerpt policy, rather than adding more freehand code to the README.

@Hixie
Copy link
Contributor Author

Hixie commented Jun 30, 2023

How do I do that while keeping the code in the README slightly different to the code in the examples? I have bespoke comments that are intentionally not the same in both because the reason you read one is not the reason you read the other (e.g. the example/hello case has comments in the README that flow from the text in the README, which don't make sense out of context).

@Hixie
Copy link
Contributor Author

Hixie commented Jun 30, 2023

(Any idea how to use it with rfwtxt files? Or to extract text from strings inside Dart files?)

@Hixie
Copy link
Contributor Author

Hixie commented Jun 30, 2023

Is there a way to take code from different examples, and from tests? The documentation in the wiki seems to assume there's only one example that you're pulling sample code from.

@stuartmorgan
Copy link
Contributor

How do I do that while keeping the code in the README slightly different to the code in the examples?

In other packages where we want code that doesn't make sense in the core example code we made a new file (usually "readme_excerpts.dart" IIRC) put the code there, with a comment at the top saying that it's not part of the example app, and is there for the README.

Any idea how to use it with rfwtxt files?

I don't know what they look like, but I think the code-excerpt tool from the website repo that this is using is pretty file-agnostic. If you can put start/end directives in the file it may well just work. (But if not, this is currently only enforced for blocks annotated as dart.)

Is there a way to take code from different examples, and from tests? The documentation in the wiki seems to assume there's only one example that you're pulling sample code from.

That's just because almost none of our package have multiple examples. It should Just Work if you replace "example/" with "example/whatever/" when it takes about file paths. The repo tool will extract from all examples that are configured for it, and the extraction output is already example-package-name scoped.

There's information in the wiki about pulling from tests, but I've not done it personally. IIRC David added that after doing it for some package, but it's not been widely done.

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Very interesting! I'd run across mention of this package, but hadn't previously read any example code closely or tried to use it, so this is largely a fresh read from that perspective. The new text looks quite helpful; some comments below.

packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
@Hixie
Copy link
Contributor Author

Hixie commented Jul 6, 2023

@gnprice thanks for the detailed review!

@Hixie Hixie force-pushed the rfw branch 2 times, most recently from 4738f4f to 24f35bc Compare July 7, 2023 00:43
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
@gnprice
Copy link
Member

gnprice commented Jul 7, 2023

Cool, those changes were helpful. Just read through all the revised or commented-on parts again, and have a smaller number of comments this time around.

Those are above in a couple of batches, because that's how GitHub behaves when one replies on a comment thread from the main PR page after queueing up some other comments on the "files" page.

@Hixie
Copy link
Contributor Author

Hixie commented Jul 11, 2023

Blocked on #4417

@Hixie Hixie added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 11, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 11, 2023

auto label is removed for flutter/packages, pr: 4349, due to - The status or check suite repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 11, 2023
@Hixie Hixie added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 11, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 11, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 11, 2023

auto label is removed for flutter/packages, pr: 4349, due to - The status or check suite Linux_android custom_package_tests stable has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Hixie Hixie added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 12, 2023

auto label is removed for flutter/packages, pr: 4349, due to - The status or check suite Mac_arm64 ios_platform_tests_shard_5 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Hixie Hixie added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2023
Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

LGTM! Those changes clarify all the remaining points I had; just a couple of nits below.

Comment on lines 619 to 621
local widget (which is defined in terms of the `GestureDetector`
widget from the Flutter framework), and the `args.onPressed` is passed
to the `onTap` argument of that `GestureDetector` widget.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
local widget (which is defined in terms of the `GestureDetector`
widget from the Flutter framework), and the `args.onPressed` is passed
to the `onTap` argument of that `GestureDetector` widget.
local widget (which is defined in terms of the `GestureDetector`
widget from the Flutter framework), and the `args.onPressed` is passed
to the `onTap` argument of that `GestureDetector` local widget.

(Because "GestureDetector widget" appears just a few words earlier with the meaning of the one from the framework, I think this extra bit of explicitness is helpful.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Further clarified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your attention to detail on this PR btw. I think it's made the text much, much better.

Copy link
Member

Choose a reason for hiding this comment

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

Glad to help!

packages/rfw/README.md Show resolved Hide resolved
packages/rfw/README.md Outdated Show resolved Hide resolved
packages/rfw/test/readme_test.dart Show resolved Hide resolved
@Hixie Hixie removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2023
@Hixie Hixie added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2023
@auto-submit auto-submit bot merged commit aaebc6e into flutter:main Jul 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 12, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 12, 2023
flutter/packages@188a846...2508714

2023-07-12 [email protected] ADD appBarBreakpoint (flutter/packages#4434)
2023-07-12 [email protected] Roll Flutter from 65ff3cb to 3ec96a8 (5 revisions) (flutter/packages#4415)
2023-07-12 [email protected] [image_picker] Roll dependancies to avoid error (flutter/packages#4431)
2023-07-12 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump com.android.billingclient:billing from 6.0.0 to 6.0.1 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#4422)
2023-07-12 [email protected] [file_selector] Avoids using path_provider in web example app. (flutter/packages#4445)
2023-07-12 [email protected] [rfw] Add some more documentation for RFW (flutter/packages#4349)
2023-07-12 [email protected] [ci] Enable LUCI legacy analysis (flutter/packages#4435)
2023-07-11 [email protected] [webview_flutter_wkwebview] NSError.toString (flutter/packages#4441)
2023-07-11 [email protected] [ci] Remove unused Chromium setup (flutter/packages#4437)
2023-07-11 [email protected] [flutter_plugin_tools] Reimplements the excerpt system inline in the tool, rather than relying on a separate package. (flutter/packages#4417)
2023-07-11 [email protected] [ci] Remove webview_flutter implementation opt outs for custom analysis (flutter/packages#4438)
2023-07-11 [email protected] [palette_generator] Add web support to unit tests (flutter/packages#4440)
2023-07-11 [email protected] [tool] Conditionalize color on `stdout` (flutter/packages#4436)
2023-07-11 [email protected] [go_router_builder] Cleans up builder code. (flutter/packages#4356)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 13, 2023
flutter/packages@188a846...2508714

2023-07-12 [email protected] ADD appBarBreakpoint (flutter/packages#4434)
2023-07-12 [email protected] Roll Flutter from 65ff3cb to 3ec96a8 (5 revisions) (flutter/packages#4415)
2023-07-12 [email protected] [image_picker] Roll dependancies to avoid error (flutter/packages#4431)
2023-07-12 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump com.android.billingclient:billing from 6.0.0 to 6.0.1 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#4422)
2023-07-12 [email protected] [file_selector] Avoids using path_provider in web example app. (flutter/packages#4445)
2023-07-12 [email protected] [rfw] Add some more documentation for RFW (flutter/packages#4349)
2023-07-12 [email protected] [ci] Enable LUCI legacy analysis (flutter/packages#4435)
2023-07-11 [email protected] [webview_flutter_wkwebview] NSError.toString (flutter/packages#4441)
2023-07-11 [email protected] [ci] Remove unused Chromium setup (flutter/packages#4437)
2023-07-11 [email protected] [flutter_plugin_tools] Reimplements the excerpt system inline in the tool, rather than relying on a separate package. (flutter/packages#4417)
2023-07-11 [email protected] [ci] Remove webview_flutter implementation opt outs for custom analysis (flutter/packages#4438)
2023-07-11 [email protected] [palette_generator] Add web support to unit tests (flutter/packages#4440)
2023-07-11 [email protected] [tool] Conditionalize color on `stdout` (flutter/packages#4436)
2023-07-11 [email protected] [go_router_builder] Cleans up builder code. (flutter/packages#4356)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: rfw Remote Flutter Widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants