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

Expose dataset properties as pseudo/extra fields #4115

Open
stefan-korn opened this issue Feb 9, 2024 · 8 comments
Open

Expose dataset properties as pseudo/extra fields #4115

stefan-korn opened this issue Feb 9, 2024 · 8 comments
Assignees

Comments

@stefan-korn
Copy link
Contributor

User Story

One might find it beneficial to expose the dataset properties as pseudo/extra fields to use them in the display mode settings of data content type at admin/structure/types/manage/data/display

Remark: To use this, one would need to change/override the template modules/metastore/templates/node--data.html.twig

Acceptance Criteria

Show properties of dataset at admin/structure/types/manage/data/display and output them if configured.

@dafeder
Copy link
Member

dafeder commented Apr 5, 2024

Taking a look at this -- in general I'm wary of making promises of integrating with Drupal field system that will be too difficult/complex to keep with different kinds of schemas. But I'll reserve judgement till I've taken your PR for a spin :)

@dafeder dafeder self-assigned this Apr 5, 2024
@stefan-korn
Copy link
Contributor Author

@dafeder : I understand that you are wary of this.

But if one plans to use heavily customized schema (and not planning to use the React frontend) the preprocessing at metastore_preprocess_node__data and the fixed node template seems kind of very hardcoded and lack flexibility imho. Getting the schema properties back in the Drupal fields with using the Search API implementation seems very flexible to me, so I would at least like to share this with you. We can realize a few things with this solution very easy without doing too much hardcoding.

@swirtSJW
Copy link
Contributor

I see a real power in this, especially as it paves the way for being able to surface JSON Metadata elements in Views.

@stefan-korn
Copy link
Contributor Author

I need a somehow more sophisticated version of this (providing labels, etc.). So I will be going with a separate module for now. Will mention the module in the discussions section later on.

@dafeder
Copy link
Member

dafeder commented Jun 12, 2024

Yes interested to see what you're doing @stefan-korn. Perhaps we should keep the issue open but close your PR #4116 for now?

@stefan-korn
Copy link
Contributor Author

@dafeder : Yes, makes sense to close PR. It surely has some difficulties and at least it clutters the Display View UI with a lot of fields. So this should probably not something that is active by default, but only as needed. So I will be going forward with the module and if at some point, there is an interest of getting this in DKAN core, we can see / talk.

@swirtSJW : Thanks for your input and I do agree that there is some power in this :-) Though for views, extra fields are not directly helpful, at least not if you use a field based view display.

@stefan-korn
Copy link
Contributor Author

The module is already there: https://www.drupal.org/project/dkan_extra_fields - but still a dev version, therefore I did not mention in Discussions yet.

@dafeder
Copy link
Member

dafeder commented Jun 12, 2024

I don't think it needs a 1.0 release to share in discussions but up to you! Will check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants