-
Notifications
You must be signed in to change notification settings - Fork 60
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
Organization List Redesign #799
Conversation
@@ -8,7 +8,7 @@ interface BProps { | |||
background: string; | |||
width: string; | |||
} | |||
const B = styled(EuiButton)<BProps>` | |||
const B = styled(EuiButton) <BProps>` |
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 you know the reason why you're adding these changes, our prettier script will just add them back and it makes it more difficult to review
<div | ||
style={{ | ||
padding: 20, | ||
padding: '20px 30px', |
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 we make this a styled component?
(isOrganizationAdmin || | ||
userHasRole(main.bountyRoles, userRoles, 'ADD USER') || | ||
userHasRole(main.bountyRoles, userRoles, 'VIEW REPORT')) |
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.
lets just define this as a boolean above to make the react part look simple, we can call it shouldShowButton: boolean
@@ -10,7 +10,7 @@ interface ButtonHoverProps { | |||
shadowcolor?: string; | |||
} | |||
|
|||
const B = styled(EuiButton)<ButtonHoverProps>` | |||
const B = styled(EuiButton) <ButtonHoverProps>` |
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.
prettier
r: parseInt(result[1], 16), | ||
g: parseInt(result[2], 16), | ||
b: parseInt(result[3], 16) | ||
} |
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.
prettier
@@ -82,7 +82,7 @@ export const PersonPage = observer(() => { | |||
height: '100%' | |||
}} | |||
> | |||
<Panel isMobile={isMobile} style={{ paddingBottom: 0, paddingTop: 80 }}> | |||
<Panel isMobile={isMobile} style={{ paddingBottom: isMobile ? 80 : 0, paddingTop: 80 }}> |
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 there anyway to make this a styled component and use the isMobile in the styled component?
if ('show' in f) { | ||
// show has a value | ||
if (!f.show) return false; | ||
} | ||
// if no value default to true | ||
return true; | ||
}).length |
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.
prettier
frontend/app/src/people/Person.tsx
Outdated
@@ -190,7 +189,7 @@ export default function Person(props: PersonProps) { | |||
<Img | |||
style={{ height: '100%', width: '100%', borderRadius: 0 }} | |||
src={img} | |||
// src={img || getUserPlaceholder(owner_pubkey)} | |||
// src={img || getUserPlaceholder(owner_pubkey)} |
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.
we can probably delete this comment but also prettier
thumbColor: '#5a606c', | ||
trackBackgroundColor: 'rgba(0,0,0,0)' | ||
})} |
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.
prettier
label: toCapitalize(org.name), | ||
value: org.uuid | ||
})) |
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.
prettier
twitter: `<span>Post this to your twitter account to verify:</span><br/><strong>Sphinx Verification: ${ui.meInfo.verification_signature}</strong>` | ||
} |
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.
prettier
@@ -141,7 +141,7 @@ export default function NoneSpace(props: NoneSpaceProps) { | |||
leadingIcon={props.buttonIcon} | |||
width={210} | |||
height={48} | |||
style={{ marginTop: 40 }} | |||
style={{ marginTop: 20, borderRadius: 10 }} |
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.
lets make this a styled component
buttonText={tabs['organizations'].action.text} | ||
buttonIcon={tabs['organizations'].action.icon} |
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.
above you can use this to create two vars from this const {text, icon} = tabs['organizations'].action
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
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 would actually do this directly from widgetConfigs so
const {text, icon} = widgetConfigs['organizations'].action
style={{ | ||
margin: 'auto', | ||
marginTop: '10%' | ||
}} |
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 like the nonespace below uses the same style you can make this a styled component
style={{ | ||
width: 112, | ||
height: 40, | ||
color: '#000000', | ||
borderRadius: 10 | ||
}} |
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.
lets make this a styled component
<MaterialIcon | ||
onClick={() => handleSettingsClick(user)} | ||
icon={'settings'} | ||
style={{ | ||
fontSize: 20, | ||
marginLeft: 10, | ||
cursor: 'pointer', | ||
color: 'green' | ||
}} | ||
/> | ||
)} |
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.
prettier
<MaterialIcon | ||
onClick={() => { | ||
deleteOrganizationUser(user); | ||
}} | ||
icon={'delete'} | ||
style={{ | ||
fontSize: 20, | ||
marginLeft: 10, | ||
cursor: 'pointer', | ||
color: 'red' | ||
}} | ||
/> | ||
)} |
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.
prettier
display: 'none' | ||
} |
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.
prettier
display: 'none' | ||
} |
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.
prettier
style={{ | ||
width: '100%', | ||
borderRadius: 10, | ||
height: 45, | ||
marginTop: 15 | ||
}} |
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.
lets make this a styled component
<EuiGlobalToastList toasts={toasts} dismissToast={removeToast} toastLifeTimeMs={5000} /> | ||
</Container> | ||
</Container > |
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.
prettier
) | ||
} |
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.
prettier
minHeight: 132 | ||
} | ||
: { | ||
maxWidth: 291, | ||
minWidth: 291, | ||
marginRight: 20, | ||
marginBottom: 20, | ||
minHeight: 472 | ||
}; | ||
maxWidth: 291, | ||
minWidth: 291, | ||
marginRight: 20, | ||
marginBottom: 20, | ||
minHeight: 472 | ||
}; |
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.
prettier
border: '1px solid #dde1e5', | ||
boxShadow: 'none' | ||
} |
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.
prettier
ui.meInfo?.owner_alias && | ||
{ ...person }?.owner_alias === ui.meInfo?.owner_alias ? ( |
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.
prettier
handlers/invoiceCron.go
Outdated
fmt.Println("Invoice Response ===", invoiceRes.Response.Settled) | ||
fmt.Println("Invoice Payment Request ===", invoiceRes.Response.Payment_request) |
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.
delete logs
handlers/invoiceCron.go
Outdated
@@ -206,6 +209,7 @@ func InitInvoiceCron() { | |||
} | |||
|
|||
if invoiceRes.Response.Settled { | |||
fmt.Println("Settled ===", invoiceRes.Response.Settled) |
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.
delete logs
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.
added some comments for all the "prettier" comments you can run yarn run prettier
and it should fix them but I'm assuming your vscode or editor is using a different prettier file than the one we have in the project
Describe your changes
This PR updates the new Organization redesign list
Issue ticket number and link
Closes #770
Type of change
Checklist before requesting a review