Skip to content

Separate Dataset buttons form metadata field#306

Merged
drudoi merged 4 commits into1.1.xfrom
dataset-buttons-pseudo-field
Feb 19, 2026
Merged

Separate Dataset buttons form metadata field#306
drudoi merged 4 commits into1.1.xfrom
dataset-buttons-pseudo-field

Conversation

@xleafx
Copy link
Collaborator

@xleafx xleafx commented Feb 18, 2026

No description provided.

@xleafx xleafx requested a review from drudoi February 18, 2026 18:51
@xleafx xleafx force-pushed the dataset-buttons-pseudo-field branch from b91acd4 to 4af02fa Compare February 18, 2026 18:55
@drudoi
Copy link
Collaborator

drudoi commented Feb 19, 2026

Please check hooks in quanthub_download_button.module - do we need it?

'#attached' => [
'library' => [
'quanthub_download_button/download-button',
'quanthub_metadata_button/metadata-button',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using "quanthub_download_button" and "quanthub_metadata_button" libraries you make a dependency from the modules, when the core module should be independent from the additions.

What can be done:

Option 1 (the best):
Each of the modules "quanthub_download_button" and "quanthub_metadata_button" defines own field. You don't create a template for its, just outputs "#type" => "container", "#attributes" => ..., and you use node--dataset.html.twig in the theme to provide container and other structure.

Option 2 (quick):
You move the libraries definitions to the quanthub_core module and mark outdated modules as deprecated.

Option 3 (compromise):
You don't attach the libraries here, and create a minimal template in the module. And real template and libraries attachment goes to theme.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So, I implemented option 3. Created the basic and a real template. Please check it.

@xleafx
Copy link
Collaborator Author

xleafx commented Feb 19, 2026

Please check hooks in quanthub_download_button.module - do we need it?

You are right, we don’t need this anymore. Removed.

@drudoi drudoi merged commit 1f26204 into 1.1.x Feb 19, 2026
1 check passed
@drudoi drudoi deleted the dataset-buttons-pseudo-field branch February 19, 2026 15:41
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.

2 participants