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

[UNO-817] Paragraph view mode theme suggestion #433

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

orakili
Copy link
Contributor

@orakili orakili commented Jan 24, 2024

Refs: UNO-817

This does 2 things:

It adds a theme suggestion to have more granularity with the templates for the paragraph with a view mode field.

So for example, one could create a paragraph--reliefweb-river--preview--resources.html.twig template for "reliefweb river" paragraph types with the "resources" view mode to use when displayed in the form ("preview" view mode).

It also adds a class in the claro subtheme's "reliefweb river" paragraph template to help with the styling:

Screenshot 2024-01-24 at 11 18 45

Note: the class addition above applies to all the reliefweb river paragraphs. To only add the class to the resources view mode, one can create a paragraph--reliefweb-river--preview--resources.html.twig in the claro subtheme and copy the code from paragraph--reliefweb-river.html.twig and remove the change from 8b07054.

@orakili orakili requested a review from left23 January 24, 2024 02:38
@orakili orakili mentioned this pull request Jan 24, 2024
Copy link

Coverage Report

Totals Coverage

Copy link

Build output

Composer Validate success

PHP Lint success

Docker Build success

Environment Setup success

Site Install success

PHP Code Sniffer success

Software Versions PHP 8.2.14 (cli) (built: Dec 21 2023 20:19:50) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.14, Copyright (c) Zend Technologies with Zend OPcache v8.2.14, Copyright (c), by Zend Technologies with Xdebug v3.3.0, Copyright (c) 2002-2023, by Derick Rethans Composer version 2.6.6 2023-12-08 18:32:26
Drupal Logs

Pusher: @orakili, Action: pull_request, Workflow: Run tests

Copy link
Contributor

@left23 left23 left a comment

Choose a reason for hiding this comment

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

Great, thanks! I'll leave the more generic override in place for all rivers, as it augments the UI in all cases.

@left23 left23 merged commit 161b185 into UNO-817 Jan 24, 2024
1 check passed
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