tbonelee opened a new pull request, #5092:
URL: https://github.com/apache/zeppelin/pull/5092

   ### What is this PR for?
   On the home page, an open modal (e.g., `Import Note`, `Create New Note`) 
closes when a  `NOTES_INFO` message is received.
   
   This is unexpected and makes running parallel E2E tests that create new 
notes unreliable.
   
   #### Root cause
   Both modals treated any `NOTES_INFO` message as the result of *their* own 
submit action.
   Since `NOTES_INFO` message is broadcast for various events, this led to 
false positives.
   
   #### Fix
   Close modals only in response to messages addressed to the submitting 
client: `IMPORT_NOTE` and `NEW_NOTE`. The server already sends `NEW_NOTE` (used 
by the old UI), but not `IMPORT_NOTE`. I added a server-sent `IMPORT_NOTE` and 
replaced `broadcastNote(note)` with sending `IMPORT_NOTE` only to the caller. 
The previously broadcast `NOTE` is mainly useful to users already on that note 
page; for a newly imported note, no user is on that page yet, so the broadcast 
is unnecessary.
   
   ### What type of PR is it?
   Bug Fix
   
   ### What is the Jira issue?
   [[ZEPPELIN-6351]](https://issues.apache.org/jira/browse/ZEPPELIN-6351)
   
   ### How should this be tested?
   - Open two browser windows (A and B).
   - In A, open a modal (e.g., Import Note or Create New Note).
   - In B, perform a submit that triggers a note update. Verify the modal in A 
does not close.
   - In A, submit the modal. Verify it closes and the note list updates.
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the license files need to update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to