-
Notifications
You must be signed in to change notification settings - Fork 22
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
Removed inline styling #744
Conversation
Changed the styling by material ui box component Some changes made using styled components
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.
Hello @K-Kumar-01 ! It's good to see you around here again! Thanks for this new PR, it looks much better than the first one. I'm sorry I failed to explicit that we DO use double quotes for element attributes, so in places like <Box clone justifyContent='flex-start' alignItems='center'>
these should actually be double quotes! Please update your PR with the changes requested so we can accept it!
@@ -32,9 +33,9 @@ class AttributionDialog extends React.Component { | |||
</DialogTitle> | |||
<DialogContent> | |||
<Message message={this.props.message} /> | |||
<div style={{ marginBottom: units(2), marginTop: units(2) }}> | |||
<Box my={units(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.
Please make it my={2}
instead of my={units(2)}
src/app/components/task/Task.js
Outdated
<UserAvatars users={byPictures} /> | ||
<span style={{ lineHeight: '24px', paddingLeft: units(1), paddingRight: units(1) }}> | ||
<Box component='span' lineHeight='24px' px={units(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.
Please remove the units()
call around 1
. Make it px={1}
instead.
@@ -209,21 +210,22 @@ class EditTaskDialog extends React.Component { | |||
const canRemove = this.state.options.length > 2; | |||
|
|||
return ( | |||
<div style={{ marginTop: units(2) }}> | |||
<Box mt={units(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.
Please make it mt={2}
. In general, remove all units()
calls when using Box
.
disabled={item.other} | ||
style={{ padding: `${units(0.5)} ${units(1)}`, width: '75%' }} | ||
/> | ||
<Box clone p={`${units(0.5)} ${units(1)}`} width={"75%"}> |
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.
Please remove units
call
@@ -236,7 +238,7 @@ class EditTaskDialog extends React.Component { | |||
</Row> | |||
</div> | |||
))} | |||
<div style={{ marginTop: units(1) }}> | |||
<Box mt={units(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.
Please remove units call. Make it mt={2}
instead.
@@ -331,9 +332,9 @@ class GeolocationRespondTask extends Component { | |||
onBlur={() => this.setState({ openResultsPopup: false })} | |||
fullWidth | |||
/> | |||
<div style={{ font: caption, color: black54 }}> | |||
<Box color={black54} fontFamily={fontStackSans} fontWeight={400} fontSize={units(1.5)} lineHeight={units(2.5)}> |
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.
Please revert. This is better handled with the material-ui Typography
component.
import Dialog from '@material-ui/core/Dialog'; | ||
import DialogContent from '@material-ui/core/DialogContent'; | ||
import { Map, Marker, TileLayer } from 'react-leaflet'; | ||
import styled from 'styled-components'; | ||
import config from 'config'; // eslint-disable-line require-path-exists/exists | ||
import ParsedText from '../ParsedText'; | ||
import { safelyParseJSON } from '../../helpers'; | ||
import { units, black05, black38, FlexRow } from '../../styles/js/shared'; | ||
import { units, black05, black38, FlexRow, black54 } from '../../styles/js/shared'; |
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 is black54
being imported for?
src/app/components/task/Task.js
Outdated
<UserAvatars users={byPictures} /> | ||
<span style={{ lineHeight: '24px', paddingLeft: units(1), paddingRight: units(1) }}> | ||
<Box component='span' lineHeight='24px' px={units(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.
Please remove units()
call. I think you got the idea already!
Added double quotes in attrbutes instead of single Removed the units function wherever necessary
@amoedoamorim |
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.
Hello @K-Kumar-01 ! Thanks for your changes. We're almost there. There are still some changes needed to comply with coding guidelines. I'm pasting the eslint output to make it easier to detect what needs to change. Please fix those so we can accept and merge it! Thanks a lot!
ref={(m) => { this.marker = m; }} | ||
/> | ||
</Map> | ||
<Box height={'400px'}> |
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.
height="400px"
375:23 error Curly braces are unnecessary here react/jsx-curly-brace-presence
@@ -371,23 +372,24 @@ class GeolocationRespondTask extends Component { | |||
margin="normal" | |||
/> | |||
<div> |
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.
Please remove this div
as the newly added Box
should take its place.
@@ -236,7 +238,7 @@ class EditTaskDialog extends React.Component { | |||
</Row> | |||
</div> | |||
))} | |||
<div style={{ marginTop: units(1) }}> | |||
<Box mt={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.
mt={1}
<Box clone mb={2}> | ||
<FlexRow > | ||
<Box clone flex={10} > | ||
<Box clone justifyContent='flex-start' alignItems='center'> |
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.
214:41 error Unexpected usage of singlequote jsx-quotes
214:65 error Unexpected usage of singlequote jsx-quotes
<Autocomplete | ||
className="task__datetime-timezone" | ||
options={ | ||
taskTimezones && taskTimezones.length ? taskTimezones : Object.values(timezones) |
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.
246:1 error Line 246 exceeds the maximum line length of 100 max-len
src/app/components/team/TeamBots.js
Outdated
{ team.team_bot_installations.edges.map((installation) => { | ||
const bot = installation.node.team_bot; | ||
const botExpanded = this.state.expanded === bot.dbid; | ||
|
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.
203:1 error Trailing spaces not allowed no-trailing-spaces
import styled from 'styled-components'; | ||
|
||
const StyledTeamAvatar = styled(TeamAvatar)` | ||
background-image: url('${(props) => props.imageUrl}'); | ||
`; |
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.
Please revert. Using styled-components
is not in the scope of this ticket.
<TeamAvatar | ||
style={{ backgroundImage: `url(${avatarPreview || team.avatar})` }} | ||
<StyledTeamAvatar | ||
imageUrl={avatarPreview || team.avatar} |
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.
Please revert. Using styled-components
is not in the scope of this ticket.
> | ||
<CancelIcon /> | ||
</StyledIconButton> | ||
</Row> |
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.
305:23 error Trailing spaces not allowed no-trailing-spaces
/> | ||
))} | ||
</List> | ||
</Card> |
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.
90:22 error Trailing spaces not allowed no-trailing-spaces
@amoedoamorim |
Reverted the styled components Removed the trailing spaces
@amoedoamorim |
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.
Great, thanks! There are still some trailing spaces. Looks like you created those when fixing the other issues.
@@ -53,9 +54,11 @@ class GeolocationTaskResponse extends Component { | |||
<FlexRow className="task__geolocation-response"> | |||
<span className="task__response"><ParsedText text={name} /></span> | |||
{coordinatesString ? | |||
<span | |||
<Box |
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.
57:15 error Trailing spaces not allowed no-trailing-spaces
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 still unfixed
<Box | ||
display="flex" | ||
justifyContent="flex-start" |
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.
168:17 error Trailing spaces not allowed no-trailing-spaces
169:29 error Trailing spaces not allowed no-trailing-spaces
170:42 error Trailing spaces not allowed no-trailing-spaces
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.
^ These are still unfixed
Please update your branch with latest |
@amoedoamorim |
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 @K-Kumar-01 ! There are still some trailing spaces left! Please fix those and we should be in a good position to merge! Thank you so much for your effort in contributing! We appreciate it!
@@ -53,9 +54,11 @@ class GeolocationTaskResponse extends Component { | |||
<FlexRow className="task__geolocation-response"> | |||
<span className="task__response"><ParsedText text={name} /></span> | |||
{coordinatesString ? | |||
<span | |||
<Box |
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 still unfixed
<Box | ||
display="flex" | ||
justifyContent="flex-start" |
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.
^ These are still unfixed
@amoedoamorim I have removed the trailing spaces which were left |
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.
Hey @K-Kumar-01 , thanks again! I notices a couple details left that are blocking the build. Please fix those so we can move on! Thank you!
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import Box from '@material-ui/core/Box' |
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.
3:40 error Missing semicolon semi
src/app/components/task/Task.js
Outdated
<a href={fileUploadPath} target="_blank" rel="noreferrer noopener" style={{ color: checkBlue }}>{response}</a> | ||
</p> | ||
<Box component="p" textAlign="center"> | ||
<Box |
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.
418:19 error Trailing spaces not allowed no-trailing-spaces
@amoedoamorim Made the requested changes that were causing build error |
Thanks @K-Kumar-01 and congrat's on your approved PR! That looks amazing now, I'll go ahead and merge it! Thank you so much for the effort you put in your contribution! We appreciate it! |
Changed the styling by material ui box component
Some changes made using styled components
Some functionalities like
cursor:pointer
andbackgroundImage
are not available as JSX attributes . So had to use styled component there.Rest all has been done using material ui box
The issue link is here