Avatar block: error on loading if Avatars are disabled on Settings#41577
Avatar block: error on loading if Avatars are disabled on Settings#41577cbravobernal wants to merge 2 commits into
Conversation
|
Size Change: +4 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
Can we add a warning, for consistency with what we're doing in the Post Comments block (and in some Comments blocks)? FWIW, I've recently discussed this subject with @jameskoster, and we kind of settled on warnings after all. |
|
Hi @ockham , I'm going to move the warning to a new issue/PR, as will need some design feedback. As we can have Avatars anywhere on the site, the warning does not fit in all places (like the header, each comment, etc) |
Let's do that experiment in another PR, so we can fix this error in the next minor. Closing this PR as it will be fixed in #41354 |



What?
Fixes #41308
Closes #41313
Closes #41354
Why?
Right now, if Avatars are disabled on settings and we try to add it as a block, we got an error:

How?
Maybe it would be a good idea to make this block conditional if Avatar is disabled, or add a warning. But in this PR, we are just avoiding the JS error (the avatar will load the default one on the editor, and not in the frontend if they are disabled, causing some inconsistency between them).
We can maybe address it in another PR after some design feedback:
cc @javierarce , @richtabor, @estelaris
Testing Instructions
In trunk:
1.) Disable avatars on settings.
2.) Add Avatar block.
3.) Check the crash
After the fix:
1.) Disable avatars on settings.
2.) Add Avatar block.
3.) Avatar is displayed on the editor, not in the frontend.
Screenshots or screencast