Conversation
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
[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.
| const [expandedCategory, setExpandedCategory] = useState(3); | |
| const [expandedCategory, setExpandedCategory] = useState(() => | |
| groups.subgroups.length > 0 ? 0 : null | |
| ); |
| new Set( | ||
| plans.flatMap(semester => | ||
| semester.subjects | ||
| .filter(subject => subject.completed === 1) |
There was a problem hiding this comment.
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).
| .filter(subject => subject.completed === 1) | |
| .filter(subject => !!subject.completed) |
…ente e exibir o texto correto no tooltip
b1083e5 to
1bf172a
Compare
…inalizar subgroups obrigatórios
No description provided.