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

[BEAM-13662] [Playground] Support mutlifile examples #16857

Merged
merged 16 commits into from
Feb 24, 2022

Conversation

ElessarST
Copy link
Contributor

@ElessarST ElessarST commented Feb 15, 2022

I added:

  • Support for multifile example (disable run button and add multifile icon with View on Github Link)
  • Redesigned example description popover
  • Added link to the adding new example instruction

Note: In the screenshot, I temporarily marked all examples as multifile since we don't have them for now.

Screenshot 2022-02-15 at 16 33 26

Screenshot 2022-02-15 at 16 33 33


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status Build Status Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status ---
XLang Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

AydarZaynutdinov and others added 14 commits January 31, 2022 18:47
Add multifile value to the response to the frontend
# Conflicts:
#	playground/backend/internal/api/v1/api.pb.go
# Conflicts:
#	playground/api/v1/api.proto
#	playground/backend/internal/api/v1/api.pb.go
#	playground/backend/internal/cloud_bucket/precompiled_objects.go
#	playground/backend/internal/utils/precompiled_objects_utils.go
#	playground/backend/internal/utils/precompiled_objects_utils_test.go
#	playground/frontend/lib/api/v1/api.pb.dart
#	playground/frontend/lib/api/v1/api.pbjson.dart
Regenerate files
# Conflicts:
#	playground/backend/internal/api/v1/api.pb.go
#	playground/infrastructure/api/v1/api_pb2.py
Regenerate files
Copy link
Contributor

@damondouglas damondouglas left a comment

Choose a reason for hiding this comment

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

@ElessarST when running this locally should I be seeing the multifile icons? I am not seeing them.

),
Row(
children: [
if (example.isMultiFile)
Copy link
Contributor

Choose a reason for hiding this comment

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

@ElessarST may we consider instead having a children list outside this widget and adding the MultifilePopoverButton widget if the example.isMultiFile condition passes? This may improve the readability. I had to read a few times to understand as it was an if statement inside an array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@damondouglas thanks, I moved actions to the different component for the better readability

@ElessarST
Copy link
Contributor Author

ElessarST commented Feb 16, 2022

@ElessarST when running this locally should I be seeing the multifile icons? I am not seeing them.

@damondouglas Sorry, In the screenshot, I temporarily marked all examples as multifile since we don't have them for now.
I added a note to the description.

@@ -46,6 +51,14 @@ class DescriptionPopover extends StatelessWidget {
),
),
Text(example.description),
if (example.link?.isNotEmpty ?? false)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would improve the code readability to not have conditional logic in the array. This is just my subjective opinion and feel free to go your own way. I flag this as review and will accept/embrace your unchanging it however.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@damondouglas I left to condition on the array, but I refactored it and I think it's now clear with the condition.

Wrap(
            runSpacing: kMdSpacing,
            children: [
              title,
              description,
              if (hasLink) getViewOnGithub(context),
            ],
          ),

}

Widget get multifilePopover {
return MultifilePopoverButton(
Copy link
Contributor

Choose a reason for hiding this comment

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

To improve readability, the use of => could possibly apply here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks!

);
}

Widget get descriptionPopover {
Copy link
Contributor

Choose a reason for hiding this comment

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

To improve readability, the use of => could possibly apply here.

Copy link
Contributor

@damondouglas damondouglas left a comment

Choose a reason for hiding this comment

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

@pabloem LGTM
@ElessarST (cc: @ilya-kozyrev and @KhaninArtur ) later when the code becomes stable, should we think about documenting on the Flutter widgets?

@pabloem
Copy link
Member

pabloem commented Feb 24, 2022

LGTM

@pabloem pabloem merged commit e3e30a7 into apache:master Feb 24, 2022
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.

None yet

4 participants