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

GitHub integration #81

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

czezi
Copy link
Collaborator

@czezi czezi commented Jul 19, 2024

Description

Related Issues

Solution and Design

Test Plan

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.


export const deleteGithubIntegration = async () => {
const response = await api.delete(`/integrations/github`);
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

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

what will happen if the API call fails, in that case we won't have data plus there is no error handling here. Better to move the retrieval and error handling outside the Dashboard Service layer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You operate on the retrieved data or catch it and decide what to do later. You separate multiple layers and reuse based on use case. Never mix api calls and ui actions, it's an anti pattern.

{project.project_repository && (
<div className="flex items-center">
<div className="-mt-1 mr-2 h-3.5 w-3.5">
<svg viewBox="0 0 24 24" className="fill-current">
Copy link
Collaborator

Choose a reason for hiding this comment

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

sir please add the image in the public dir, add that image to imagePath and then use it from there

>
<div className="flex items-center">
<div className="mr-4 h-10 w-10">
<svg viewBox="0 0 24 24" className="fill-current">
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here move the images to public dir

{isExternalGitIntegration === undefined ? (
<></>
) : isExternalGitIntegration === false ? (
<button
Copy link
Collaborator

Choose a reason for hiding this comment

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

please use from next ui instead of standard button tag

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can't use standard button, link kind of button isn't supported by nextui.

gui/src/app/settings/settings.module.css Outdated Show resolved Hide resolved
.integrate_github_container {
background-color: #262628;
border-radius: 0.5rem;
border-left: #a8a8a8 0.3rem solid;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the similar hexcode is already define so please use it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using colors with transparency is a very bad idea, they look different on different backgrounds, please fix it when you get time.

@@ -17,6 +18,7 @@ export interface ProjectTypes {
project_description: string;
project_hash_id: string;
project_url: string;
project_repository: string | undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

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

in ts, both null and undefined are treated as two different distinct types and mostly we deal with null than undefined so add that as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Repository
</label>
<div className="flex items-center space-x-4">
<label className="flex items-center">
Copy link
Collaborator

Choose a reason for hiding this comment

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

this radio component is way to length, make it into a component and use it here. create a dir for it and module css for the same component

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doesn't make sense, this radio button has a defined structure no evidence it'll be reusable later.

clearInterval(interval);
}
},
1000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

setInterval function normally takes only two primary arguments, the callback and the delay, so Ig the second 1000 is redundant.

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.

2 participants