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

Editor / Associated resource / Update panel based on type config #8052

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

fxprunayre
Copy link
Member

If one config was using the metadataStore source, then this source was never hidden when other types are opening the panel.

Follow up of #7669

eg. in the following config, linkToParent allows metadataStore source, but opening linkToPlatform will also show it even if it is only configured with DOI or remote URL sources.

<section>

          <action type="associatedResource"
                  name="linkToParent"
                  btnClass="fa gn-icon-series"
                  process="siblings">
            <directiveAttributes>{"fields": {"associationType": "largerWorkCitation", "initiativeType": "" },
              "sources": {"metadataStore": {"params": {"isTemplate": "n"}},
              "remoteurl": {"multiple": true}
              }}</directiveAttributes>
          </action>


          <action type="associatedResource"
                  name="sextant-linkToPlatform"
                  btnClass="fa fa-ship"
                  process="siblings">
            <directiveAttributes>{"fields": {"associationType": "crossReference", "initiativeType": "platform" },
              "sources": {"doiapi": {"url": "https://api.datacite.org/dois",
              "params": {"prefix": "10.17600", "query": "titles.title:{query}* OR doi:{query}"}}
              }}</directiveAttributes>
          </action>

          <directive data-gn-associated-resources-panel="gnCurrentEdit.metadata"
                     data-editor-config="sextant"/>
        </section>

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Funded by Ifremer

If one config was using the `metadataStore` source, then this source was never hidden when other types are opening the panel.

Follow up of #7669


eg. in the following config, `linkToParent` allows `metadataStore` source, but opening `linkToPlatform` will also show it even if it is only configured with DOI or remote URL sources.

```xml
<section>

          <action type="associatedResource"
                  name="linkToParent"
                  btnClass="fa gn-icon-series"
                  process="siblings">
            <directiveAttributes>{"fields": {"associationType": "largerWorkCitation", "initiativeType": "" },
              "sources": {"metadataStore": {"params": {"isTemplate": "n"}},
              "remoteurl": {"multiple": true}
              }}</directiveAttributes>
          </action>


          <action type="associatedResource"
                  name="sextant-linkToPlatform"
                  btnClass="fa fa-ship"
                  process="siblings">
            <directiveAttributes>{"fields": {"associationType": "crossReference", "initiativeType": "platform" },
              "sources": {"doiapi": {"url": "https://api.datacite.org/dois",
              "params": {"prefix": "10.17600", "query": "titles.title:{query}* OR doi:{query}"}}
              }}</directiveAttributes>
          </action>

          <directive data-gn-associated-resources-panel="gnCurrentEdit.metadata"
                     data-editor-config="sextant"/>
        </section>
```
@fxprunayre fxprunayre added this to the 4.4.5 milestone May 16, 2024
@fxprunayre fxprunayre requested a review from josegar74 May 16, 2024 11:58
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

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

Tested, works fine.

@josegar74 josegar74 merged commit 2070e5f into main Jun 3, 2024
9 checks passed
@fxprunayre fxprunayre deleted the 44-associatedpanel-popupsources branch June 3, 2024 09:49
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.

None yet

2 participants