[BUG] Live monitoring view alters nav menu alignment
ramyaragupathy opened this issue · 5 comments
Describe the bug
While accessing the data live monitoring page, icons on nav menu are misaligned. Misalignment continues even after you move away from the page and continue to map tasks. However after a hard refresh the alignment is fixed.
To Reproduce
Steps to reproduce the behavior:
- Go to any project's live monitoring view
- Check the nav menu on top. You will see the support icon moved to bottom and the dropdown next to user's name missing
- Next come back to the project and try locking a task with iD editor
- You will notice the icons displaced in the nav menu and also in the iD editor's sidebar
Expected behavior
Accessing the data live monitoring page should not affect other sections of the frontend
![image](https://private-user-images.githubusercontent.com/12103383/328762612-c4b40d15-3727-4378-ac5b-832338a1f1fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxMDc4NzksIm5iZiI6MTcyMjEwNzU3OSwicGF0aCI6Ii8xMjEwMzM4My8zMjg3NjI2MTItYzRiNDBkMTUtMzcyNy00Mzc4LWFjNWItODMyMzM4YTFmMWZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI3VDE5MTI1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNhNDYxZGVkMThkMTM2MGUyOTM1ODc0ZmIwNWNmZDRhNzU3Nzg3YzdhOGM0ZmE2MDM0NzE5ZDM0OGVlOTg0MzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3Nik_L3KKjvDEwQcg_p07YIXw0AkH48NiIUV_mExRKo)
Desktop (please complete the following information):
- MacOS
- Chrome, Firefox
I suspect this is related to the Tailwind CSS loading that we use with the Underpass UI component. It should be isolated and not affecting the rest of the pages. I'll take a look.
I made changes to the Underpass UI components to isolate all styles with a className prefix.
https://github.com/hotosm/underpass-ui/
A new version of the NPM package will be published soon.
This should fix the issue. Maybe some changes will be needed on the TM side, as there are styles that need to be removed here:
https://github.com/hotosm/tasking-manager/blob/develop/frontend/src/views/projectLiveMonitoring.css
Also, the new Underpass UI version will work with a new version of the Underpass REST API that is ready to be deployed
Update: Underpass UI new version (0.1.2) is published, I tested it today in the Tasking Manager and is working fine, but some changes are needed for the Live Monitoring view, I'm working on it.
I'll create a PR next week that will include:
- Fix for this styling issue
- Performance improvements
- Fixes for React state management issues
- New feature for render the project AOI on the map