Skip to content

Conversation

@erikscottmeyer
Copy link
Contributor

@erikscottmeyer erikscottmeyer commented Nov 26, 2025

Closes #4804
Closes #5065

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch 2 times, most recently from 4106a73 to e08b448 Compare November 26, 2025 15:13
@erikscottmeyer erikscottmeyer changed the title (#4844) Add Embed Block External Link Block to Article (#4804) Add Embed Block External Link Block to Article Nov 26, 2025
@erikscottmeyer
Copy link
Contributor Author

Reopengin PR; commit had problem with message

@erikscottmeyer erikscottmeyer changed the title (#4804) Add Embed Block External Link Block to Article (#4804) Add Embed Block Content Block and raw HTML Block to Article Dec 1, 2025
@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from e08b448 to 2b0544e Compare December 2, 2025 21:19
@erikscottmeyer
Copy link
Contributor Author

/test/cgov-article-testing-embedded-raw-html-blocks

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 2b0544e to 804d593 Compare December 8, 2025 15:23
@erikscottmeyer erikscottmeyer changed the base branch from feature/redesign-r4.2 to feature/redesign-r4.2-2 December 9, 2025 15:18
@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch 2 times, most recently from 85c575d to 6a9b3b0 Compare December 11, 2025 01:51
@cgdp-management-server
Copy link

ODE Deployment

Code has been deployed to ODE 1053.

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch 2 times, most recently from 88e2ff5 to 2deb660 Compare December 11, 2025 16:53
@andyvanavery31 andyvanavery31 requested review from a team December 11, 2025 18:40
@andyvanavery31
Copy link

This passes the Raw HTML addition, but we will bring #5065 back into this PR to add both the Content Block and Raw HTML together. This will be rereviewed following the update to the Content Block.

@alinai
Copy link

alinai commented Dec 11, 2025

@andyvanavery31 , @erikscottmeyer ,
Noticing change in the positioning of the Full WYSIWYG icons on the ODE (compared to dev-ac)

image

@KateMashkinaNIH
Copy link

Alignment does not work - all options display block as left aligned

@alinai
Copy link

alinai commented Dec 12, 2025

@erikscottmeyer , confirmed that icon positioning will be fixed with the Content Block PR. Confirmed that the alignment (None, Left, Center, Right) will not work for Raw HTML Block at the front end. Confirmed with @andyvanavery31 , that the spacing issue and the look and feel of links, buttons are inconsistent with dev-ac as raw HTML block is using legacy html which isn't supported.

@alinai
Copy link

alinai commented Dec 12, 2025

Rest looks good

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 4656211 to 7431b93 Compare December 12, 2025 17:34
@erikscottmeyer
Copy link
Contributor Author

Test page for content block embeds:
/test/cgov-article-testing-content-block-embeds

@adrianacastaneda
Copy link

@erikscottmeyer Like we discussed the alignment doesn't change no matter which option you choose for content blocks— which is the way this currently functions so that's okay. But it did have some effects to the display in the WYSIYWG:
Screenshot 2025-12-12 at 3 09 50 PM
Screenshot 2025-12-12 at 3 09 57 PM

Same for the raw HTML block, but the alignment is even more pronounced on the WYSIYWG:
Screenshot 2025-12-12 at 3 11 51 PM

Screenshot 2025-12-12 at 3 11 59 PM Screenshot 2025-12-12 at 3 12 08 PM

cc: @andyvanavery31

Copy link
Member

@bryanpizzillo bryanpizzillo left a comment

Choose a reason for hiding this comment

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

The changes for this PR should not be affecting legacy content. By changing the configurations for insert_block_content the legacy pages (biography, press release, etc) are no longer able to insert External Cards into the WYSIWYG. Additionally you cannot changes the options for existing embedded cards such as on https://ncigovcdode1053.prod.acquia-sites.com/test/biography-feature-card-embed-test-page. (If you click the pencil on any external cards, a console error appears)

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 7431b93 to 2e797b7 Compare December 12, 2025 22:30
@adrianacastaneda
Copy link

Looks good. Gets the IA checkmark

@alinai
Copy link

alinai commented Dec 15, 2025

On legacy Press Release, Blog Post, Event, I am not seeing any External link Block icon (which I guess is expected?) as a separate icon and not seeing all drop-down options as we used to see in all legacy (previous) Full WYSIWYG under "Insert Block Content" icon. So the legacy (blogpost, press release, event, etc) Full WYSIWYG is a combination of old Full WYSIWYG (that External Link Block icon is not displayed separately) and new NCIDS Full WYSIWYG (which displays only Content Block, Raw HTML Block under "Insert Content Block" icon).

image image

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch 2 times, most recently from d6e67df to f35a643 Compare December 15, 2025 22:27
Copy link
Member

@bryanpizzillo bryanpizzillo left a comment

Choose a reason for hiding this comment

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

There are still some wonky dependencies being pulled in.

core_version_requirement: '^10 || ^11'
dependencies:
- 'cgov_core:cgov_core'
- 'cgov_site_section:cgov_site_section'
Copy link
Member

Choose a reason for hiding this comment

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

Why does content block require site section? It should not.

package: 'CGov Digital Platform'
description: 'CGov Core Components (used by the CGov Site install profile)'
core_version_requirement: '^9.4 || ^10'
core_version_requirement: '^10 || ^11'
Copy link
Member

Choose a reason for hiding this comment

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

I think this file can be reverted.

package: 'CGov Digital Platform'
description: 'The Content Block content type'
core_version_requirement: '^9.4 || ^10'
core_version_requirement: '^10 || ^11'
Copy link
Member

Choose a reason for hiding this comment

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

I assume features did this?

display_review: false
icon:
uri: 'public://embed_buttons/embed_block.svg'
data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MDAgNjAwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzMzMztzdHJva2Utd2lkdGg6MHB4O308L3N0eWxlPjwvZGVmcz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjQ2IiB5PSI0MC40NSIgd2lkdGg9IjIyNyIgaGVpZ2h0PSI1MjIiIHJ4PSI4IiByeT0iOCIvPjxyZWN0IGNsYXNzPSJjbHMtMSIgeD0iMzEzIiB5PSI0MC40NSIgd2lkdGg9IjI0MiIgaGVpZ2h0PSIxNzIiIHJ4PSI4IiByeT0iOCIvPjxyZWN0IGNsYXNzPSJjbHMtMSIgeD0iMzEzIiB5PSIyNTYuNDUiIHdpZHRoPSIyNDIiIGhlaWdodD0iMzA2IiByeD0iOCIgcnk9IjgiLz48L3N2Zz4=
Copy link
Member

Choose a reason for hiding this comment

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

Please reference the icon like we do for the other buttons... https://github.com/NCIOCPL/cgov-digital-platform/blob/f35a6438486bbd5b1f6ec8c02b8500704107ba96/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/embed.button.insert_block_content.yml

It has something to do with reinstalling or something like that... The module:// reference means it can load from this module.

package: 'CGov Digital Platform'
description: 'Embeddable block content support'
core_version_requirement: '^9.4 || ^10'
core_version_requirement: '^10 || ^11'
Copy link
Member

Choose a reason for hiding this comment

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

I take it this is another features feature?

core_version_requirement: '^9.4 || ^10'
core_version_requirement: '^10 || ^11'
dependencies:
- 'cgov_blog:cgov_blog'
Copy link
Member

Choose a reason for hiding this comment

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

These dependencies are off. We should not be requiring all these cgov_ modules.

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from f35a643 to 5271807 Compare December 16, 2025 17:58
@andyvanavery31
Copy link

This PR passes Product Testing again.

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch 3 times, most recently from c1114f4 to 9c5e730 Compare December 18, 2025 16:51
@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 9c5e730 to 515acaf Compare December 18, 2025 17:01
@bryanpizzillo
Copy link
Member

@erikscottmeyer I am seeing a ton of the following errors when logged as an admin when I view pages clicking from the content list. (So login, and view http://www.devbox/test/biography-image-embed-test-page. I did it by going to the content list and finding the page.

Warning: Undefined array key "#block_content" in ncids_trans_theme_suggestions_entity_embed_container_alter() (line 180 of profiles/custom/cgov_site/themes/custom/ncids_trans/ncids_trans.theme).
ncids_trans_theme_suggestions_entity_embed_container_alter() (Line: 458)
Drupal\Core\Theme\ThemeManager->alterForTheme() (Line: 467)
Drupal\Core\Theme\ThemeManager->alter() (Line: 394)
Drupal\Core\Theme\ThemeManager->buildThemeHookSuggestions() (Line: 220)
Drupal\Core\Theme\ThemeManager->render() (Line: 546)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 225)
Drupal\entity_embed\Plugin\Filter\EntityEmbedFilter->Drupal\entity_embed\Plugin\Filter\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 224)
Drupal\entity_embed\Plugin\Filter\EntityEmbedFilter->process() (Line: 123)
Drupal\filter\Element\ProcessedText::preRenderText()
call_user_func_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 886)
Drupal\Core\Render\Renderer->doCallback() (Line: 431)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 48)
__TwigTemplate_718ea268b881c271f2ed15ef532ec2ad->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 207)
__TwigTemplate_b10ab66d1ee34e5a4deeea92e70d1127->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 231)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

* Add theme suggestions for entity embed container.
*/
function ncids_trans_theme_suggestions_entity_embed_container_alter(array &$suggestions, array $variables) {
if (!$variables['element']['entity']['#block_content']) {
Copy link
Member

Choose a reason for hiding this comment

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

Ok, yeah, so if we embed media or nodes this would break. I assume you want

if (empty($variables['element']['entity']['#block_content'])) {

@erikscottmeyer erikscottmeyer force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 515acaf to cf32228 Compare December 18, 2025 18:04
@bryanpizzillo bryanpizzillo force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from cf32228 to 52a88dd Compare December 18, 2025 21:55
@bryanpizzillo bryanpizzillo force-pushed the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch from 52a88dd to 3eeb769 Compare December 18, 2025 22:14
@andyvanavery31
Copy link

Confirmed the latest changes are correct and this is still approved.

@bryanpizzillo bryanpizzillo merged commit 668777e into feature/redesign-r4.2-2 Dec 19, 2025
8 checks passed
@bryanpizzillo bryanpizzillo deleted the ticket/4804-add-embed-block--content-block--and-raw-html--ncids-full-WYSIWYG--Article branch December 19, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

7 participants