TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
932 stars 301 forks source link

Navigate to failed step in end device wizard #3290

Closed bafonins closed 3 years ago

bafonins commented 3 years ago

Summary

We should navigate the user to wizard step that failed.

Why do we need this?

We make api requests only when submitting the last form in the end device wizard. Since the whole device creation flow is quite complicated and frontend validation might be not up to date to the actual validation rules defined on the backend, any request can fail. Currently, we display errors without navigating the user to the actual failed step.

Consider a simple case when a user trying to create a new device (OTAA) with already existing ID. With our current implementation the error will be presented at the Join Settings step, while the actual step caused the error is the Basic Settings step.

What is already there? What do you see now?

  1. End device wizard
  2. API in the JS SDK

What is missing? What do you want to see?

  1. Functionality in <Wizard /> to navigate to arbitrary step.

Environment

...

How do you propose to implement this?

...

How do you propose to test this?

...

Can you do this yourself and submit a Pull Request?

...

bafonins commented 3 years ago

Replaced by https://github.com/TheThingsNetwork/lorawan-stack/issues/3291