Skip to content

#11143: Use another layer as input for attribute table dropdown#11152

Merged
dsuren1 merged 5 commits intogeosolutions-it:masterfrom
mahmoudadel54:issue_11143
Jun 11, 2025
Merged

#11143: Use another layer as input for attribute table dropdown#11152
dsuren1 merged 5 commits intogeosolutions-it:masterfrom
mahmoudadel54:issue_11143

Conversation

@mahmoudadel54
Copy link
Copy Markdown
Contributor

Description

This PR introduces a new capability within the FeatureEditor plugin to handle fetching/paginated and displaying unique attribute values from a specified source layer for use in editing attributes of another (target) layer. This is achieved by introducing a new rule with the editor key CustomAutocompleteEditor within cfg.customEditorsOptions.rules.

Configuration Example:

{
            "name": "FeatureEditor",
            "cfg": {
                "customEditorsOptions": {
                    "rules": [{
                        "regex": {
                            "attribute": "SUB_REGION",
                            "typeName": "gs:us_states"
                        },
                        "editor": "CustomAutocompleteEditor",
                        "editorProps": {
                            "filterProps": {
                            "blacklist": [],
                            "maxFeatures": 3,
                            "queriableAttributes": ["COMUNE"],
                            "predicate": "ILIKE",
                            "typeName": "test:Linea_costa"
                            }
                        }
                    }]
                }
            }
          },

The PR includes:

  • create CustomAutocompleteEditor component to be used for the new requirements [fetching/displaying atrribute values from layer to be used in another layer]. A new editor designed to leverage a configurable stream for fetching autocomplete suggestions for feature attribute fields.
  • create custom stream 'createCustomPagedUniqueAutompleteStream' to fetch values
  • add unit tests

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

#11143

What is the current behavior?

#11143

What is the new behavior?

User can now define rules into FeatureEditor plugin in localConfig.json to specify an external source layer and attribute from which autocomplete suggestions are fetched to be used in add new feature or edit an existing feature.

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

…om layer to be used in another layer

- create CustomAutocompleteEditor component to be used for the new requirements [fetching/displaying atrribute values from layer to be used in another layer]
- create custom stream 'createCustomPagedUniqueAutompleteStream' to fetch values
- add unit tests
@mahmoudadel54 mahmoudadel54 added this to the 2025.02.00 milestone May 29, 2025
@mahmoudadel54 mahmoudadel54 requested a review from dsuren1 May 29, 2025 10:50
@mahmoudadel54 mahmoudadel54 self-assigned this May 29, 2025
@mahmoudadel54 mahmoudadel54 added the New Feature used for new functionalities label May 29, 2025
@mahmoudadel54 mahmoudadel54 marked this pull request as ready for review May 29, 2025 10:50
@mahmoudadel54 mahmoudadel54 linked an issue May 29, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@dsuren1 dsuren1 left a comment

Choose a reason for hiding this comment

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

@mahmoudadel54
The changes look fine. Could you also update the FeaturePlugin with this configuration as an example, detailing the props, similar to what’s described in the documentation?

@mahmoudadel54
Copy link
Copy Markdown
Contributor Author

@mahmoudadel54 The changes look fine. Could you also update the FeaturePlugin with this configuration as an example, detailing the props, similar to what’s described in the documentation?

done

@mahmoudadel54 mahmoudadel54 requested a review from dsuren1 June 11, 2025 08:47
@dsuren1 dsuren1 enabled auto-merge (squash) June 11, 2025 11:23
@dsuren1
Copy link
Copy Markdown
Contributor

dsuren1 commented Jun 11, 2025

@ElenaGallo Kindly test it in DEV, when available. Thanks!

@dsuren1 dsuren1 merged commit dd3c00b into geosolutions-it:master Jun 11, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature used for new functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use another layer as input for attribute table dropdown

2 participants