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

Setup Wizard: More helpful error state when trying to import from unprovisioned device #12397

Open
wants to merge 2 commits into
base: release-v0.17.x
Choose a base branch
from

Conversation

nucleogenesis
Copy link
Member

Summary

2024-07-02.16-07-59.mp4
  • Takes string from here "No learning facilities found"
  • Uses that by making the "Select facility" show an error when there are no facilities
  • Adds hideContinue prop to OnboardingStepBase to hide the Continue button there when we have this error state
  • Fixes issue where user's selection was lost when clicking "Go back" from the error state

References

Fixes #12066

Reviewer guidance

See the issue comment here for replication path -- note that I kinda had to go back and forth a few times through the flow - never actually importing anything - before I got the device to show up.

Overall, does the workflow feel okay?

@github-actions github-actions bot added APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend labels Jul 2, 2024
@pcenov
Copy link
Member

pcenov commented Jul 3, 2024

Thanks @nucleogenesis - I confirm that now there's an error message if I attempt to import a learner from unprovisioned device.
Just have one question - in #12066 I have mentioned that the expected behavior would be for the device to not be shown in the 'Select device' modal which is the case for example when I attempt to import a full facility from that same unprovisioned device. Is that not an option in this case?

@bjester
Copy link
Member

bjester commented Jul 3, 2024

To @pcenov's note, we should probably add a prop to SelectDeviceForm for filtering locations that have a facility, i.e. filterHasFacility. Then have the useDeviceFacilityFilter apply the filter. That should prevent it from ever getting as far as where these error messages would show.

That would take care of filtering devices that would not be joinable or importable because they have no facility, which is a solid improvement. Although it doesn't go quite as far as the original issue's proposal of filtering those devices that actually have learners for import. I think the consensus was that we don't need to go that far. See my comment in regards to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup Wizard - Devices that are not fully setup are showing up in the 'Select device' modal
4 participants