https://linen.dev logo
#dev-frontend
Title
# dev-frontend
a

Artem Astapenko

09/22/2020, 9:38 PM
Charles, small question: for source_implementation update and destination_implementation update, we can handle check_connection on frontend. The issue is that any implementation that we can do now will be confusing for user - because he will update, we will check values, return him error in case of error but actually new values will be stored instead of old one.
c

charles

09/22/2020, 9:44 PM
can you give an example? i’m not quite sure what you mean about new values and old values. like i think i roughly understand the type of issue, just not sure specifically what you are imagining.
is that i put in:
username: invalid
i get an error back, but now when i go to put in the values, the
username
is already set to
invalid
instead of being blank?
a

Artem Astapenko

09/22/2020, 9:51 PM
When you enter values for source_implementation: we can call on web_backend create and check_connection.
So lets assume everything was fine and it is created and user ended those flow.
Now he wants to modify it.
He changes valid one source to invalid. We call update and then call check_connection. Now it fails, but our old working values will be changed to non-working now.
And that could be quite confusing for user - he tried to change something and got an error. He may think that nothing was changed, but actually it was.
tbh I suppose there is an error here. We should first check connection and then create an entity. Not vice versa. So you first validate and then create. Easier to support, easier to catch failed steps.
c

charles

09/22/2020, 9:55 PM
ah. i see what you’re saying.
i agree. i think for now we have to do it this confusing way though, because it’d be a kinda a major change otherwise. what do you think?
a

Artem Astapenko

09/22/2020, 9:57 PM
sure. I am not asking to change anything now - its quite a big thing to do. I am just asking how should I handle it on FE 🙂
👍 1
So I can call check_connection after update - but that could be confusing for user.
c

charles

09/22/2020, 9:58 PM
yeah. makes sense.
let’s do that for now. thanks for pointing it out!
👍 1
3 Views