-
-
Notifications
You must be signed in to change notification settings - Fork 205
Adding authors field #1391 #1392
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: master
Are you sure you want to change the base?
Adding authors field #1391 #1392
Conversation
Signed-off-by: kavdan1 <[email protected]>
Signed-off-by: kavdan1 <[email protected]>
Signed-off-by: kavdan1 <[email protected]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
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
authorfield withauthorsarray throughout the codebase - Added
ProjectAddAuthorModal.vuecomponent 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 |
Copilot
AI
Nov 20, 2025
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.
Button text 'removeAuthor' should be formatted as a proper label. Consider using 'Remove Author' or adding translation support with $t('message.remove_author').
| removeAuthor | |
| {{ $t('message.remove_author') }} |
| <div> | ||
| {{ this.newAuthor.name }} | ||
| </div> |
Copilot
AI
Nov 20, 2025
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 debug output appears to be leftover development code and should be removed from production code.
| <div> | |
| {{ this.newAuthor.name }} | |
| </div> | |
| import { BTable, BTableLite } from 'bootstrap-vue'; | ||
| import ProjectAddVersionModal from './ProjectAddVersionModal.vue'; | ||
| import ProjectAddAuthorModal from './ProjectAddAuthorModal.vue'; |
Copilot
AI
Nov 20, 2025
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.
Imported components BTable, BTableLite, ProjectAddVersionModal, and ProjectAddAuthorModal are not registered in the components section and appear unused. Remove unused imports.
| import { BTable, BTableLite } from 'bootstrap-vue'; | |
| import ProjectAddVersionModal from './ProjectAddVersionModal.vue'; | |
| import ProjectAddAuthorModal from './ProjectAddAuthorModal.vue'; |
| this.availableParents = []; | ||
| this.collectionTags = []; | ||
| this.showCollectionTags = false; | ||
| this.project.authors = []; |
Copilot
AI
Nov 20, 2025
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.
Redundant assignment - project.authors is already reset to an empty array on line 557 within the same resetValues() method.
| this.project.authors = []; |
| </b-tabs> | ||
| <project-details-modal | ||
| :project="cloneDeep(project)" | ||
| :project="project" |
Copilot
AI
Nov 20, 2025
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.
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.
| <label> Authors</label> | ||
| <b-table | ||
| :items="project.authors" | ||
| /> |
Copilot
AI
Nov 20, 2025
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 table is missing column definitions (:fields prop) and appears incomplete. Either define proper columns or remove this incomplete implementation if authors are displayed elsewhere.
| }, | ||
| computed: { | ||
| isFormValid() { | ||
| return this.name && this.email && this.phone; |
Copilot
AI
Nov 20, 2025
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.
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.
| return this.name && this.email && this.phone; | |
| return this.name && this.email; |
| <div> | ||
| <b-modal | ||
| id="projectCreateProjectModal" | ||
| @ok="resetValues()" |
Copilot
AI
Nov 20, 2025
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.
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.
| @ok="resetValues()" | |
| @ok="resetValues()" | |
| @cancel="resetValues()" |
Signed-off-by: kavdan1 <[email protected]>
Description
This PR implements feature to add multiple author details. Issue number #1391
Addressed Issue
Resolves #1391