Skip to content

Conversation

@ditman
Copy link
Member

@ditman ditman commented Apr 3, 2023

  • Adds web-only renderButton method.
  • Implements new platform interface methods.
    • canAccessScopes method and userDataEvents stream.
  • Adds button_tester example app.
  • Adds a flex view that reflows flutter apps from its contents.

Breaking change: silentSignIn now returns a non-null user, after popular demand (and adding a method to check if a user canAccessScopes).

Issues

Testing

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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: using BoxConstraints from a LayoutBuilder may provide a better first guess than Size(1, 1).

Copy link
Member Author

Choose a reason for hiding this comment

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

For the best user experience in this usage, the initialSize should be guesstimated off of the button configuration.

The layout builder however tells me the constraints that flutter will apply to my widget, but it does not tell me what's the rendered size of the contents of the html element view, so I'm not sure that the estimation is going to be better (if I understand the layout builder correctly, in that case the widget will start large, and then likely shrink, and with Size(1,1) it'll start small and likely grow?)

ditman added 6 commits April 4, 2023 21:54
* Adds web-only renderButton method.
* Implements new platform interface methods.
  * canAccessScopes method and userDataEvents stream.
* Adds button_tester example app.
* Adds a flex view that reflows flutter apps from its contents.
@ditman
Copy link
Member Author

ditman commented Apr 5, 2023

Hey, @stuartmorgan just a quick heads-up that this is almost ready to land. Please do take a look!

I've updated the README with the latest changes; instructing users to canAccessScopes after sign in on the web, and removing the mentions that signInSilently always returns null (because it doesn't anymore).

(The latter change made me want to release this as a major version change, so people who have already migrated to 0.11 get these changes by accident)

I've also added a new test app (that only uses this plugin) to test what the button looks like with different configuration values (I've deployed the latest version to the URL I linked in the description).

Thanks! 🙏

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

The metadata LGTM with nits; I mostly didn't review the implementation part since that was already done.

@ditman
Copy link
Member Author

ditman commented Apr 6, 2023

Let's go with this! When programmers attempt to use signIn in the web, the plugin will warn them that there's better alternatives, and point them to the docs!

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 6, 2023
@auto-submit auto-submit bot merged commit 3f48061 into flutter:main Apr 6, 2023
@ditman ditman deleted the gsi-button-web branch April 6, 2023 00:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
[gsi_web] Adds Sign In button.
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: google_sign_in platform-web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants