Skip to content

[Admin] Use Rails.application.mounted_helpers in base component#6039

Merged
tvdeyen merged 2 commits intosolidusio:mainfrom
mamhoff:use-mounted-helpers
Jan 7, 2025
Merged

[Admin] Use Rails.application.mounted_helpers in base component#6039
tvdeyen merged 2 commits intosolidusio:mainfrom
mamhoff:use-mounted-helpers

Conversation

@mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Dec 18, 2024

Rather than implementing routing proxies ourselves, we can use what Rails offers.

Fixes #6038

@mamhoff mamhoff requested a review from a team as a code owner December 18, 2024 16:07
@kennyadsl
Copy link
Member

I don't understand if failures are strictly related but it seems like it's the case.

@mamhoff
Copy link
Contributor Author

mamhoff commented Dec 18, 2024

Absolutely related. Will look into it tomorrow.

@mamhoff
Copy link
Contributor Author

mamhoff commented Dec 20, 2024

The failures were related, and fixed by the second commit in this PR.

@mamhoff mamhoff force-pushed the use-mounted-helpers branch from d72496f to 2013817 Compare January 3, 2025 15:31
Rather than implementing routing proxies ourselves, we can use what
Rails offers.

Fixes solidusio#6038
Rails' `mounted_helpers` do not work when a component is initialized.
They need to be called when the component is rendered. This change moves
the rendering of tabs from initialization time to render time.
@codecov
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.59%. Comparing base (9aa24a5) to head (c73de73).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6039      +/-   ##
==========================================
- Coverage   89.59%   89.59%   -0.01%     
==========================================
  Files         791      791              
  Lines       18269    18266       -3     
==========================================
- Hits        16368    16365       -3     
  Misses       1901     1901              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tvdeyen tvdeyen merged commit 85a0a25 into solidusio:main Jan 7, 2025
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.

Errors running in Production mode config.eager_load = true

4 participants