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

Organization List Redesign #799

Closed
wants to merge 9 commits into from
Closed

Organization List Redesign #799

wants to merge 9 commits into from

Conversation

elraphty
Copy link
Contributor

@elraphty elraphty commented Oct 6, 2023

Describe your changes

This PR updates the new Organization redesign list

Issue ticket number and link

Closes #770

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device

@elraphty elraphty requested a review from kevkevinpal October 6, 2023 15:59
@@ -8,7 +8,7 @@ interface BProps {
background: string;
width: string;
}
const B = styled(EuiButton)<BProps>`
const B = styled(EuiButton) <BProps>`
Copy link
Contributor

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

Comment on lines 163 to 165
<div
style={{
padding: 20,
padding: '20px 30px',
Copy link
Contributor

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?

Comment on lines 27 to 29
(isOrganizationAdmin ||
userHasRole(main.bountyRoles, userRoles, 'ADD USER') ||
userHasRole(main.bountyRoles, userRoles, 'VIEW REPORT'))
Copy link
Contributor

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>`
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +94 to +97
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
}
Copy link
Contributor

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 }}>
Copy link
Contributor

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?

Comment on lines +135 to +141
if ('show' in f) {
// show has a value
if (!f.show) return false;
}
// if no value default to true
return true;
}).length
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

@@ -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)}
Copy link
Contributor

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

Comment on lines +73 to +75
thumbColor: '#5a606c',
trackBackgroundColor: 'rgba(0,0,0,0)'
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +112 to +114
label: toCapitalize(org.name),
value: org.uuid
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +423 to +424
twitter: `<span>Post this to your twitter account to verify:</span><br/><strong>Sphinx Verification: ${ui.meInfo.verification_signature}</strong>`
}
Copy link
Contributor

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 }}
Copy link
Contributor

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

Comment on lines 18 to 19
buttonText={tabs['organizations'].action.text}
buttonIcon={tabs['organizations'].action.icon}
Copy link
Contributor

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

Copy link
Contributor

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

Comment on lines +13 to +16
style={{
margin: 'auto',
marginTop: '10%'
}}
Copy link
Contributor

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

Comment on lines 33 to 38
style={{
width: 112,
height: 40,
color: '#000000',
borderRadius: 10
}}
Copy link
Contributor

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

Comment on lines +491 to +501
<MaterialIcon
onClick={() => handleSettingsClick(user)}
icon={'settings'}
style={{
fontSize: 20,
marginLeft: 10,
cursor: 'pointer',
color: 'green'
}}
/>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +504 to +516
<MaterialIcon
onClick={() => {
deleteOrganizationUser(user);
}}
icon={'delete'}
style={{
fontSize: 20,
marginLeft: 10,
cursor: 'pointer',
color: 'red'
}}
/>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +590 to +591
display: 'none'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +375 to +376
display: 'none'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +388 to +393
style={{
width: '100%',
borderRadius: 10,
height: 45,
marginTop: 15
}}
Copy link
Contributor

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 >
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +404 to +405
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +112 to +120
minHeight: 132
}
: {
maxWidth: 291,
minWidth: 291,
marginRight: 20,
marginBottom: 20,
minHeight: 472
};
maxWidth: 291,
minWidth: 291,
marginRight: 20,
marginBottom: 20,
minHeight: 472
};
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +132 to +134
border: '1px solid #dde1e5',
boxShadow: 'none'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines +261 to +262
ui.meInfo?.owner_alias &&
{ ...person }?.owner_alias === ui.meInfo?.owner_alias ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier

Comment on lines 201 to 202
fmt.Println("Invoice Response ===", invoiceRes.Response.Settled)
fmt.Println("Invoice Payment Request ===", invoiceRes.Response.Payment_request)
Copy link
Contributor

Choose a reason for hiding this comment

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

delete logs

@@ -206,6 +209,7 @@ func InitInvoiceCron() {
}

if invoiceRes.Response.Settled {
fmt.Println("Settled ===", invoiceRes.Response.Settled)
Copy link
Contributor

Choose a reason for hiding this comment

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

delete logs

Copy link
Contributor

@kevkevinpal kevkevinpal left a 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

@elraphty elraphty closed this Oct 11, 2023
@Evanfeenstra Evanfeenstra deleted the feat/update_org_admin branch January 26, 2024 17:57
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.

Update organization tab: Logged in profile and someone else's profile
2 participants