-
Notifications
You must be signed in to change notification settings - Fork 5
UI rewrite #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
UI rewrite #117
Conversation
|
To get this running, cd app
npm i
npm run start |
|
Current demo: https://streamable.com/o0okk |
| - react | ||
| - '@typescript-eslint' | ||
| rules: | ||
| sort-imports: off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running into an annoying issue where imports of the form
import Default, { something } from 'foo';are a lint error because braced imports are supposed to occur before default imports. After fiddling around with the settings a bit, I gave up because it wasn't worth the effort. If you have any ideas I'm all ears.
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "tabWidth": 2, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that 2 is the default for javascript, but how would you feel about using 4 here to be more consistent with the rest of the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a weak preference for 2. It's pretty common for multi-language projects to have separate styles for each language
app/package.json
Outdated
| "scripts": { | ||
| "build": "webpack --config ./webpack.config.js", | ||
| "start": "npm run build && electron ./dist/main.js", | ||
| "test": "echo \"Error: no test specified\" && exit 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this "coming soon" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) Yes WIP
| width: 800, | ||
| height: 600, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/src/renderer/index.html
Outdated
| </head> | ||
| <body> | ||
| <div id="app"> | ||
| <h1>Hello World!</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to keep this here ...
app/src/renderer/index.html
Outdated
| <html> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>Hello World!</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <title>Hello World!</title> | |
| <title>UltraTrace</title> |
:^)
keggsmurph21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks really good. I haven't reviewed the React stuff since I don't have enough experience with that yet. If there's anything that you want me to look at in particular, just let me know and I can dive in.
A few thoughts:
- I encountered these warnings (although they feel more like errors) when running the app ... not sure if these are things you've come across
react-dom.development.js:530 Warning: validateDOMNesting(...): <th> cannot appear as a child of <tfoot>.
in th (created by TableCell)
in TableCell (created by TableHeaderCell)
in TableHeaderCell (created by TraceSelector)
in tfoot (created by TableHeader)
in TableHeader (created by TableFooter)
in TableFooter (created by TraceSelector)
in table (created by Table)
in Table (created by TraceSelector)
in TraceSelector (created by Sidebar)
in div (created by Segment)
in Segment (created by Sidebar)
in Sidebar (created by Responsive)
in Responsive (created by App)
in div (created by SegmentGroup)
in SegmentGroup (created by App)
in App
warningWithoutStack @ react-dom.development.js:530
react.development.js:167 Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Annotation`. See https://fb.me/react-warning-keys for more information.
in Point (created by Annotation)
in Annotation (created by withRelativeMousePos(undefined))
in withRelativeMousePos(undefined) (created by IsMouseHovering(withRelativeMousePos(undefined)))
in IsMouseHovering(withRelativeMousePos(undefined)) (created by Window)
in div (created by Segment)
in Segment (created by Window)
in Window (created by Responsive)
in Responsive (created by App)
in div (created by SegmentGroup)
in SegmentGroup (created by App)
in App
warningWithoutStack @ react.development.js:167
Warning: Unsupported style property background-color. Did you mean backgroundColor?
in div (created by Context.Consumer)
in StyledComponent (created by styled.div)
in styled.div (created by Point)
in Point (created by Annotation)
in div (created by styled.div)
in styled.div (created by Annotation)
in div (created by styled.div)
in styled.div (created by Annotation)
in Annotation (created by withRelativeMousePos(undefined))
in withRelativeMousePos(undefined) (created by IsMouseHovering(withRelativeMousePos(undefined)))
in IsMouseHovering(withRelativeMousePos(undefined)) (created by Window)
in div (created by Segment)
in Segment (created by Window)
in Window (created by Responsive)
in Responsive (created by App)
in div (created by SegmentGroup)
in SegmentGroup (created by App)
in App
warningWithoutStack @ react-dom.development.js:530
-
I assume you've already thought about this, but at some point we'll want to package our app into one runnable file.
-
Have you thought about how the IPC will work? Will the
electron-mainprocess spawn a Python "server" ?
| @@ -0,0 +1,94 @@ | |||
| declare module '*.jpg'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this line does -- why do we need to declare static images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you do something like
import image from 'someimage.jpg';Typescript will complain because it doesn't know what someimage.jpg is (I believe it looks at TS and JS files in your project directory + node_modules).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway this is temporary until we get real images
| target: 'electron-renderer', | ||
| devtool: 'source-map', | ||
| resolve: { | ||
| // Add '.ts' and '.tsx' as resolvable extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale comment?
Yeah these are coming from third-party components. Will investigate on my final pass.
Yup that's the plan
Yeah so the main process will be pretty light since our backend is in Python. It'll just handle spawning the Python server and just join on the process handle. |
81d5a96 to
9d1c199
Compare

Creating a preliminary PR to track UI progress. The idea is to rewrite the UI using industry-standard browser technologies instead of fiddling around with tkinter.