-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Web App Initial Components #61
Conversation
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.
looks good! a couple non-blocking questions.
dataline-webapp/public/index.html
Outdated
@@ -1,6 +1,9 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<script |
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.
what's this? i feel like this is one of the old subdomains from the previous project but maybe i'm wrong.
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.
wow indeed. Skipped it. Good point
@@ -0,0 +1,3 @@ | |||
import Breadcrumbs from "./Breadcrumbs"; | |||
|
|||
export default Breadcrumbs; |
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.
this is just for my own edification... can you explain this pattern of having a directory with your component (e.g. Blreadcrumbs.tsx
) and then an index.tsx
that just exports the component? as opposed to just exporting from Breadcrumbs.tsx
and not having an index.tsx
?
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.
Its easier to use such components in other files, as you won't need to specify the path as: import Button from '@lib/Button/Button
and can just use @lib/component/Component
.
You may ask then - why not to keep all the code in index.tsx
. I do not like that way, because it becomes rather difficult to navigate because you will search for index.tsx and there will be a lot of them in your IDE.
So I just try to follow those format, as its easier for me to support such code.
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.
thanks! makes sense.
}; | ||
|
||
export const MainContainer = styled.div<{ withLine?: boolean }>` | ||
padding: 20px 25px 18px; |
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.
how do you decide when to use px units as opposed to em or one of the other relative units?
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.
Do we use em anywhere? em scales depending on the font used on the page. As Figma provides all sizes in px its much easier to support it in px + em is usually used for texts only.
As for relative units - we use them. When we want to position something correctly or have the sizes of some components to be relative to the screen or some other sizes. So when to use px or relative units - is more a question of implementation. We use them, where we want them to be used :)
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.
lolol. okay. as i do code review i might ask more questions about this to understand more how you think about it. i don't have good judgment right now for when we do or don't want this.
dataline-webapp/README.md
Outdated
@@ -1,68 +1,9 @@ | |||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | |||
|
|||
## Available Scripts | |||
For correct `yarn install` Font awesome Pro fonts are required. |
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.
Can you update that comment since we don't use Font Awesome Pro?
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.
Good point. Looks like this Readme file is a bit outdated. I will update it.
What
Note
As backend is not ready yet, forms flow is not implemented correctly. Will be added when we have backend.