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

feat(ui_storage): configuration API and UploadButton widget #10699

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

lesnitsky
Copy link
Member

Related Issues

Closes #10698
Closes #10380

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@lesnitsky lesnitsky marked this pull request as ready for review April 11, 2023 12:28
packages/firebase_ui_storage/CHANGELOG.md Outdated Show resolved Hide resolved
packages/firebase_ui_storage/LICENSE Outdated Show resolved Hide resolved
packages/firebase_ui_storage/example/README.md Outdated Show resolved Hide resolved
Comment on lines +2 to +9
cmake_minimum_required(VERSION 3.10)
project(runner LANGUAGES CXX)

# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "firebase_ui_example")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove the linux folder since we don't support it?

Copy link
Member Author

Choose a reason for hiding this comment

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

we do support it via flutterfire_desktop 😉

Comment on lines +1 to +9
# Project-level configuration.
cmake_minimum_required(VERSION 3.14)
project(firebase_ui_example LANGUAGES CXX)

# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "firebase_ui_example")

# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for windows folder

Copy link
Member Author

Choose a reason for hiding this comment

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

flutterfire_desktop will work on windows too :)

///
/// See also:
/// * [KeepOriginalNameUploadPolicy]
abstract class FileUploadNamingPolicy {
Copy link
Contributor

Choose a reason for hiding this comment

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

That's cool :D

final config = context.configFor(storage);

return LoadingButton(
label: 'Upload file', // TOOD(lesnitsky): i18n
Copy link
Contributor

Choose a reason for hiding this comment

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

If we only support english for the first release, maybe we should remember to put that into the release note

Copy link
Member Author

Choose a reason for hiding this comment

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

that would be a dev release anyways, but yeah, could mention that

Comment on lines +103 to +104
cupertinoIcon: CupertinoIcons.cloud_upload,
materialIcon: Icons.upload_outlined,
Copy link
Contributor

Choose a reason for hiding this comment

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

If I want the same Button on Android and iOS, will I still have to fill both of them? Will I be able to control the appearance manually (like having a "Cupertino" button on Android?)

Copy link
Member Author

Choose a reason for hiding this comment

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

this is not platform specific, but rather top-level app specific. so if you use MaterialApp both for ios and android – material button will be used. If you want ios widgets – you need to use CupertinoApp.

both fields are optional, so you could pass only one for the type of app you use

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok great, I wasn't sure when reading the PR, but it's what I had in mind thanks :D

packages/firebase_ui_storage/pubspec.yaml Outdated Show resolved Hide resolved
@lesnitsky lesnitsky merged commit e802b3d into master Apr 14, 2023
@lesnitsky lesnitsky deleted the ui/storage branch April 14, 2023 11:35
@firebase firebase locked and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants