Only emit dev tools markup when debug mode is enabled - #118
Merged
Conversation
`reactionview_dev_tools_markup` gated its meta tags and the dev tools script on `debug_mode_enabled?`, but the `data-herb-dismiss-hint` template was gated only on `validation_mode == :overlay`. That is the default outside of test, so the hint was injected into every layout in production, mailer layouts included. Browsers never render the contents of a `<template>`, so this stayed invisible on the web. Email clients strip the tag but keep its text, which put "You can also disable this overlay by setting config.validation_mode = :none" at the top of production emails. The hint is only ever read by `getDismissHint()` in `@herb-tools/dev-tools`, which runs while the dev tools bundle renders an overlay, and that bundle is only loaded in debug mode. It also falls back to a generic message when the template is absent, so nothing is lost by leaving it out. Resolves #95
marcoroth
force-pushed
the
fix-validation-hint-in-emails
branch
from
August 8, 2026 03:50
1ccd214 to
732a5bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes the ReActionView dismiss hint rendering as visible text at the top of production emails.
reactionview_dev_tools_markupgated its meta tags and the dev tools script tag ondebug_mode_enabled?, but the dismiss hint sat outside that block, gated only on the validation mode::overlayis the default outside of test, so with the recommendedconfig.debug_mode = Rails.env.development?the hint was still injected into every layout in production, includinglayouts/mailer.html.erb.Browsers never render the contents of a
<template>, which is why this was invisible on the web and went unnoticed. Email clients do not implement<template>, so they discard the tag and keep the text inside it and display it.Resolves #95