-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove TitlePart wrapper when it is hidden #15471
Remove TitlePart wrapper when it is hidden #15471
Conversation
src/OrchardCore.Modules/OrchardCore.Title/Views/ContentPart-TitlePart.Edit.cshtml
Outdated
Show resolved
Hide resolved
@douwinga PR is fine, did you actually face an issue with this empty wrapper? Or did you find the ticket and wanted to help fix it. |
@sebastienros Just trying to contribute to become a better developer. Was looking for a ticket I could finish on my lunch break. This was the first one I found. |
So we are hoping this doesn't break anything, the issue wasn't to fix an actual problem but something that looked odd. It's totally possible that some other feature was using (or could use in the future) these wrappers even if the shape was not rendered (e.g. content preview, placement, shape debugger, ...) |
Hmmm, I bet this change would actually cause an issue with admin templates and shape rendering. It would no longer obey the hide check. Should probably keep that check on the TitlePart.Edit. it seemed like an innocent change |
If you can do some test and see if nothing is broken, otherwise we'll just revert the change. |
Ya, I will look tonight and try to fix any issues. Having an empty div isn't ideal. I wonder if these wrappers were just to give JavaScript something to target or something. |
Definitely. Question is do these wrappers still like to have the div even if the part is not displayed ... I would say that if the wrapper doesn't bother, we should just keep it. |
I tested the change before merging and it worked as expected with no issues. But another set of eyes wont hurt. |
I was wrong. Having |
It breaks with a placement.json with the following:
If we do the I can do a PR to just have it check in |
Not sure what that is to test |
Fixes #15382