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

feat: refactor importer feedback #2363

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

yohanboniface
Copy link
Member

We basically make the all import chain return the results as promise, so the importer can act at the end of the process and:

  • zoom only to the imported data (in case the layer already as some)
  • display a counter of imported data when import is successfull
  • display an alert when nothing has been imported

cf #564

We basically make the all import chain return the results as promise, so
the importer can act at the end of the process and:
- zoom only to the imported data (in case the layer already as some)
- display a counter of imported data when import is successfull
- display an alert when nothing has been imported

cf #564
async importFromFiles(files, type) {
let all = []
for (const file of files) {
const features = await this.importFromFile(file, type)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if the promise.all() pattern could be in use here 🤔

Copy link
Contributor

@davidbgk davidbgk left a comment

Choose a reason for hiding this comment

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

Tests are OK 😮

@yohanboniface yohanboniface merged commit cd24bf0 into master Dec 13, 2024
4 checks passed
@yohanboniface yohanboniface deleted the refactor-import-feadback branch December 13, 2024 08:18
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