-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix: Improve the UI/UX for GitHub integrations #3907
fix: Improve the UI/UX for GitHub integrations #3907
Conversation
…ositoriesComponent
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
@@ -37,7 +38,7 @@ const DeleteGithubIntegracion: FC<DeleteGithubIntegracionType> = ({ | |||
github_integration_id: githubId, | |||
organisation_id: organisationId, | |||
}).then(() => { | |||
onConfirm() | |||
window.location.reload() |
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.
Im confused, does this work ? It doesnt look like the correct way to open a confirmation modal, there's no message onYes etc
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 closes the modal when you delete the installation.
<Row className='list-item' key={externalResource?.id}> | ||
<Flex className='table-column mt-1'> | ||
<Row className='font-weight-medium'> | ||
{externalResource?.type === 'GITHUB_ISSUE' |
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 tied to GitHub unnecessarily and overly complex.
Why not just add the following in Constants
resourceTypes: {
GITHUB_ISSUE: {label:"GitHub Issue", type:"GITHUB", id:1}
}
then
<Row className='font-weight-medium'>
Constants.resourceTypes[externalResource?.type]?.label]
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 added that constant and now I'm using it where it's needed.
placeholder={'Select Type'} | ||
onChange={(v: GitHubStatusType) => setExternalResourceType(v.label)} | ||
options={[ | ||
{ id: 1, type: Constants.githubType.githubIssue }, |
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.
Following above comment this could be Object.values(Constants.resourceTypes).filter((v)=>v.type==='GITHUB')
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.
Done
) | ||
} | ||
|
||
const PermanentRow: FC<PermanentRowType> = ({ |
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.
The term PermanentRow is confusing, it's not obvious what this is
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.
Renamed
5e7e6bc
to
4cbace3
Compare
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
How did you test this code?