Closed jacob-ai-bot[bot] closed 1 month ago
Hello human! đź‘‹
This PR was created by JACoB to address the issue Relocate "Add New Repo" Button from Dashboard Sidebar to Settings Page
Please review the PR carefully. Auto-generated code can and will contain subtle bugs and mistakes.
If you identify code that needs to be changed, please reject the PR with a specific reason. Be as detailed as possible in your comments. JACoB will take these comments, make changes to the code and push up changes. Please note that this process will take a few minutes.
Once the code looks good, approve the PR and merge the code.
Summary:
Description
To enhance the user experience and streamline repository management, we propose moving the "Add New Repo" button from the Dashboard's Layout Sidebar to the Settings page. This change aims to declutter the dashboard and centralize repository-related actions within the Settings interface.
Implementation Details
Remove Button from Sidebar:
Sidebar
component in the Dashboard components folder.Add Button to Settings Page:
Settings
component.Maintain Functionality:
Update Navigation Links:
Expected Outcome
Plan:
Step 1: Edit
/src/app/dashboard/[org]/[repo]/components/Sidebar.tsx
Task: Remove 'Add New Repo' Button from Sidebar Component
Instructions: In the Sidebar component located at '/src/app/dashboard/[org]/[repo]/components/Sidebar.tsx', remove the code responsible for rendering the 'Add New Repo' button. This includes the Link component that wraps the button, any related FontAwesomeIcon imports (such as 'faPlus' from '@fortawesome/free-solid-svg-icons'), and any state or functions specifically used for this button. Ensure that the removal does not affect the layout or functionality of the remaining sidebar elements.
Exit Criteria: The 'Add New Repo' button no longer appears in the Dashboard sidebar, and the sidebar operates without any layout issues or errors.
Step 2: Edit
/src/app/dashboard/[org]/[repo]/settings/Settings.tsx
Task: Add 'Add New Repo' Button to Settings Page
Instructions: In the Settings component at '/src/app/dashboard/[org]/[repo]/settings/Settings.tsx', insert the 'Add New Repo' button below the existing 'Change Setup' button. Use a similar structure and styling as the original button from the Sidebar component. The button should navigate to the '/setup/${org}' route when clicked. Ensure to import necessary modules such as 'Link' from 'next/link', 'FontAwesomeIcon' from '@fortawesome/react-fontawesome', and 'faPlus' from '@fortawesome/free-solid-svg-icons'. Style the button to match the existing design of the Settings page for a consistent user experience.
Exit Criteria: The 'Add New Repo' button is displayed on the Settings page below the 'Change Setup' button. When clicked, it navigates the user to the repository creation page ('/setup/${org}'), maintaining its original functionality.