-
App.css:- Updated
.note-iconto.note-icon-buttonfor better specificity. - Refined styles for
.mechanical-pencilwith wiggle animation on key press. - Removed redundant styles for
.note-bubbleand adjusted styles for new.cloud*classes for fade-in animations.
- Updated
-
DeleteButton.tsx:- New atom component for rendering a delete button with SVG.
-
LockButton.tsx:- New atom component for rendering a lock button with SVG.
-
NoteButton.tsx:- New atom component for rendering a note button with SVG.
- Handles note-related interactions with dynamic styles based on the state.
-
TimeBlock.tsx:- Refactored to use new atom components:
LockButton,DeleteButton, andNoteButton. - Integrated
useTimeBlockHandlersto manage interactions and state. - Removed inline logic for mouse and key events, delegating them to a custom hook.
- Refactored to use new atom components:
-
NoteBubble.tsx:- Refined to use
bubblePositionfor more accurate positioning. - Added animation and transition for visibility and position changes.
- Replaced
CloudShapewith direct styling for note display.
- Refined to use
TimeBlockContext.tsx:- Introduced
useNotescustom hook to manage notes state. - Removed inline
setNoteForTimeBlockanddeleteNoteForTimeBlockin favor of using the hook.
- Introduced
-
useLoadTimeBlocks.ts:- Updated to use
setNoteForTimeBlockdirectly for managing notes during load.
- Updated to use
-
useNotes.ts:- New custom hook for managing notes, providing
setNoteForTimeBlockanddeleteNoteForTimeBlock.
- New custom hook for managing notes, providing
-
useTimeBlockHandlers.ts:- New custom hook to encapsulate logic for handling time block interactions such as locking, deleting, and note interactions.
colorGenerator.ts:- Added
hexToRgbafunction for converting hex colors to RGBA format.
- Added
CloudShape.tsx:- Removed SVG component as the note styling was simplified.
-
TimeBlock.tsx:- Integrated
NoteBubblecomponent for note-taking functionality. - Added logic to manage note visualization and interaction.
- Updated hover logic to include note icons with interactive effects.
- Integrated
-
NoteBubble.tsx:- Introduced as a new component to handle note creation and editing within time blocks.
- Utilizes a cloud-like interface for notes with keyboard shortcuts for saving and closing.
-
CloudShape.tsx:- Added as a new SVG component to render cloud-like shapes for notes.
- Supports dynamic scaling and color customization.
TimeBlockContext.tsx:- Extended context to manage notes associated with time blocks.
- Added
setNoteForTimeBlockanddeleteNoteForTimeBlockfunctions for note management.
useLoadTimeBlocks.ts:- Updated to include loading of notes associated with time blocks.
- Integrated note state management alongside time block loading.
db.ts:- Introduced a new
NOTE_STOREin IndexedDB to handle note persistence. - Added functions for saving, loading, and deleting notes.
- Introduced a new
-
TimeBlockGrid.tsx:- Improved persistence mechanism and code refactoring.
- Enhanced the
renderTimeBlocksmethod to include formatted time ranges for better display clarity. - Removed unnecessary
useEffectand adjusted position calculations for time blocks.
-
TimeBlock.tsx:- Updated to include a new
timeRangeprop for displaying time ranges on hover. - Refined hover logic for interactive elements like padlock, bin, and note icons.
- Updated to include a new
TimeBlockContext.tsx:- Added
useEffecthooks for loading and saving time blocks to persistent storage.
- Added
-
useConfetti.ts:- Refactored to improve confetti trigger logic.
-
useTimeBlockPlacement.ts:- Enhanced mouse event handling and introduced new logic to prevent event propagation from buttons.
- Updated type imports to maintain consistency with database schema.
db.ts:- Streamlined load and save operations with better error handling.
index.tsx:- Temporarily removed
React.StrictModefor debugging.
- Temporarily removed
- Updated
.prettierrcto adjustprintWidth.
- Added
COMMANDS.mdwith useful command instructions.
- Enhanced documentation with structured headings and updated project summary.
- Streamlined ESLint setup for better TypeScript and Prettier integration.
- Added
@types/canvas-confettifor improved typing support.
- Improved styling and animations for time blocks, with additions for stretching and bouncing effects.
- Significant refactoring to split into smaller components (TimeBlockGrid, ScaleColumn, etc.).
-
Introduced design tokens using CSS variables for better maintainability and theming.
-
App.css:- Introduced
.time-block-wrapperfor improved layout management and hover effects. - Added styles for
.note-iconwith interactive effects. - Refined
.time-indicatorstyling for better alignment and visibility.
- Introduced
- Continued refactoring to enhance readability and performance.
- Updated
tsconfig.jsonfor better compatibility and module resolution.
- Converted project files from JavaScript to TypeScript for improved type safety and maintainability.
TimeBlockContext.tsx:- Added TypeScript interfaces and types.
db.ts:- Defined database schema and updated functions with TypeScript types.
-
Refactored components to include TypeScript types for props and state management.
-
TimeBlockPreview.tsx:- Updated to include the
colorprop for enhanced styling consistency.
- Updated to include the
- Set up ESLint for linting JavaScript and TypeScript files.
- Configured Prettier for consistent code formatting, integrating it with ESLint.
- Added necessary configuration files for ESLint and Prettier.
- Updated
package.jsonto include scripts for linting and formatting.
- Installed necessary ESLint and Prettier plugins and configurations.
-
TimeBlock.tsx:- Introduced
useReffor block reference and cursor management. - Added
blockIdprop andblockPropsfor enhanced block handling. - Implemented
handleMouseMovefor resizing interactions. - Wrapped delete and note buttons in a conditional rendering based on
isSelectedSchedule.
- Introduced
-
TimeBlockPreview.tsx:- Refactored to
TimeBlockPreviewComponentand memoized for performance.
- Refactored to
-
TimeBlockGrid.tsx:- Imported utility functions from
timeBlockUtilsfor cleaner code. - Enhanced block rendering logic to support resizing and duplication.
- Integrated
useReffor managing resizing state. - Centralized block rendering logic using a helper function.
- Improved performance and maintainability by refactoring repetitive logic.
- Imported utility functions from
TimeBlockContext.tsx:- Removed inline
useEffecthooks and replaced with custom hooks (useFetchSchedules,useLoadTimeBlocks,useSaveData) for better separation of concerns and code readability.
- Removed inline
-
useTimeBlockPlacement.ts:- Introduced constants and utilities for resizing and placement logic.
- Enhanced mouse event logic to handle block resizing.
- Utilised
resizeStateReffor managing resize state. - Added logic for duplicating blocks across days using CMD + Click.
-
Added:
useFetchSchedules.ts: Custom hook to load schedules and associated time blocks.useLoadTimeBlocks.ts: Custom hook for loading time blocks based on active schedules.useSaveData.ts: Custom hook to save schedules and time blocks persistently.
db.ts:- Added console logging for saved time blocks to aid debugging.
- Added
timeBlockUtils.ts:- Centralized utility functions for block formatting, styling, and event handling.
README.md:- Removed redundant sections to streamline content and improve focus on current features and instructions.
-
TimeBlock.tsx:- Introduced
useReffor block reference and cursor management. - Added
dayIndexprop to manage time blocks for specific days. - Implemented
handleMouseMoveto change cursor style when hovering near the top/bottom edges of a time block, enabling resizing interactions. - Replaced inline delete logic with a dedicated
handleDeleteClickfunction, which triggers confetti on delete action and updates the time blocks state accordingly.
- Introduced
-
TimeBlockPreview.tsx:- Refactored to remove the
blockPropsprop and directly accepttop,height, andtimeRangeprops for improved clarity and performance.
- Refactored to remove the
-
TimeBlockGrid.tsx:- Enhanced mouse event handling to manage resizing and repositioning of time blocks more effectively.
- Updated handling of mouse down events to support drag-and-drop functionality for time blocks, allowing for duplication and repositioning.
- Simplified rendering logic by integrating a new
calculateBlockPropsutility function for determining block dimensions and positions. - Improved error handling and console logging for debugging schedule and block ID issues.
TimeBlockContext.tsx:- Removed inline
useEffecthooks in favour of custom hooks for better separation of concerns and improved readability.
- Removed inline
useTimeBlockPlacement.ts:- Refactored to improve control over the resizing and repositioning of time blocks, including new logic for handling event propagation and mouse movements.
- Introduced references for managing the state of resizing, creating, duplicating, and repositioning time blocks.
timeBlockUtils.ts:- Updated
shouldRenderBlockutility to account for both resizing and repositioning states, enhancing block visibility logic.
- Updated
constants.ts:- Added
RESIZE_THRESHOLDconstant for consistent handling of resizing interactions across components.
- Added
db.ts:- Streamlined save operations with improved error handling and logging.