feat: hide days on preview settings & ui bug fixes#203
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature to hide days without classes in the plan view and includes several related changes across multiple files. The most important changes are listed below:
New Feature: Hide Days Without Classes
frontend/src/app/plans/_components/download-button.tsx: Added a newhideDaysprop to theDownloadPlanButtoncomponent and updated the download tracking to include thehideDaysstate. [1] [2]frontend/src/app/plans/edit/[id]/_components/hide-days-settings.tsx: Created a newHideDaysSettingscomponent that includes a switch to toggle thehideDaysstate and tracks the setting change. (frontend/src/app/plans/edit/[id]/_components/hide-days-settings.tsxR1-R26)frontend/src/app/plans/edit/[id]/page.client.tsx: Integrated theHideDaysSettingscomponent into the plan editing page, added state management forhideDays, and ensured the setting is persisted inlocalStorage. Also, updated the rendering logic to conditionally hide days without classes based on thehideDaysstate. (frontend/src/app/plans/edit/[id]/page.client.tsxR53, frontend/src/app/plans/edit/[id]/page.client.tsxR70, frontend/src/app/plans/edit/[id]/page.client.tsxR224-R228, frontend/src/app/plans/edit/[id]/page.client.tsxL520-R528, frontend/src/app/plans/edit/[id]/page.client.tsxL531-R541, frontend/src/app/plans/edit/[id]/page.client.tsxL593-R608)Code Improvements
frontend/src/app/plans/preview/[id]/page.client.tsx: Simplified the plan copying logic by spreading theplanobject, and improved the layout and styling of theSharePlanPagecomponent. (frontend/src/app/plans/preview/[id]/page.client.tsxL28-R28, frontend/src/app/plans/preview/[id]/page.client.tsxL38-R38, frontend/src/app/plans/preview/[id]/page.client.tsxL47-R48, frontend/src/app/plans/preview/[id]/page.client.tsxL65-R65)