Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Conversation

@fzchriha
Copy link
Contributor

@fzchriha fzchriha commented Apr 12, 2022

Description

Create UI for real-time messaging and set up the logic behind real-time data rendering.

Fixes #45

Demo

demo_realtimedata2

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • New and existing unit tests pass locally with these changes?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 12, 2022
@fzchriha fzchriha changed the title Setup real time messaging and handle errors Fzchriha/labgraph UI Apr 12, 2022
@fzchriha
Copy link
Contributor Author

@bennaaym I added the test for the existence of a .env.local file
Here is how it is displayed
labgraph_handle_error

Please let me know if you have any other suggestions?

@bennaaym
Copy link
Contributor

@fzchriha, maybe the message could be updated to Undefined Environment Variable: REACT_APP_WS_API, just to be more specific. otherwise looks good. great work!

@fzchriha
Copy link
Contributor Author

@jfResearchEng Hi Jimmy here is my final PR, I have made all the requested changes as well as added additional UI features & tests. Can you please review my code?

Copy link

@navn-r navn-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, great work! 🎉 🌮

Just left some nitpicks and code suggestions 🚀. Apologies if the suggestions formatting is a bit off...the text editor on GitHub for suggestions sucks.

state.mockGraph = action.payload;
},

setMockRealtimeData: (state, action: PayloadAction<any>) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here with PayloadAction<T>

Comment on lines +103 to +104
const handleMouseUp = () => {
document.removeEventListener('mouseup', handleMouseUp, true);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused on what's going on here. The function is handleMouseUp, and its passing itself in the event listener?

The onMouseDown and related event callbacks were made in order to not use the native document object. In React's event system, the listener is onMouseDown itself, iirc it uses the native mousedown event internally, so you don't needa use both.

@jfResearchEng
Copy link
Contributor

Just to confirm with you, whether this PR can be used for final review and the rest of your LabGraph UI drafts can be ignored for now?

@fzchriha
Copy link
Contributor Author

Yes I confirm, the other PRs are drafts

@jfResearchEng
Copy link
Contributor

Has this PR been rebased and included the latest changes made in PR #64 ?

@fzchriha
Copy link
Contributor Author

@jfResearchEng Yes I tested my changes with Damir's latest changed

@jfResearchEng
Copy link
Contributor

jfResearchEng commented Apr 20, 2022

@jfResearchEng Yes I tested my changes with Damir's latest changed

As this is a later-launched PR (71) than PR #64, can you please rebase this PR to include the latest changes in PR #64 , for example, extensions/yaml_support/labgraph_monitor/examples/labgraph_monitor_example.py has been added in #64 . The documentation would also need to be updated accordingly.

Copy link
Contributor

@jfResearchEng jfResearchEng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase this PR with latest updates from PR64 so that an end-to-end test can be conducted by the reviewer(s).

@fzchriha fzchriha requested a review from jfResearchEng April 21, 2022 20:08
@fzchriha
Copy link
Contributor Author

@jfResearchEng I updated the README file with the latest changes from PR64


```
yarn start
labgraph\extensions\prototypes\labgraph_monitor> yarn start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty UI has launched after running this line.
Reference: https://pasteboard.co/K6noFCNDD7A3.png

Copy link
Contributor Author

@fzchriha fzchriha Apr 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see the icon on the right?
Screen Shot 2022-04-22 at 2 33 13 PM

@fzchriha fzchriha requested a review from jfResearchEng April 22, 2022 19:22
Copy link
Contributor

@jfResearchEng jfResearchEng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this PR for now and for the other improvements, please help create a new PR.

@jfResearchEng
Copy link
Contributor

jfResearchEng commented Apr 26, 2022

Thank you for contributing to all the PR improvements on LabGraph Monitor!
image

@jfResearchEng jfResearchEng merged commit 6c391b4 into facebookresearch:main Apr 26, 2022
@jfResearchEng
Copy link
Contributor

@fzchriha, is this still an open issue: #69 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LabGraph Monitor Improvement - Add input/output message information in LabGraph Monitor UI

5 participants