Skip to content

Show ActionText HTML content in deduper preview#1024

Merged
maebeale merged 2 commits intoadd-workshop-deduperfrom
copilot/sub-pr-1007
Feb 15, 2026
Merged

Show ActionText HTML content in deduper preview#1024
maebeale merged 2 commits intoadd-workshop-deduperfrom
copilot/sub-pr-1007

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

What is the goal of this PR and why is this important?

Display formatted ActionText content in the deduper instead of stripped plain text for has_rich_text fields.

How did you approach the change?

Modified app/views/dedupes/_preview.html.erb:

  • Delete column: Render ActionText object directly (<%= delete_rt %>) to show formatted content
  • Keep column: Display HTML source in textarea (keep_rt&.body&.to_s) for editing without WYSIWYG
  • Comparison: Compare HTML bodies instead of plain text for difference detection

Example change:

# Before: stripped plain text
<% delete_body = record_to_delete.public_send(rt_attr)&.to_plain_text.presence %>
<p><%= delete_body %></p>

# After: rendered HTML content
<% delete_rt = record_to_delete.public_send(rt_attr) %>
<div><%= delete_rt %></div>

Anything else to add?

Rails ActionText handles sanitization automatically. Form submission works unchanged—the controller already permits rich text attributes via rich_text_attribute_names(mc).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copilot AI changed the title [WIP] Update to dedupe workshops implementation Show ActionText HTML content in deduper preview Feb 15, 2026
Copilot AI requested a review from maebeale February 15, 2026 13:51
@maebeale maebeale marked this pull request as ready for review February 15, 2026 21:34
@maebeale maebeale merged commit 1f0e8cb into add-workshop-deduper Feb 15, 2026
@maebeale maebeale deleted the copilot/sub-pr-1007 branch February 15, 2026 21:34
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