citizensadvice / design-system

Citizens Advice Design System
https://citizens-advice-design-system.netlify.app/
Apache License 2.0
31 stars 7 forks source link

Docs website: Upgrade view_component with patch #3503

Closed davidrapson closed 3 weeks ago

davidrapson commented 1 month ago

Upgrades view_component in the docs website with an additional compatibility patch.

In version 3.15+ the docs build fails with the following error:

undefined method `controller' for an instance of Bridgetown::ERBView

This is similar to the error that was patched in #3362 but likely resurfacing because we applied the narrowest possible monkey patch originally.

Adjusts our patch for Bridgetown compatibility with view_component. Substituting in a controller covers what the library expects to be present.

Using Bridgetown::ViewComponentHelpers also conflicts with the presence of a request object. It turns out we don't need this for our use case so remove the include rather than attempting to patch around it.

github-actions[bot] commented 1 month ago

🚀 Netlify deployed citizens-advice-design-system as draft

https://670395b97e274157a03fc7d7--citizens-advice-design-system.netlify.app

github-actions[bot] commented 3 weeks ago

🚀 Netlify deployed citizens-advice-design-system as draft

https://6710c38a52dd3fb6fbe31692--citizens-advice-design-system.netlify.app