NordicSemiconductor / asset-tracker-cloud-app-js

The nRF Asset Tracker Web Application is a reference single-page application (SPA) developed using create-react-app in TypeScript.
https://github.com/NordicSemiconductor/asset-tracker-cloud-app-js#readme
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Allow to increase size of map in Cat view #317

Open coderbyheart opened 3 years ago

coderbyheart commented 3 years ago

to allow more convenient inspection of larger tracks.

FaitAccompli commented 2 years ago

Hi @coderbyheart , I'd like to work on this. By "allow to increase size of map" do you mean adding a full screen control on the cat view?

image
coderbyheart commented 2 years ago

Yes, that would be one option. I would also like the user to be able to drag the bottom of the map to the desired size while not in full screen.

image

FaitAccompli commented 2 years ago

I was able to implement something simple. However, the resize css property is by default located at the bottom right portion of the container. We can try implementing hooks to make it more customized and allow the whole bottom portion to be resizable vertically. But if the one shown below looks good, I'll be more than happy to make a PR.

image
coderbyheart commented 2 years ago

I draft PR would have allowed me to try it out, but from the pictures it looks good. Except, as you mentioned, right now the positioning is not optimal. Does it work on mobile as well?

FaitAccompli commented 2 years ago

I'm currently working on an approach that uses hooks. I'll be testing on mobile as well. Will create a draft PR soon.

coderbyheart commented 2 years ago

Note that the map is now in the AWS application https://github.com/NordicSemiconductor/asset-tracker-cloud-app-aws-js/releases/tag/v1.4.0, if you haven't done too much implementation, you could add it there directly.

Otherwise continue in this repo, and I'll port it over.

FaitAccompli commented 2 years ago

@coderbyheart, I'm getting an unknown web-app-config error. When following the instructions below. I'm assuming the nRF Asset Tracker for AWS is the aws directory we created based on the Getting Started page.

image

[Edit 2/3/2022] I'm guessing web-app-config is just a placeholder? So in this case we use

node cli react-config > ../asset-tracker-cloud-app-aws-js/.envrc

coderbyheart commented 2 years ago

You need to use this branch for the new web app: https://github.com/NordicSemiconductor/asset-tracker-cloud-aws-js/pull/726

FaitAccompli commented 2 years ago

Hi @coderbyheart , I created a draft PR #10