-
Notifications
You must be signed in to change notification settings - Fork 726
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 <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
…tDev/crowd.dev into feat/integrations-ui-improvement
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
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 <elim@linuxfoundation.org>
|
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 <elim@linuxfoundation.org>
|
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 <elim@linuxfoundation.org>
|
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/github-nango/components/settings/github-settings-drawer.vue
Show resolved
Hide resolved
|
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/github/components/github-mappings-display.vue
Show resolved
Hide resolved
| export default { | ||
| name: 'LfGitSettingsEmpty', | ||
| }; | ||
| </script> |
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.
Nearly identical empty state components for Git and Gerrit
Low Severity
The new git-settings-empty.vue and gerrit-settings-empty.vue components are nearly identical, differing only in the platform name ("Git" vs "Gerrit") in the title and description text. Both components have the same structure, styling, icon, button, and emit behavior. This could be a single reusable component that accepts the platform name as a prop, reducing duplication and ensuring consistent empty state UI across integrations.
Additional Locations (1)
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
|
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. |
1 similar comment
|
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.
| export default { | ||
| name: 'LfxTabs', | ||
| }; | ||
| </script> |
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.
New LfxTabs duplicates existing LfTabs component logic
Low Severity
The new LfxTabs and LfxTab components duplicate the existing LfTabs and LfTab components almost entirely. Both implementations share identical props, computed properties, watchers, route fragment handling, and event emission logic. The only differences are CSS class names (c-tabs vs lfx-c-tabs). This duplicates all the tab management logic unnecessarily and creates two parallel implementations to maintain.
In this PR
Ticket
CM-892
Note
Medium Risk
Mostly UI/UX changes, but it also alters integration connect/disconnect flows (GitHub v1/v2 selection, Git/Gerrit validation and mirrored-repo blocking) which could impact user ability to manage integrations if regressions occur.
Overview
Integrations UI refresh across the admin project list and drawers. The integrations list page is redesigned (new
lfxtabs with hash syncing, updated card layout, reordered integrations, added “Learn more” docs links) and removes the old GitHub version toggle; GitHub connect is now a dropdown offering v1 vs v2, with new v1/v2 tags.Integration drawers are standardized with a new
DrawerDescription(shows integration description + docs link), updated drawer/header/footer styling, and widespread button style changes (newoutlineanddanger-ghostbutton types, rounded inputs/selects). Git/Gerrit settings drawers gain empty states, improved remote URL entry (including labeled inputs), mirrored-repo awareness (separating native vs mirrored repos), “revert changes”, and disconnect flows guarded by a new typed confirmation modal and tooltips when Git is mirroring repos.Written by Cursor Bugbot for commit d223e93. This will update automatically on new commits. Configure here.