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

DEV: Resolve a compatibility issue in core with CustomHtml component #54

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

Arkshine
Copy link
Contributor

@Arkshine Arkshine commented Mar 12, 2024

Meta: https://meta.discourse.org/t/right-sidebar-blocks/231067/79?u=arkshine

Users have reported an issue with the custom-html option and their footer disappearing.

The theme component includes a custom-html template, while the core also has a custom-html component for displaying the custom footer HTML through the layout dynamic property (EDIT: there are others places). As a result, the theme's component overrides the layout.

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/custom-html.js
https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/templates/application.hbs#L97-L102

This PR renames the component and uses block.internalName for the component name but keeps the block.name untouched for compatibility.

Hopefully, the changes make sense!

Copy link

@pushpinder6805 pushpinder6805 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Arkshine, nice fix!

@Arkshine
Copy link
Contributor Author

Naming is arguably the most challenging part. 🙂 Thanks, Penar!

@pmusaraj pmusaraj merged commit 6d35296 into discourse:main Mar 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants