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

Visualisation of local changes #397

Merged
merged 29 commits into from
Jun 7, 2022
Merged

Visualisation of local changes #397

merged 29 commits into from
Jun 7, 2022

Conversation

alexbruy
Copy link
Contributor

@alexbruy alexbruy commented May 5, 2022

Add an action "Show local changes" to the layer context menu toolbar button to open a "Diff viewer" dialog where one can examine local changes made in the project
зображення
If there are no changes in the project, a message bar will be shown, telling that there are no changes which can be visualised.
The "Changes Viewerer" dialog provides a tab-based UI, where each tab represents a local layer with changes. Changes in the layer will be shown on canvas and in the table form (splitted with a splitter).
зображення
Toolbar buttons allow user:

  • toggle display of project layers (on by default)
  • zoom to full extent of the changes layer
  • zoom to selected features of the changes layer
  • add currently displayed or all changes layers to project

All changes layers have styling applied and conditional formatting of the attribute table, to make it easier to see which values/features were updated/deleted/inserted.
зображення
зображення

A new button "View Changes" were added to the Sync Project dialog. Clicking on that button will close Sync Project dialog and open Changes Viewer.
зображення

Also add two new Processing tools: one for generating layer containing local changes and another one for generating layer containing changes between two versions of the layer.

@alexbruy alexbruy requested a review from wonder-sk May 5, 2022 12:35
@alexbruy
Copy link
Contributor Author

alexbruy commented May 5, 2022

Requires MerginMaps/python-api-client#134

@alexbruy
Copy link
Contributor Author

alexbruy commented May 5, 2022

@wonder-sk I'm not happy with the current workaround for removing memory layers and updating project. But unfortunately, I can't find other way of doing it.

@PeterPetrik PeterPetrik requested a review from varmar05 May 9, 2022 07:16
Mergin/processing/algs/create_diff.py Outdated Show resolved Hide resolved
Mergin/project_status_dialog.py Outdated Show resolved Hide resolved
Mergin/processing/algs/extract_local_changes.py Outdated Show resolved Hide resolved
@PeterPetrik
Copy link
Contributor

Would it be possible to have also processing alg too take 2 geopackage files and show the differences (think of resolving conflict files)?

@alexbruy
Copy link
Contributor Author

Would it be possible to have also processing alg too take 2 geopackage files and show the differences (think of resolving conflict files)?

Yes, we can implement something like this. Should this tool create diffs for all layers in the GeoPackage or user should select specific layer to process?

@alexbruy
Copy link
Contributor Author

@wonder-sk all comments should be addressed now. May I ask you to take a look when you have time?

Clicking on this button will create diff layers for all vector of the
Mergin project and close status dialog so user can explore diff layers
button with the dropdown menu
- increase symbology size/width to make changes more visible
- show project layers by default
- drop toolbar button and restore context menu action
Copy link
Contributor

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

Great stuff 🎉 ... I am happy with it

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.

4 participants