-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(react): remove empty elements from rendering #6
feat(react): remove empty elements from rendering #6
Conversation
🦋 Changeset detectedLatest commit: c6be572 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey @KaterBasilisk6, thanks a lot for taking a look into this! I really appreciate your help with the project. ❤️ I've left a comment in #5 about this, but I think it would be better to remove empty headings since this will affect SEO, and we don't want this. About the other elements, I don't see any problem in rendering if empty. Adding a prop for this may confuse new users, especially if we don't clarify what this is about and why it's important. That's why I prefer not to add a prop for this right now. What do you think? We can keep your code and remove the prop you've added. |
Hey @jpedroschmitz, I see your point that a prop could confuse new users. I'm also seeing your point that checking headings would be enough. The only enhancement to my code I would suggest would be writting a function instead of using Will you remove the prop or should I do it? |
You can remove it if you can. I would also ask you to increase the size limit to 5kb here. This should fix the size workflow error. |
Should I keep the list or should I remove it completly? |
Keep it. If we decide to add more elements to be checked, we can add them to the list. It would be nice to add a note about this in the Readme also. Something like this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your help in this @KaterBasilisk6!
I'll be adding changesets and releasing it soon =D
You welcome @jpedroschmitz. I'm glad I was able to help. |
Hey @KaterBasilisk6, could you allow me to add commits? |
Hey @jpedroschmitz, I thought I would have enabled it already. I reanabled it again. |
It worked now. No idea why, haha Thanks again! |
This PR adds support for removing specified elements if they would be rendered empty
Maybe the naming of the property determining whether an empty element should be rendered or not could be changed, it's not as descriptive as it could be. (I did not find another name though)