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

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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

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.

2 participants