Skip to content

Add windows progress bar #37

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

Merged
merged 7 commits into from
Jul 18, 2020
Merged

Add windows progress bar #37

merged 7 commits into from
Jul 18, 2020

Conversation

TatianaKapos
Copy link
Contributor

@TatianaKapos TatianaKapos commented Jul 6, 2020

Summary

Added windows support to progress view
Added property isIndeterminate specifically for windows

Closes microsoft/react-native-windows#4389

Compatibility

OS Implemented
iOS
Windows

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

@rectified95
Copy link

rectified95 commented Jul 7, 2020

General note, before you merge this, since you have pushed many commits, do a squash merge in order to reduce clutter in git log.
https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges#squash-and-merge-your-pull-request-commits
(easier than manually rebasing)

@TatianaKapos TatianaKapos marked this pull request as ready for review July 14, 2020 17:22
Copy link

@kaiguo kaiguo left a comment

Choose a reason for hiding this comment

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

:shipit: 🎉

namespace winrt::progress_view::implementation {

ProgressViewView::ProgressViewView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) {
this->Minimum(0);

Choose a reason for hiding this comment

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

are these hardcoded values what the module specifies as default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The module specifies the progress value to be between 0 and 1. By default the min/max of XAML progress bar is 0/100 but I left it in for readability. Would it be better to take it out?

Choose a reason for hiding this comment

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

Not sure about this one. If these are the default XAML values, you don't need to set them explicitly yourself.
If you want to keep the XAML defaults, you can a comment saying what they are. Still, it's probably better to put it as a default prop value on the JS side. You should also consider, if the default should be the same as for other platforms (as defined by this module) or whether we'd like the XAML one to override it. It's q question you could ask the maintainers when they review this PR.
Perhaps @asklar could help, as well.

}
else if (propertyName == "progressViewStyle") {
if (propertyValue == "bar") {
this->Background(SolidColorBrush(ColorHelper::FromArgb(000, 000, 000, 000)));

Choose a reason for hiding this comment

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

Can there be other color values when using this prop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There wasn't much info on this property (The description being "The progress bar style.") but by the picture I assumed it was making the background transparent. There could be other color values but the property 'trackTintColor' handles that.

Choose a reason for hiding this comment

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

Yeah, I get that. The maintainers might be able to clarify that, too.

Copy link

@rectified95 rectified95 left a comment

Choose a reason for hiding this comment

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

It'd be good to see the example app updated to match the screenshot in the PR description.
Also, local image paths won't work the way things are now.

Copy link

@rectified95 rectified95 left a comment

Choose a reason for hiding this comment

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

I think this is good to go now :)

@TatianaKapos
Copy link
Contributor Author

TatianaKapos commented Jul 17, 2020

@Naturalclar this PR has been reviewed by my coworkers! Let me know if I need to change anything to the PR :)

Copy link
Member

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

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

@TatianaKapos Thank you so much! I'll merge it and release a new version soon.

@Naturalclar Naturalclar merged commit 33b4242 into react-native-progress-view:master Jul 18, 2020
@Naturalclar
Copy link
Member

Released 1.1.0 with this change 🎉

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.

Support react-native-community/progress-view
5 participants