-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Feature catalogue / Add table of content of feature types #8041
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and seems to work fine. The only thing that is confusing for users now is that when starting with an empty set of featureTypes, the dropdown is populated with an empty string when adding a featureType. This occurs as well when adding more afterwards (below are three featureTypes, the third one is empty and displayed as a collapsed).
d250d68
to
6331bfb
Compare
A feature catalogue can contain one or more feature types description. When describing a model with lots of feature types, then the editor can be quite large (and then can cause issue related to timeout or number of fields) The problem is quite similar to #7998 (ie. timeout, number of form fields). To better manage this case, make a list of existing feature types and user can click on it to edit only one feature type at a time. This is enable by default for ISO19110 and ISO19115-3 feature catalogue in all views. The first table is selected by default. A selector can be manually configured using the following: ```xml <section name="gfc:featureType"> <select name="Select a feature type" xpath="/gfc:FC_FeatureCatalogue/gfc:featureType" parameter="featureType" value="*/gfc:typeName/gco:LocalName/text()" layout="dropdown"/> <!--tabs|pills|dropdown--> <section xpath="/gfc:FC_FeatureCatalogue/gfc:featureType[ */gfc:typeName/gco:LocalName = $p2/featureType or (not($p2/featureType) and position() = 1) or ($p3 = 'md.format.html')]" or="featureType" in="/gfc:FC_FeatureCatalogue"/> </section> ``` `$p2` correspond to the variable `request` and `$p3` to the `service` in the XSL template (see `base-variables.xsl` and `evaluate.xsl`). So if there is no `featureType` parameter, the first feature type will be displayed. If the view mode is `md.format.html`, all feature types will be displayed. It has only been tested for feature catalogue but can be probably reuse in other places eg. conformity * Dropdown (default) * Tabs * Pills * Avoid JS error on large forms by using JQuery `empty()` instead of find and remove: ``` RangeError: Maximum call stack size exceeded at Sizzle.select (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:2592:12) at Function.Sizzle [as find] (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:869:9) at jQuery.fn.init.find (jquery-2.2.4.js?v=dc93b22fa65aadfbbe3d7ad69b4d5d83601574de:2792:11) at refreshForm (EditorService.js:324:42) ``` * ISO19110 to ISO19115-3 conversion / Convert cardinality to CharacterString
6331bfb
to
e6eac01
Compare
Quality Gate failedFailed conditions |
A feature catalogue can contain one or more feature types description. When describing a model with lots of feature types, then the editor can be quite large (and then can cause issue related to timeout or number of fields)
A good example https://metadata.vlaanderen.be/srv/dut/catalog.search#/metadata/f1e77b4f-a174-4e2d-9af7-fe7f548b5a5c
The problem is quite similar to #7998 (ie. timeout, number of form fields).
To better manage this case, make a list of existing feature types and user can click on it to edit only one feature type at a time.
Configuration
This is enable by default for ISO19110 and ISO19115-3 feature catalogue in all views. The first table is selected by default.
A selector could also be manually configured using the following:
$p2
correspond to the variablerequest
and$p3
to theservice
in the XSL template (seebase-variables.xsl
andevaluate.xsl
). So if there is nofeatureType
parameter, the first feature type will be displayed. If the view mode ismd.format.html
, all feature types will be displayed.It has only been tested for feature catalogue but can be probably reuse in other places eg. conformity
Layout
Other changes
empty()
instead of find and remove:Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentationFunded by Vlaanderen