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

[v4.2] Fix unsafe html view component, allow ViewComponent 3.21+ #6072

Open
wants to merge 1 commit into
base: v4.2
Choose a base branch
from

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 15, 2025

Backport

This will backport the following commits from main to v4.2:

Questions ?

Please refer to the Backport tool documentation

@tvdeyen tvdeyen requested a review from a team as a code owner January 15, 2025 16:20
@tvdeyen tvdeyen added backport-v4.1 Backport this pull-request to v4.1 backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 changelog:solidus_admin labels Jan 15, 2025
@tvdeyen tvdeyen removed backport-v4.1 Backport this pull-request to v4.1 backport-v4.2 Backport this pull-request to v4.2 backport-v4.3 Backport this pull-request to v4.3 backport-v4.4 Backport this pull-request to v4.4 labels Jan 15, 2025
The mock component in the ComponentHelpers module was not a real
constant, which messes with ViewComponent's expectations about what
render_inline is given. Using `stub_const` in the helper allows us to
give it an actual name, and view_component > 3.21.0 will work for us.

The helper is only used in the base component spec. I could have spent
more time giving it an optional block, but this solution is the most
straightforward.

(cherry picked from commit 228ca12)

# Conflicts:
#	admin/lib/solidus_admin/testing_support/component_helpers.rb
#	admin/spec/components/solidus_admin/base_component_spec.rb
@tvdeyen tvdeyen force-pushed the backport/v4.2/pr-6055 branch from 2cf0352 to ffcddbe Compare January 15, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants