Skip to content

Add support for copying and pasting features in the feature grid#10563

Open
mdelsinne44 wants to merge 3 commits intogeosolutions-it:masterfrom
mdelsinne44:copy-paste-features
Open

Add support for copying and pasting features in the feature grid#10563
mdelsinne44 wants to merge 3 commits intogeosolutions-it:masterfrom
mdelsinne44:copy-paste-features

Conversation

@mdelsinne44
Copy link

@mdelsinne44 mdelsinne44 commented Sep 19, 2024

Description

  • Implemented copyFeatures epic to handle the COPY_FEATURES action:
    • Retrieves the current state from the store.
    • Uses to get the selected features.
    • Stores the selected features in localStorage as a JSON string to facilitate copying to the clipboard.
  • Implemented pasteFeature epic to handle the PASTE_FEATURES action:
    • Currently returns an empty observable, ready for future implementation.
    • Will retrieve the copied features from localStorage for pasting.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#10566

What is the new behavior?

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

- Implemented [`copyFeatures`] epic to handle the COPY_FEATURES action:
  - Retrieves the current state from the store.
  - Uses to get the selected features.
  - Stores the selected features in [`localStorage`] as a JSON string to facilitate copying to the clipboard.
- Implemented [`pasteFeature`] epic to handle the PASTE_FEATURES action:
  - Currently returns an empty observable, ready for future implementation.
  - Will retrieve the copied features from [`localStorage`] for pasting.
@tdipisa
Copy link
Member

tdipisa commented Sep 20, 2024

@mdelsinne44 thank you so much for contributing to MapStore. Is there an issue related to this?

@mdelsinne44
Copy link
Author

@mdelsinne44 thank you so much for contributing to MapStore. Is there an issue related to this?

No, I don't think so. It's an enhancement I developed to meet a client's need, allowing entities to be copied from one layer to another. For example, from a shapefile to a WFS layer. The functionality allows copying the geometry as well as all the corresponding fields from one layer to another.

@tdipisa
Copy link
Member

tdipisa commented Sep 20, 2024

@mdelsinne44 thank you so much for contributing to MapStore. Is there an issue related to this?

No, I don't think so. It's an enhancement I developed to meet a client's need, allowing entities to be copied from one layer to another. For example, from a shapefile to a WFS layer. The functionality allows copying the geometry as well as all the corresponding fields from one layer to another.

Thank you @mdelsinne44 for the feedback. If you can, please open an issue to describe the feature and put a link in PR description as indicated by the PR template. If you cannot, don't worry, we will do it for you just before the review. Thank you so much again for contributing to MapStore.

@tdipisa
Copy link
Member

tdipisa commented Sep 20, 2024

@mdelsinne44 one of our checks is failing due to missing mandatory translations it seems. Can you fix it?

@mdelsinne44
Copy link
Author

@mdelsinne44 one of our checks is failing due to missing mandatory translations it seems. Can you fix it?

I think it's good for the translations

@tdipisa tdipisa requested review from MV88 and allyoucanmap and removed request for MV88 and offtherailz January 15, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants