Skip to content

Conversation

@kavya-danivas
Copy link

Description

This PR implements feature to add multiple author details. Issue number #1391

Addressed Issue

Resolves #1391

Copilot AI review requested due to automatic review settings November 20, 2025 10:05
@owasp-dt-bot
Copy link

owasp-dt-bot commented Nov 20, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for multiple authors in projects by replacing the single author field with an authors array. The implementation includes a new modal component for adding authors and updates the UI to display and manage multiple author entries.

Key Changes:

  • Replaced single author field with authors array throughout the codebase
  • Added ProjectAddAuthorModal.vue component for adding new authors
  • Updated project creation and editing flows to support multiple authors

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
ProjectDetailsModal.vue Updated to display authors table and integrate add author functionality
ProjectCreateProjectModal.vue Added embedded author management modal with add/remove capabilities
ProjectAddAuthorModal.vue New reusable modal component for adding individual authors
Project.vue Integrated author modal and removed deep cloning of project object
ComponentDetailsModal.vue Updated component author field from author to authors
en.json Added translation keys for author-related UI elements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<b-form-textarea id="project-description-description" v-model="project.copyright" rows="3" />
<template #cell(actions)="row">
<b-button size="sm" variant="danger" @click="removeAuthor(row.index)">
removeAuthor
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Button text 'removeAuthor' should be formatted as a proper label. Consider using 'Remove Author' or adding translation support with $t('message.remove_author').

Suggested change
removeAuthor
{{ $t('message.remove_author') }}

Copilot uses AI. Check for mistakes.
Comment on lines 269 to 271
<div>
{{ this.newAuthor.name }}
</div>
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

This debug output appears to be leftover development code and should be removed from production code.

Suggested change
<div>
{{ this.newAuthor.name }}
</div>

Copilot uses AI. Check for mistakes.
Comment on lines 315 to 317
import { BTable, BTableLite } from 'bootstrap-vue';
import ProjectAddVersionModal from './ProjectAddVersionModal.vue';
import ProjectAddAuthorModal from './ProjectAddAuthorModal.vue';
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Imported components BTable, BTableLite, ProjectAddVersionModal, and ProjectAddAuthorModal are not registered in the components section and appear unused. Remove unused imports.

Suggested change
import { BTable, BTableLite } from 'bootstrap-vue';
import ProjectAddVersionModal from './ProjectAddVersionModal.vue';
import ProjectAddAuthorModal from './ProjectAddAuthorModal.vue';

Copilot uses AI. Check for mistakes.
this.availableParents = [];
this.collectionTags = [];
this.showCollectionTags = false;
this.project.authors = [];
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Redundant assignment - project.authors is already reset to an empty array on line 557 within the same resetValues() method.

Suggested change
this.project.authors = [];

Copilot uses AI. Check for mistakes.
</b-tabs>
<project-details-modal
:project="cloneDeep(project)"
:project="project"
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Removing cloneDeep() means the modal now receives a direct reference to the project object. Modifications in the modal will mutate the parent's data directly, potentially causing unintended side effects if changes are cancelled. Consider restoring the deep clone or implementing proper change handling.

Copilot uses AI. Check for mistakes.
Comment on lines +118 to +121
<label> Authors</label>
<b-table
:items="project.authors"
/>
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The table is missing column definitions (:fields prop) and appears incomplete. Either define proper columns or remove this incomplete implementation if authors are displayed elsewhere.

Copilot uses AI. Check for mistakes.
},
computed: {
isFormValid() {
return this.name && this.email && this.phone;
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Form validation requires phone to be filled, but phone is not marked as required in the form group (line 13-15) and should be optional based on typical contact information patterns. Remove this.phone from the validation condition or mark the phone field as required in the UI.

Suggested change
return this.name && this.email && this.phone;
return this.name && this.email;

Copilot uses AI. Check for mistakes.
<div>
<b-modal
id="projectCreateProjectModal"
@ok="resetValues()"
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Changed from @hide to @ok means resetValues() only executes when OK is clicked, not when the modal is dismissed by other means (ESC, backdrop click, X button). This could leave stale data when reopening the modal. Consider reverting to @hide or adding @cancel='resetValues()' as well.

Suggested change
@ok="resetValues()"
@ok="resetValues()"
@cancel="resetValues()"

Copilot uses AI. Check for mistakes.
Signed-off-by: kavdan1 <[email protected]>
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.

Adding multiple authors field

2 participants