open-condo-software / condo

Condo is an Open Source property management SaaS that allows users to manage tickets, resident contacts, properties, payment tracking, create invoices, and oversee a service marketplace, all while offering an extension system for mini-apps, making it an ideal platform for property management companies and those servicing shared properties.
MIT License
111 stars 28 forks source link

fix(condo): no more useless react warnings #5477

Open pahaz opened 2 days ago

pahaz commented 2 days ago

🥳🥳🥳

image

sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

pahaz commented 22 hours ago

Why do you suppress all warning on the entire body?

In reality, we do not have and will never have any attributes in the body. However, this warning is quite common and will always appear, negatively impacting the developer experience (DX) for external contributions and local development.

I don't see a significant issue with adding this to the body and html since we won't be passing any attributes there. This approach would also help avoid unnecessary distractions from additional warnings. I would prioritize DX in this case, as attributes are often passed in the body. I don't perceive any substantial risks of accidental errors arising from this. Currently, I've had to address more than four warnings because everyone is accustomed to their presence. Therefore, I want to enhance the local development experience so that even warnings from third-party extensions do not divert attention.

SavelevMatthew commented 20 hours ago

Why do you suppress all warning on the entire body?

In reality, we do not have and will never have any attributes in the body. However, this warning is quite common and will always appear, negatively impacting the developer experience (DX) for external contributions and local development.

I don't see a significant issue with adding this to the body and html since we won't be passing any attributes there. This approach would also help avoid unnecessary distractions from additional warnings. I would prioritize DX in this case, as attributes are often passed in the body. I don't perceive any substantial risks of accidental errors arising from this. Currently, I've had to address more than four warnings because everyone is accustomed to their presence. Therefore, I want to enhance the local development experience so that even warnings from third-party extensions do not divert attention.

Does this only affects body? Because I'm worried about its behaviour, if hydration error occurred in children, will it be thrown?

SavelevMatthew commented 20 hours ago

According to react docs, it will suppress on children's too... 🤔

image

I've found out, that not deep check, but I'm wondering how its work on this top level