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

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

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.

Commits

Files