Skip to content
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

bug/wg-447-import-loading-bug #334

Merged
merged 3 commits into from
Feb 25, 2025
Merged

Conversation

sophia-massie
Copy link
Contributor

Overview:

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Testing Steps:

  1. On your own map, create a feature with no asset. Try importing geojson data from GEOAPI Test do not edit project
  2. Import a feature to that asset using Add Asset from DesignSafe button
  3. Make sure that the Import from DesignSafe button is always disabled after starting import.

UI Photos:

Notes:

Comment on lines 37 to 39
useEffect(() => {
setIsSuccess(false);
}, [selectedFeature.id]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this not work with the isSuccess value from the mutation instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as it is no. The isSuccess key is the selected project feature list not the specific feature. Adding the feature id as an additional key won't update the list in the LoadedProject component. The loaded map project is looking for the feature id to change and since the import doesn't change an id, we are invalidating the key list features on import. The trickle down of selectedfeature state from loadedmapproject could possibly use some refactoring based on these conflicts

Copy link
Contributor

@rstijerina rstijerina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as-is. Just a suggested change to use the built in mutation method

@sophia-massie sophia-massie merged commit 4fa8cc6 into main Feb 25, 2025
5 checks passed
@sophia-massie sophia-massie deleted the bug/wg-447-import-loading-bug branch February 25, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants