openreview / openreview-web

The official web interface for OpenReview.net
https://openreview.net
GNU Affero General Public License v3.0
12 stars 2 forks source link

Tasks page: note editor is opened twice when clicking on pending task #203

Closed melisabok closed 3 years ago

melisabok commented 3 years ago

https://openreview.net/forum?id=7Rha4QU8hiS&noteId=7Rha4QU8hiS&invitationId=ICLR.cc/2021/Conference/Reviewers/-/Registration&referrer=%5BTasks%5D(%2Ftasks)

Screen Shot 2020-08-25 at 9 32 41 PM

I think the issue is having noteId in the url.

https://openreview.net/forum?id=7Rha4QU8hiS&invitationId=ICLR.cc/2021/Conference/Reviewers/-/Registration&referrer=%5BTasks%5D(%2Ftasks)

works well.

melisabok commented 3 years ago

Reopening this, I'm still see the issue happening in the live site.

xkopenreview commented 3 years ago

the hook which renders the note editor(by calling runForum()) has the following dependencies

  1. clientJsLoading
  2. user
  3. authors
  4. userLoading

it does not run when 1 or 4 is true and 2 come from userContext which does not change.

3 is set when page is rendered and 3 will be set again when 1 change from true to false. reference of 3 changed so note editor is rendered multiple times.

one possible solution is to wrap authors with JSON.stringify() so that it check for content change