-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Geo-Copilot to VEDA UI Exploration Page #1173
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
**Related Ticket:** _{link related ticket here}_ ### Description of Changes This PR contains changes to show details of the queries and it's parts that matches the responses by the agents. ### Validation / Testing - Check to see if words/phrases are highlighted - Hover over highlights provide details of what they were matched to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on it. It is such a fun feature and I like seeing the methods we built are being used by geo-copilots to dynamically add datasets and run analysis 🤩
I could test and validate the functionalities you described in the pr. The main problem I can spot now is AOIs are behaving unexpectedly. ex. already-drawn AOIs are still there even after geo-copilots finished the task, and pre-defined AOI selector (the dropdown on the left-top with US States as options) doesn't get reset after AOI is gone. Of course this change was not introduced by your change, it is more like it highlights the problem we already had. - We are currently working on the improvements now (#1207). I am not sure if that will fix all the issues, but I hope it helps future iterations.
|
||
const [timeDensity, setTimeDensity] = useState<TimeDensity | null>(null); | ||
|
||
const [map, setMap] = useState<MapboxMap | MapRef>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The map instance can be accessed through the hook useMaps
(ex. https://github.com/NASA-IMPACT/veda-ui/pull/1205/files#diff-7c073c4bc2683442a5f008251eeac5bab257f96acb39d9778fe62a08f4675392R325)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had tried to use useMaps, but probably because of some race condition, the maps are not ready/accessible when trying to use the geo-copilot panel. I will check again and see if I can use the ref again.
@@ -89,33 +111,93 @@ function ExplorationAndAnalysis(props: ExplorationAndAnalysisProps) { | |||
}; | |||
}, [resetAnalysisController, setUrl]); | |||
|
|||
const mapPanelRef = useRef<any>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried using utility methods that react-resizable-panel
exposes and using one ref? https://www.npmjs.com/package/react-resizable-panels#can-a-attach-a-ref-to-the-dom-elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't seen this. Thank you, @hanbyul-here . that definitely helps make the code a little cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanbyul-here I checked on this, and getPanelElement
is not available in the current version of react-resizable-panels
. will keep the changes for now, and will upgrade later.
Closing it as it is stale. Let's discuss if we need to work further on this. |
Description of Changes
This PR introduces components in the exploration page required for interaction with Geo-CoPilot backend being developed by our Microsoft Counterparts. Most of the interactions done in exploration page can now be done with the help of geo-copilot, mainly loading datasets, comparing dates for datasets, and running analysis.
Notes & Questions About Changes
This PR mostly tackles the basic functionalities of the co-pilot. There are more interactions planned, and will be updated in the next PRs to come.
Validation / Testing