-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat: read-only geolocation (GDE-86) #16561
Conversation
- render map into display_area - hide draw controls if read-only - remove useless refresh_button
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
@barredterra Are you working on the Todo part you mentioned? |
@shariquerik I'm currently out of ideas / don't know where to start searching 😅. Do you have any ideas? |
I will have to look into it. |
Are you sure you're loading the most recent code? Tested this several times and using it in production v13 already. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #16561 +/- ##
==========================================
Coverage ? 58.78%
==========================================
Files ? 769
Lines ? 68989
Branches ? 6005
==========================================
Hits ? 40554
Misses ? 24949
Partials ? 3486
Flags with carried forward coverage won't be shown. Click here to find out more. |
@barredterra Am I missing something here ? When I make this field read_only, the field disappears Screencast.from.05-11-2022.03_43_24.PM.mp4 |
@barredterra the |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
…olocation render - When gelocation control is built, it awaits loading of libraries - Withi the control everything is await but a layer above where multiple controls are sequentially built this breaks - Form render goes ahead without waiting for the gelocation control - The `onload_post_render` in `Location` cannot find the map wrapper as the control is still being built - Therefore, on a hard load, the control does not show up and appears on soft reload.
@barredterra Looks like this would need a rebase after #21055 is merged, now. As I needed the patch, I've done a rebase here. On this occasion: Whats the rationale of using |
Long time since i wrote this... 🤔 From the naming, I guess |
@marination could you review this PR? |
@barredterra Replicated the What happens is:
So the "right" time to invoke |
This way, the logic can stay in the control itself. Each control can decide what it needs to do on section collapse/expand.
For better customizability
@marination thanks a lot for your investigation and the suggested fix. Everything seems to be working fine now. 👍🏼 |
@barredterra tested all scenarios. LGTM. @surajshetty3416 can you give it a final look and merge ? |
LGTM. Merging. |
Continues work from #16513
Depends on #21055
display_area
get_leaflet_controls
andpoint_to_layer
into separate methods that can be more easily overwritten with a custom scriptBefore
Read-Write
Read only
After
Read-Write
Read only
Todo
map not displayed after hard-refresh (CMD + SHIFT + R)
cur_frm.reload_doc()
. Maybe this doesn't get triggered on hard refresh?read-only map doesn't load on empty data (fix: Exclude Geolocation from "hide empty read-only field" #21088)
this.map.invalidateSize()
probably needs to get called at a different time. (feat: read-only geolocation (GDE-86) #16561 (comment))Scenarios to test
Does the map render nicely in all of the following scenarios?
Internal reference: LAN-756