developmentseed / pearl-frontend

PEARL (Planetary Computer Land Cover Mapping) Frontend
https://landcover.io
MIT License
18 stars 6 forks source link

Fix Batch AOI stats #139

Closed vgeorge closed 6 months ago

vgeorge commented 6 months ago

Contributes to #132.

Changes:

@LanesGood this is ready for review. To test, try opening a finished batch AOI, switch between AOIs and confirm the stats are displayed accordingly.

LanesGood commented 6 months ago

@vgeorge I'm a bit confused. I tested with a new batch prediction - please see the below.

Some minor changes perhaps could be useful:

My batch prediction returned, but the secondary stats panel doesn't load:

image

Reloading the browser window, I can see the class stats should be there:

image

Initially when I reloaded, the secondary panel didn't appear. My screenshot for this didn't save. I'll try to reproduce.

Reloaded after new AOI:

LanesGood commented 6 months ago

@vgeorge I added a change to keep the land area in the compare and share pages' class analytics charts. Not sure if best practice to execute the areaFromBounds function in the chart component, or before passing the prop through; I did it in the component. Will defer to you on the conditional check - I'm not sure if we should separate out the component logic more clearly or if the original check I had implemented is adequate.

vgeorge commented 6 months ago

@LanesGood I added changes on how the batch status is controlled internally. Now there is a specific machine to control its state. I haven't gotten to the issues you reported, but it would be nice if you could review this again, specifically the batch panel behaviour.

vgeorge commented 6 months ago

@LanesGood thanks for the review! I've incorporated some of your suggested changes and added a commit to fix the styles in the secondary panel. I'm going to merge this now. Let's track any new issues in the panel with separate tickets.