Closed Uffel3 closed 1 month ago
What happens is the validation logic tries to focus on the first place where the error occurs, to "help" the user diagnose where the problem is because I guess there is often a sequential workflow with dependencies between fields.
Unfortunately the way we check for duplicates we make both entries an errored state.
I guess we should only make the second (and subsequent) entries an error state and accept the first one as correct, as the "go to first error" logic is built into the way our UI components work.
Arguably, however the user may wish to know that both are invalid so it's clear to them the choice they have in which case scrolling to the top and invalidating both may be good behaviour (preventing the user from having to find the duplicate).
I don't think I can make them both invalid and avoid the scroll to top logic.
This is a low priority for me for the next little while but I agree it could work in a more useful fashion.
However if people want to copy and paste between different names, maybe they should help themselves by not copying, say, the last character?
This is a low priority for me for the next little while but I agree it could work in a more useful fashion.
However if people want to copy and paste between different names, maybe they should help themselves by not copying, say, the last character?
I am ok with that approach. Perhaps we should add a warning or some guidance here? https://digital-substation.pages.tpwiki.com/docs-site/iec61850-engineering-process/latest/prot-both/create-sel-ieds.html#_rename_ieds
OK, finally I have fixed. The first time I looked I couldn't see a solution but this time it seemed obvious :stuck_out_tongue_winking_eye:
Please test! The new behaviour is a little different and I think better.
Please test! The new behaviour is a little different and I think better.
I tested. Works like a dream! Many thanks @danyill.
Not very important...
When I rename IED's via copy/paste, OpenSCD correctly complains that no duplicate device names shall be chosen.
But it should not jump to the top device and say that its name is also wrong. It would be nice it there was no jump at all and I can easily make a minor correction of the device name. Example below.