Override onInitialRender() instead of render() in AbstractCommentBlockView.

Review Request #13985 — Created June 18, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

Spina views should mostly override either onInitialRender() or onRender()
instead of render() because the latter manages important things like
model event registration and triggering render signals. This updates our
AbstractCommentBlockView to override the onInitialRender() method
instead of render(), which allows model event handlers to properly
register.

This fixes two regressions that we had:
1. When resizing/moving comments, the selection box wouldn't immediately
update to the new size.
3. When created a new comment on top of an existing published one, the
comment block view would only show the published one.

  • Ran unit tests.
  • Tested creating, deleting, moving and resizing region comments.
  • Tested adding a comment on top of an existing one.
Summary ID
Override onInitialRender() instead of render() in AbstractCommentBlockView.
Spina views should mostly override either `onInitialRender()` or `onRender()` instead of `render()` because the latter manages important things like model event registration and triggering render signals. This updates our `AbstractCommentBlockView` to override the `onInitialRender()` method instead of `render()`. That fixes a regression in our region comment resizing/moving, which was broken because the model events handlers for those weren't being registered previously.
b803943b5a802cdc4ae263cd7c57245a0b56b0e9
Description From Last Updated

This can be protected now.

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    This can be protected now.

  3. 
      
maubin
david
  1. Ship It!
  2. 
      
maubin
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (7aa3561)