Closed (fixed)
Project:
radix
Version:
6.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2024 at 16:14 UTC
Updated:
9 Jan 2025 at 13:17 UTC
Jump to comment: Most recent
page-content.twig has some hardcoded classes. Causing the need to keep replace the component. The 'page' component is more commonly replaced. This leads to the need to replace both 'page' and 'page-content'.
It would be better to move the classes to the page.twig component, as part of the properties. This will improve page-content.twig making it more generic and reusable.
No, existing site should not be affected.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ckng- Removed classes from page-content.twig, moved to page.twig as properties.
- Fixed 'container' property checking. Was not working for `false` and `''` cases, although specified in the schema as part of the `enum`.
Comment #4
ckngComment #5
doxigo commentedThanks a lot ckng for the MR, all is valid but I wonder why did we change this part:
into:
also the same for
page_content_container_classesand if we are to pass
page_content_container_type: false, isn't that better to set it to false at the source? also I rather keep the container but to remove it. setting it to false gets rid of it.I got rid of the
py-5class as you suggested from thepage-contentand passed it from thepage.twig, let me know if this suffice or you think we need more adjustments.marking this as fixed, feel free to re-open, thanks
Comment #7
ckngdoxigo, the codes changes for `page_header_container_classes` and `page_content_container_classes` are due to setting `page_header_container_type: false` or ``page_header_container_type: ''` were not working.
In the page-content.component.yml:
Since we're supporting `false`, `''`, we're unable to use the `page_header_container_type|default` nor `page_header_container_type is empty` checks, as `null`, `false`, `''` are different. Hence the verbose check on `null` first then `is empty` to cover `false` and `''`. The patch fixes all 3 cases.
Comment #9
hosisam commentedThanks ckng, Your adjustments make sense in handling cases where
page_header_container_typeis set tofalseor anemptystring. It's important to have those checks in place to maintain consistency and avoid any unexpected behavior. Overall, I'm satisfied with the changes you've made, and I agree with merging the MR.Comment #10
hosisam commented