-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
"Disable comments" on the page where there are no comments initially #262
Comments
@Reeywhaar @igoradamenko - I think smth with ui goes a little bit crazy here |
ui goes crazy because if post is marked readonly and there are no comments
While if there are at least one comment and post is read-only the response would be:
So, in first case ui doesn't know if post is read-only so it can't change button to |
I'd say it is a good reason to go crazy :) Probably I should change response (on api level) in this case and return empty comment list but valid/current |
@Reeywhaar I think api should be playing better now for such "no bucket" finds. Can you pls make sure it is all good from UI point of view? |
Right now Same applies to |
I have fixed find response, however not sure why last affected as I didn't touch it. Probably it always returned null on empty comments. Anyway, made it to return [] as well |
@Reeywhaar - if this change working as you expect we could probably drop #264 ? |
Last time the response was treated like error which has been caught, and handled by return of default placeholder data instead. Edit: you must be talking about last comments endpoint. Well, there must have been an error, it just was that outcome of it is the same (empty widget), so no one noticed. Let me see if everything works, and if so, I'll drop |
So, yes, everything works good regarding comments. As for last comments there are errors in console, which I think rather ugly :-) From ui point as I said it's just an empty widget. If you can change response to be edit:
Haven't noticed, it's still |
hopefully, this time is [] for real |
yep, now everything great 👍 |
If the admin clicks "Disable comments" on the page where there are no comments, the option does not switch to "Enable comments", the input window is not removed. With each click, in the logs we get "......&ro=1".
However, it is no longer possible to add a comment on this page, we get "Something went wrong. Please try again a bit later".
The text was updated successfully, but these errors were encountered: