jacob-ai-bot / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
131 stars 20 forks source link

JACoB PR for Issue Relocate "Add New Repo" Button from Dashboard Sidebar to Settings Page #233

Closed jacob-ai-bot[bot] closed 1 month ago

jacob-ai-bot[bot] commented 1 month ago

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

  1. Remove Button from Sidebar:

    • Locate the Sidebar component in the Dashboard components folder.
    • Remove the "Add New Repo" button code.
  2. Add Button to Settings Page:

    • Open the Settings component.
    • Insert the "Add New Repo" button, ensuring it matches the existing design and styling.
  3. Maintain Functionality:

    • Ensure that the button retains its current functionality, including opening the repository creation modal and handling form submissions.
  4. Update Navigation Links:

    • Verify that any navigation or routing related to the "Add New Repo" button is updated to reflect its new location.

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.

jacob-ai-bot[bot] commented 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

Next Steps

  1. Please review the PR carefully. Auto-generated code can and will contain subtle bugs and mistakes.

  2. 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.

  3. Once the code looks good, approve the PR and merge the code.