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

Create layer groups when uploading maps #69

Merged
merged 2 commits into from
Jun 4, 2024
Merged

Create layer groups when uploading maps #69

merged 2 commits into from
Jun 4, 2024

Conversation

nyalldawson
Copy link
Collaborator

No description provided.

@nyalldawson
Copy link
Collaborator Author

@ChrisLoer

There's something I can't explain happening here! The first group creation and layer assignment works ok, but if I have multiple groups, then some of these groups just disappear when the processing finishes. Here's a screencast showing this occuring. At frist, the group is shown with the "processing" icon, but as soon as the processing finishes the group disappears and the layer is placed in no group (and its name is reset). Is this a backend issue?

Peek.2024-05-28.14-43.mp4

@nyalldawson nyalldawson reopened this May 28, 2024
Copy link

github-actions bot commented May 28, 2024

Plugin ready!

A test version of this PR is available for testing here.

(Built from commit d2bdc83)

@ChrisLoer
Copy link
Contributor

Yeah, I think this is a backend issue, and I have an idea what it might be, but I'll have to investigate and get back to you.

@ChrisLoer
Copy link
Contributor

Just to confirm, are you only seeing it when you're creating a group with a single item? We have some oddities where under the hood a single "lone layer" is actually a layer within an invisible layer group. I think what's happening is that when the upload completes, the backend is seeing that there's a single layer in the group and it's hiding it. We should be able to make a change to avoid doing that in this case, but I'll need to check in with the guy who implemented the logic.

As a workaround, it might be possible to avoid creating groups with only one layer? (Although I know that's kind of odd logic)

@ChrisLoer
Copy link
Contributor

Just to keep you updated -- yes, this is an issue with single layer groups, so that's a potential workaround. I have a fix on the Felt side but I'm still working on getting the naming logic right in the different cases (e.g. "single layer name provided by API but upload has multiple datasets, and upload got moved into a different group before it finished"). So I'm not sure if I'll have a PR in by tomorrow, may be more like Monday.

@nyalldawson
Copy link
Collaborator Author

@ChrisLoer I just tested this morning, and things are working much better now, thanks! Something you've fixed on the backend has improved things here.

@nyalldawson nyalldawson changed the title Attempt to create layer groups when uploading maps Create layer groups when uploading maps Jun 2, 2024
@ChrisLoer
Copy link
Contributor

Yup! From email, it was three things (well really two that were relevant to this use case):

OK, so I ended up finding and fixing three layer-group related bugs (thanks for exposing them!), although you were only running into two of them:

When you move a layer into another group after uploading it, we no longer:
- make the group disappear when upload finishes
- rename the upload to the default name from the pipeline
- (in the case where the upload has multiple datasets, shouldn't happen with QGIS) duplicate all the layers except for the first layer (this was a surprising and gnarly one!)

Upshot is your layer grouping PR should work much better now (I haven't tested myself yet, but it shouldn't need any changes).

@nyalldawson nyalldawson merged commit e386588 into main Jun 4, 2024
12 checks passed
@nyalldawson nyalldawson deleted the layer_groups branch June 4, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants