-
Notifications
You must be signed in to change notification settings - Fork 727
feat: integrations UI improvement #3775
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
…tDev/crowd.dev into feat/integrations-ui-improvement
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
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.
Conventional Commits FTW!
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
3 similar comments
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
frontend/src/config/integrations/gerrit/components/gerrit-settings-drawer.vue
Show resolved
Hide resolved
gaspergrom
left a comment
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.
General observations from the code review.
|
|
||
| // Track mirrored repos (sourceIntegrationId != gitIntegrationId) | ||
| const mirroredRepoUrls = ref<string[]>([]); | ||
| const reposNoMirrored = computed(() => repositories.value.filter((r) => !mirroredRepoUrls.value.includes(r))); |
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.
Variable naming could be more descriptive - consider nonMirroredRepos or nativeRepos instead of reposNoMirrored.
| if (code && !source && state !== 'noconnect') { | ||
| isFinishingModalOpen.value = true; | ||
| doGithubConnect({ | ||
| code, |
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.
Function name has a typo: finallizeGithubConnect should be finalizeGithubConnect (double 'l').
|
|
||
| const emit = defineEmits<{(e: 'update:modelValue', value: boolean): void}>(); | ||
|
|
||
| const disconnectConfirm = ref(''); |
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.
Consider resetting disconnectConfirm when the modal closes to avoid stale state if the user reopens it.
| const instance = getCurrentInstance(); | ||
| return instance?.parent; | ||
| }); | ||
|
|
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 could throw if parent is null. Add optional chaining: parent.value?.props?.modelValue to avoid potential runtime errors.
| // Active | ||
| --lf-btn-outline-active-text: var(--lf-color-gray-900); | ||
| --lf-btn-outline-active-background: var(--lf-color-white); | ||
| --lf-btn-outline-active-border: var(--lf-color-gray-200); |
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.
Copy-paste issue here - the disabled and loading variables for 'outline' are using secondary-link prefixed variables instead of outline. Should be --lf-btn-outline-disabled-* and --lf-btn-outline-loading-*.
| integrationKey: string; | ||
| }>(); | ||
|
|
||
| const integration = computed(() => lfIntegrations()[props.integrationKey]); |
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 calls lfIntegrations() on every component render since it's inside a computed property. Consider memoizing this or passing the integration config as a prop from the parent to avoid repeated object instantiation.
| const repoNameFromUrl = (url: string) => url.split('/').at(-1); | ||
|
|
||
| onMounted(() => { | ||
| // mappedReposWithOtherProject.value = {"project":"Project Test","repositories":[{"url":"https://github.com/emlim23/array-flattener"}]}; |
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.
Commented debug code should be removed before merging.
| const hasChanges = computed(() => repositories.value.length !== initialRepositories.value.length | ||
| || JSON.stringify(repoMappings.value) !== JSON.stringify(initialRepoMappings.value)); | ||
|
|
||
| // Drawer visibility |
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 hasChanges comparison using JSON.stringify works but can be fragile if object key order changes. For shallow objects like this it's probably fine, but consider using a utility like lodash's isEqual for more robust deep comparison if this becomes more complex.
| required: (value: string[]) => value.length > 0 && value.every((v) => v.trim() !== ''), | ||
| }, | ||
| }, form, { $stopPropagation: true }); | ||
|
|
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 validation for repoNames checks if every value is non-empty, but the form initializes with repoNames: ['']. This will immediately fail validation when the empty state toggle adds a repo. You might want to either initialize with an empty array or adjust the validation to skip empty strings during initial state.
| <h6 class="mb-0.5"> | ||
| {{ props.config.name }} | ||
| <h6 v-if="isV2" class="mb-0.5 flex items-center gap-2"> | ||
| 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.
Hardcoded 'Github' string here instead of using props.config.name. Should probably be 'GitHub' (capital H) for consistency with branding.
| // inte.status = 'done'; | ||
| // return inte; | ||
| // }); | ||
| const status = computed(() => getIntegrationStatus(integration.value)); |
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.
Commented debug code should be removed before merging.
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
frontend/src/config/integrations/gerrit/components/gerrit-settings-drawer.vue
Show resolved
Hide resolved
Signed-off-by: Efren Lim <[email protected]>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Signed-off-by: Efren Lim <[email protected]>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
frontend/src/config/integrations/gitlab/components/gitlab-settings-drawer.vue
Outdated
Show resolved
Hide resolved
Signed-off-by: Efren Lim <[email protected]>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
| const isDisconnectIntegrationModalOpen = ref(false); | ||
|
|
||
| const hasChanges = computed(() => repositories.value.length !== initialRepositories.value.length | ||
| || !isEqual(repoMappings.value, initialRepoMappings.value)); |
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.
hasChanges computed ignores organization sync state changes
Low Severity
The hasChanges computed only compares repositories.value.length and repoMappings.value, but ignores changes to organizations.value. When a user toggles an organization's full sync status, the organizations array changes but hasChanges remains false. This causes the "Revert changes" button to not appear, even though revertChanges() does revert organization changes and buildSettings() uses the organizations array to set the fullSync flag.
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
| @click="close" | ||
| > | ||
| <lf-icon name="xmark" :size="20" class="text-gray-900 group-hover:text-primary-500" /> | ||
| </lf-button> |
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.
Drawer close icon hover effect broken by missing group class
Low Severity
The close button icon uses group-hover:text-primary-500 to change color on hover, but this requires a parent element with the group class. The old code had class="... group" on the button wrapper, but the refactored code removed this class while keeping the group-hover utility on the icon. Without a group class parent, the Tailwind group-hover utility has no effect, and the icon will remain text-gray-900 on hover instead of changing to text-primary-500.
In this PR
Ticket
CM-892
Note
Major integrations UX refresh with new components, styles, and flows.
outlineanddanger-ghostbutton variants; migrate connect/cancel actions tooutline, round primary actions, and tweak shadows/layoutDrawerDescription(with docs links) and apply across integration drawers; add disconnect confirmation modalWritten by Cursor Bugbot for commit a240262. This will update automatically on new commits. Configure here.