-
Notifications
You must be signed in to change notification settings - Fork 712
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
Fix setup wizard selection of network devices for sign up or import #11510
Fix setup wizard selection of network devices for sign up or import #11510
Conversation
Build Artifacts
|
037aabf
to
2538d04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only blocking change request is the use of the conditional chaining operator.
Overall, this is a massive improvement. Every place there is a change, the result is more readable and easier to follow/understand. I really love this overall and I think that useDevices
and the filtering business would be a great thing to present & discuss with the team if you'd be up for it.
kolibri/core/assets/src/views/sync/SelectDeviceModalGroup/useDevices.js
Outdated
Show resolved
Hide resolved
return () => Promise.resolve(true); | ||
} | ||
|
||
return useAsyncDeviceFilter(function deviceFacilityFilter(device) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the parameter passed to useAsyncDeviceFilter
have to be named or could it be an anonymous function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly asking because when I see something named, especially as specifically as deviceFacilityFilter
I kind of expect it to be something that I need to know about elsewhere or later but it seems like this could just as well be called filterFn
or nothing at all -- although I could totally be missing something elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be named. Although, there is a benefit when reading error stack traces, because anonymous functions would of course be anonymous and indistinguishable from other anonymous.
* Produces a function that resolves with a boolean if Kolibri version is at least the specified | ||
* @param {number} major | ||
* @param {number} minor | ||
* @param {number} patch | ||
* @return {function(NetworkLocation): Promise<boolean>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a beautiful improvement <3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish it showed the full diff so it was obvious here what it looked like before lol this is really so much nicer a way to do what we need to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah by making the filters (filter functions) more like object entities, it disconnects the 'inheritance' structure that was in use before and makes it more flexible
2538d04
to
addd5fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested changes have been made. Thanks for this Blaine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look correct to me and code is understandable. Thanks @bjester
Summary
With learner sign up disabled
With learner signup enabled
References
Fixes: #11496
Reviewer guidance
Tested the signup flow and channel import
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)