Skip to content

Add advanced drag-and-drop and improve component readability#14

Merged
qinscode merged 11 commits into
mainfrom
release
May 20, 2025
Merged

Add advanced drag-and-drop and improve component readability#14
qinscode merged 11 commits into
mainfrom
release

Conversation

@qinscode

@qinscode qinscode commented May 20, 2025

Copy link
Copy Markdown
Owner

Summary of Changes

  • New Features:

    • Added toggle functionality in HeaderControls to switch between "show less" and "show more" states.
    • Persisted isAllExpanded state using localStorage.
    • Implemented enhanced drag-and-drop functionality with ContributorCell and DraggableRow components in the Bonus Marks section.
  • Styling Improvements:

    • Updated typography for filter and expand switches to improve accessibility.
    • Refined font sizes and color consistency across components.
  • Refactoring:

    • Split BonusMarksTab into smaller components, creating new hooks (useBonusMarks and useContributors).
    • Refactored ContributorsTable to support better type safety and organization.
    • Reorganized props and improved maintainability of the RepoUrlsInput component.
  • Miscellaneous:

    • Updated instructions in StudentOrderer for bonus marks recording.
    • Added a navigation tip prefix in repo analysis tabs for better user guidance.

Checklist

  • Unit tests for new functionality
  • Documentation updated where necessary
  • Code reviewed by peers

qinscode added 9 commits May 20, 2025 19:12
- Add "Tips:" prefix to the existing navigation instruction
- Improve user guidance without changing the original functionality
- Created new hooks: useBonusMarks and useContributors
- Moved styles and types into separate files
- Simplified the main BonusMarksTab component
…mponent

- Refactor ContributorsTable to use Array<string> for contributors
- Reorder imports and props for better organization
- Create new DragHandle component for reordering items
- Add ContributorCell and DraggableRow components for better UI control
- Implement more flexible student order handling in useStudentStore
- Refactor ContributorsTable to use new DnD components
- Update BonusMarksTab to reflect changes in student order- Remove unused DragHandle component
…type safety

- Update type definitions in contributorsTableProps and function parameters
- Improve type checking and compatibility with other type systems
- Adjust the order of props passed to RepoUrlsInput for better organization
- This change improves code readability and maintainability
- Decrease font size to 0.7rem for better readability
- Add instruction about easier recording of bonus marks
- Apply secondary text color and increased font weight for better visibility
- Adjust font size and variant for consistency across components
- Add proper labels for accessibility in RepoUrlsInput
- Toggle show less and show more labels in HeaderControls
- Add state persistence for isAllExpanded using localStorage
- Update useCollapseStore to load initial state from localStorage
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 20, 2025

Copy link
Copy Markdown

Deploying githubrepoanalyzer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7eb9dbb
Status: ✅  Deploy successful!
Preview URL: https://4a540306.githubrepoanalyzer.pages.dev

View logs

@qinscode qinscode requested a review from Copilot May 20, 2025 12:42

Copilot AI left a comment

Copy link
Copy Markdown

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 enhances the drag-and-drop functionality and improves component readability by refactoring bonus marks logic, revising styling and typography, and updating several UI labels. Key changes include:

  • Adding customizable row rendering to the DataTable component for improved flexibility.
  • Refactoring bonus marks-related components and hooks (useContributors, useBonusMarks, ContributorsTable, etc.) to support better accessibility and type safety.
  • Updating UI text and styling across components (HeaderControls, ExpandSwitch, StudentOrderer) to enhance user guidance and overall component design.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/github/utils/DataTable.tsx Added an optional renderRow prop for flexible row rendering.
src/components/github/repo-analysis/RepoResults.tsx Updated tab navigation tip text.
src/components/github/forms/RepoUrlsInput.tsx Updated control label rendering with Typography styling.
src/components/github/forms/AnalysisOptions.tsx Adjusted typography for better consistency.
src/components/github/analysis/tabs/bonusMarks/* Added new hooks, refactored bonus marks handling and UI components to improve maintainability and drag-and-drop interactions.
src/components/github/analysis/tabs/SummaryTab.tsx Improved initialization logic dependency handling for student order.
src/components/github/analysis/tabs/BonusMarksTab.tsx Refactored to re-export the new bonus marks implementation.
src/components/github/analysis/components/controls/HeaderControls.tsx Reversed label values on the expand switch to update UI text.
src/components/github/analysis/components/controls/ExpandSwitch.tsx Revised typography settings for label text.
src/components/github/analysis/components/StudentOrderer.tsx Adjusted instructional text and reduced font size for the drag instructions.
Comments suppressed due to low confidence (2)

src/components/github/analysis/components/controls/HeaderControls.tsx:53

  • The labels for showLess and showMore appear to be swapped compared to conventional naming. Please confirm that inverting them aligns with the intended UX guidelines.
showLessLabel="Show More Description"

src/components/github/analysis/components/StudentOrderer.tsx:133

  • Reducing the font size to 0.7rem may impact readability and accessibility for some users. Please ensure that this change meets the accessibility standards and design requirements.
fontSize: "0.7rem",

qinscode added 2 commits May 20, 2025 20:57
- Add project badges and logos
- Enhance feature descriptions
- Improve tech stack section
- Update development setup instructions
- Refactor scripts and project structure sections
- Update license and macOS installation notes
- Move repository logo to the top center
- Adjust logo size to 180x180
- Remove duplicate logo section
- Center align the project title
@qinscode qinscode merged commit f4171f9 into main May 20, 2025
5 checks passed
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.

2 participants