Skip to content

Conversation

dee077
Copy link
Contributor

@dee077 dee077 commented Sep 11, 2025

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #562.

Description of Changes

  • Passed the urlFragements from config on both maps to allow fragments to set and apply from netjsongraph.js
  • Updated the logic in floorplan.js to parse the params first, and if it exists for the indoor map open the floorplan overlay

Blockers

@dee077 dee077 self-assigned this Sep 11, 2025
@dee077 dee077 added enhancement New feature or request gsoc-idea labels Sep 11, 2025
@dee077 dee077 changed the base branch from master to feature/662-improve-ui-device-list-popup-above-geo-map September 11, 2025 00:50
@dee077 dee077 force-pushed the feature/662-improve-ui-device-list-popup-above-geo-map branch 2 times, most recently from 1ed30c3 to acec94b Compare September 11, 2025 16:40
@dee077 dee077 force-pushed the feature/562-bookmark-url branch from f570034 to e533011 Compare September 11, 2025 22:29
Base automatically changed from feature/662-improve-ui-device-list-popup-above-geo-map to gsoc25-map September 12, 2025 16:32
@dee077 dee077 moved this from In progress to In review in [GSoC25] General Map: Indoor, Mobile, Linkable URLs Sep 12, 2025
@dee077 dee077 force-pushed the feature/562-bookmark-url branch from e533011 to b5cd494 Compare September 17, 2025 23:48
@dee077 dee077 marked this pull request as ready for review September 17, 2025 23:49
@dee077 dee077 force-pushed the feature/562-bookmark-url branch from 632f83b to 0fa8b29 Compare September 18, 2025 23:10
Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work Deepanshu! 🚀 🚀 🚀

This PR is on point!!! Just need to add some comments here and there.

@dee077 dee077 force-pushed the feature/562-bookmark-url branch 2 times, most recently from ef9e7c4 to 0fa8b29 Compare September 22, 2025 11:29
@dee077 dee077 force-pushed the feature/562-bookmark-url branch from 34da180 to af11750 Compare October 3, 2025 11:49
@dee077 dee077 force-pushed the feature/562-bookmark-url branch from af11750 to 838bb84 Compare October 3, 2025 15:03
Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dee077 Good work with adding the buttons to the device page. But, these buttons are redirecting the user to /admin/ page. The end goal is to create a dedicated page for the map.

I'm unsure if we need field label for the button. I'm attaching the screenshot so @nemesifier can confirm quickly.

Image

return super(admin.ModelAdmin, self).has_delete_permission(request, obj)


def patch_device_location_inline(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment here explaining why we are doing this.

Comment on lines +5 to +6
const location_parent = $("fieldset.module.aligned.loci.coords");
const floorplan_parent = $("fieldset.module.aligned.indoor.coords");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit pick: the variable naming convention is not right for JS. We use camelCase.

Comment on lines +770 to +774
current_hash = self.web_driver.execute_script(
"return window.location.hash;"
)
expected_hash = f"#id={mapId}&nodeId={location.id}"
self.assertEqual(expected_hash, current_hash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs = self.get_browser_logs()
self.assertEqual(len(logs), 0)
self.assertTrue(popup.is_displayed())
self.assertIn(device.name, popup.get_attribute("innerHTML"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also verify the location name in the pop-up?

Comment on lines +802 to +806
current_hash = self.web_driver.execute_script(
"return window.location.hash;"
)
expected_hash = f"#id={indoorMapId}&nodeId={device_location.id}"
self.assertEqual(expected_hash, current_hash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, use EC.url_to_be

logs = self.get_browser_logs()
self.assertEqual(len(logs), 0)
self.assertTrue(popup.is_displayed())
self.assertIn(device.name, popup.get_attribute("innerHTML"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to also verify the floorplan-title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gsoc-idea
Development

Successfully merging this pull request may close these issues.

[feature] Add a URL in the device's change page to view the device on the full map
2 participants