-
Notifications
You must be signed in to change notification settings - Fork 83
[DX Waterfall] Fix for label references #2476
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
Conversation
|
Why not use reset_fields() as I did before? If we click a new spot we need to reset all fields anyway? |
|
I have to agree with @phl0 here. Do not clear field by field. Use the reset_fields() function to clear everything when hitting a new spot. We don't want to carry wrong data to the next QSO. No exception here. Better safe then sorry |
|
We are clearing the form, see: But the problem is deeper, we are loosing POTA grid and - as it was noticed - if there was already referenced POTA/SOTA it's stays. |
|
I'm not sure if I get this right. Are you talking about a manually typed in SOTA/POTA Ref. or a Ref which was part of the Spot? |
|
Reference received with the DX Cluster API, so part of the spot (but behavior shall be the same if user would have added it manually). Expected behavior is: if there is a POTA/SOTA/... reference we would like to use it's grid-square/location, if not - get the grid square from internal callsign lookup (then the logic database vs call book kicks in). Now the logic is broken. |
|
Talking about different things, i think. e.g.:
And now the problem: POTA/SOTA/WWFF-References are still those from DF2ET and NOT those from LA8AJA. @phl0 's PR healed that. What is this thing doing on Top / better? |
|
Yes, I fully understand you gentlemen, what I'm saying is that clearing the ref is only part of the problem. 2nd, bigger part is the race condition: look exactly what happens when you click on POTA referenced spot:
So, fixing that is not about clearing the form, but also ensuring we are not loosing POTA location in the process. |
|
Please test, shall be fine now; expected behavior:
|
|
Either we're talking about different points, or i still don't get it.
once i click at "1" - everything gets filled (references, DXCC, etc. etc.) it's not only the Refs, it's much more: County when working U.S.-Stations, Zones and so on. you're talking about race-conds. wasn't able to repro here. but honestly - i know we've some. The EVERYTHING depends (and that's the reason for having RESET and CLEAR) on what to kill. so - if i am not total wrong a QSY to another spot should do:
if there's really a race-cond, we should refactor/adjust it, that it is fired in correct order. |
|
Fully agree Sir, please check my comment which won the race to be published by a few sec. 😄 🍺 |
|
If anybody still wonders see line I believe lines In regards the race - this shall now be resolved with |
|
still trying to get my head around this. no progress - perhaps because its friday ;) why reinvent the wheel with a lot of JS? DF2ET simply called reset_field which is doing the job. even if you did it for a reason (possible race-conds, whatever), it'd be redundant code to the working/existing reset-function. perhaps i really don't got it, but if there's a racecond we should try to serialize things instead of this one. let me try to explain: |
|
It’s Friday! 😄 I think you might be overlooking one great functionality that, according to GitHub blame, was added/modified by @phl0 and @HB9HIL around 2 or 1 year ago — see: Once you set the POTA reference in the field, an AJAX call is triggered to fetch the QTH and locator fields. Originally, @phl0 implemented this fix nicely. However, when switching to a POTA spot, the form was cleared, and with it, the information about being at a POTA spot was lost. Sure, the user could read the message and re-enter the POTA reference, but we already have that information! So, my tweaks were focused on preserving the POTA reference from the spot and restoring it into the cleared form once the callsign lookup is completed. For example: And this will make the answer longer, but here comes the race 🤣: The initial implementation had a bug — here’s what happened: Now the sequence is clean and predictable:
Step by step — no more race conditions. |
phl0
left a comment
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.
Finally was able to get to the bottom of this. The issue was that clicking a spot took data from callbook instead of cluster info (e.g. POTA/WWFF reference).
With the patch its now sure that the info from the cluster is used to fill the fields and not get overwritten by callbook data. So approving here. Great work @szporwolik :) Thank you for clearing this up.
Extension of @phl0 idea introduced in #2475 to solve the incorrect reference field handling while jumping from spot to spot using DX Waterfall.