Skip to content

feat/Ajustes finais antes da V0#42

Merged
KakeyaK merged 12 commits intomainfrom
feature/finalAdjustmentsForV0
Jun 27, 2025
Merged

feat/Ajustes finais antes da V0#42
KakeyaK merged 12 commits intomainfrom
feature/finalAdjustmentsForV0

Conversation

@KakeyaK
Copy link
Copy Markdown
Contributor

@KakeyaK KakeyaK commented Jun 26, 2025

No description provided.

@KakeyaK KakeyaK requested a review from Copilot June 26, 2025 19:55

This comment was marked as outdated.

@KakeyaK KakeyaK requested a review from Copilot June 26, 2025 20:49
Copy link
Copy Markdown
Contributor

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 mobile drag-and-drop support for subjects, along with UI improvements such as tooltip additions and revised modal behavior.

  • Updated card components to show tooltips for badges and improved drag behavior on mobile
  • Introduced a new state for selected mobile semester and refined subject sorting
  • Adjusted several styles and context logics to support these new interactions

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/views/app.blade.php Added a new title in the header for branding consistency
resources/js/ui/Card/SubjectCard.jsx Added a tooltip for badges using a new badgeTooltip prop
resources/js/ui/Card/SortableCard.jsx Removed the mobile check from isStatic to allow dragging on mobile
resources/js/Pages/LandingPage.jsx Removed unused icon imports and updated header styling
resources/js/Features/SubjectPicker/SubjectPickerContext.jsx Introduced a new state for the mobile semester selection
resources/js/Features/SubjectPicker/Components/SubjectsContainer.jsx Revised the subject sorting logic to prioritize mandatory subjects and added badgeTooltip
resources/js/Features/SubjectPicker/Components/SubjectPickerList.jsx Changed default expandedCategory from a dynamic to a fixed value
resources/js/Features/SubjectInfo/SubjectInfoContext.jsx Extended context to include completed subject status
resources/js/Features/SubjectInfo/SubjectInfo.jsx Enhanced graph loading with a loading state and added subject add/delete actions
resources/js/Features/Semesters/Components/SubjectPlaceholder.jsx Modified to accept a semesterId and update context accordingly
resources/js/Features/Semesters/Components/Semester.jsx Updated placeholder prop naming, expansion logic, and badge tooltip for clarity
resources/js/Features/DragAndDrop/Droppable.jsx Renamed prop for consistency with updated placeholder components
resources/js/Features/CompletionBar/Components/ProgressBar.jsx Enhanced the progress bar with tooltip details and adjusted sizing
resources/js/Features/CompletionBar/CompletionBar.jsx Refactored credits calculations to differentiate planned and completed subjects
resources/js/Contexts/PlansContext.jsx Added computation for completed plans to support new subject info logic
Comments suppressed due to low confidence (1)

resources/js/ui/Card/SubjectCard.jsx:106

  • [nitpick] Consider conditionally rendering the Tooltip only if badgeTooltip is non-empty to avoid rendering an empty tooltip.
    badgeTooltip = "",

const { plansSet } = usePlansContext();

const [expandedCategory, setExpandedCategory] = useState(groups.subgroups.length - 1);
const [expandedCategory, setExpandedCategory] = useState(3);
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Using a fixed default value for expandedCategory may not reflect the dynamic number of groups available. Consider deriving the initial state based on groups.subgroups.length to ensure consistency.

Suggested change
const [expandedCategory, setExpandedCategory] = useState(3);
const [expandedCategory, setExpandedCategory] = useState(() =>
groups.subgroups.length > 0 ? 0 : null
);

Copilot uses AI. Check for mistakes.
Comment thread resources/js/Contexts/PlansContext.jsx Outdated
new Set(
plans.flatMap(semester =>
semester.subjects
.filter(subject => subject.completed === 1)
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

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

If the completed property is a boolean in other parts of the application, using a strict equality check against 1 may fail. Ensure the check matches the data type (e.g., use truthiness or a proper boolean comparison).

Suggested change
.filter(subject => subject.completed === 1)
.filter(subject => !!subject.completed)

Copilot uses AI. Check for mistakes.
@KakeyaK KakeyaK changed the title feat: Agora é possível arrastar matérias no mobile feat/Ajustes finais antes da V0 Jun 26, 2025
@KakeyaK KakeyaK force-pushed the feature/finalAdjustmentsForV0 branch from b1083e5 to 1bf172a Compare June 26, 2025 20:53
@KakeyaK KakeyaK merged commit 1395617 into main Jun 27, 2025
1 check passed
@KakeyaK KakeyaK deleted the feature/finalAdjustmentsForV0 branch July 1, 2025 23:10
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