Skip to content
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

2 initialize gui #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

2 initialize gui #11

wants to merge 3 commits into from

Conversation

dalee2003
Copy link
Collaborator

preliminary control station setup (intialize Navbar ControlPanel StatusIndicator)

@vrushang1234 vrushang1234 removed their assignment Nov 15, 2024
@vrushang1234 vrushang1234 self-requested a review November 15, 2024 18:24
Copy link
Collaborator

@vrushang1234 vrushang1234 left a comment

Choose a reason for hiding this comment

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

Thanks for working on it! I have a few questions:

Questions

  • Is there a specific reason for adding package.json and initializing the react project in the parent directory.

Suggestion

  • Please do not push node modules to github. This creates a lot of load, if you have node modules, make sure to add it to gitignore and anyone who wants to run it can use npm i.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a specific reason index.tsx was created. Since, it is the same as main.tsx. Try to use main.tsx.

Comment on lines 2 to 5
import Navbar from './components/Navbar/Navbar';
import StatusIndicator from './components/StatusIndicator/StatusIndicator';
import ControlPanel from './components/ControlPanel/ControlPanel';
import './App.css';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Try to use absolute addresses wherever possible

<Navbar />
<StatusIndicator status="green" />
<main className="content">
{"HX10 GUI"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since it is just a text and no explicit TS code is being added here, you can just use HX10 GUI instead of {"HX10 GUI"}

Comment on lines 1 to 19
.status-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-around;
padding: 10px;
background-color: gray;
}

.status-button {
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of adding padding to status-bar, you can add margin to status-button. This will make the gui more responsive to different screen sizes

color: white;
font-weight: normal;

height: 40px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any specific reason for adding a constant height to the navbar?

function Navbar() {
return (
<header className="navbar">
<img alt="HX logo" src={HX} style={{ height: "30px" }} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use relative units for height of the image, something like rem. This way if I have a different font size, it won't look weird next to the logo

Comment on lines 6 to 7
width: 70px;
height: 300px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of adding constant height and width to the status indicator, can we make it relative?

}

.status-label {
font-size: 16px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's make the font size relative

Comment on lines 33 to 34
width: 40px;
height: 40px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this relative to the parent div?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason for having a PNG of the logo too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants