-
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This issue is a follow-up to PR #688. Several improvements and refactoring opportunities have been identified:
- The
closeButtonHandler
andaddNavigationHandlers
can be generalized, so event handlers aren't re-added on every render. Check out$(parent).on("click", targetID, function(){})
- The floorplan overlay should close when the ESC key is pressed.
- Implement a utility method to unbind all event listeners and destroy Netjsongraph.js objects when closing the floorplan overlay.
- Fix the showing and hiding logic for the floorplan spinner.
- Refactor the code for managing popups use JS to get the
currentPopup
instead of using global variable:lect currentPopup = null; funtion loadPopUpContent(node, netjsongraphInstance) { const map = netjsongraphInstance.leaflet; if (currentPopup) { currentPopup.remove(); }
- Refactoring: There is reusable code inside the
openFloorPlan
function. Make this function leaner. Also, global variables (e.g.,allResults
) should be scoped insideopenFloorPlan
. - Refactoring: Selenium tests sleep for 0.5 seconds
Investigate removing the sleep by using timeout in
self.wait_for_invisibility( By.CSS_SELECTOR, ".map-detail .ow-loading-spinner" )
self.wait_for_*
methods. - Do not add
search.svg
to openwisp-controller; Django admin already provides a search icon via static files. Investigate how to we can provide the static() URL to the CSS. Maybe, move this CSS to the template. - Add comments to the
fetchDevices
function indevice-map.js
. - Add a spinner for infinite scroll in the device list inside
device-map.js
. - Find better solution for handling the height of the popup, perhaps we can center the pop up to the map after the content in is reloaded due to having clicked on any filter or search?
- We can avoid showing the search input if there is less than 4 devices in the location
- We can avoid showing filters if there's less than 4 devices in the location
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog