Skip to content

refactor: clean-up unused imports & fix types errors #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 28, 2025
Merged

refactor: clean-up unused imports & fix types errors #100

merged 16 commits into from
May 28, 2025

Conversation

atyrode
Copy link
Contributor

@atyrode atyrode commented May 28, 2025

This refactor is a frontend-wide clean up of unused imports, useless comments and types errors that were left over after #97

atyrode added 16 commits May 28, 2025 13:21
- Removed the console log statement for 'data' in the useAppConfig hook to clean up the code and improve performance.
- Removed commented-out PostHogProvider and related code to streamline the index.tsx file.
- Ensured the StrictMode wrapper is correctly applied around the QueryClientProvider and application components for better performance and debugging.
- Removed unnecessary comment from the import statement for useAppConfig to improve code clarity.
- Updated the handleOnScrollChange function to remove unnecessary parameters, enhancing code clarity and maintainability.
- Added `@types/react` and `@types/react-dom` as devDependencies in package.json for improved TypeScript support.
- Updated yarn.lock to include the new type definitions and their dependencies.
… overrides

- Eliminated hover background color styles for the dropdown menu button in the _excalidraw-overrides.scss file to streamline the CSS and improve maintainability.
- Removed unnecessary comment from AuthDialog.scss to streamline the styles.
- Changed the type of `warningText` prop in AuthDialog from string to React.ReactNode for better flexibility in rendering content.
- Moved the import statements for AccountDialog and MainMenu.scss to improve code organization.
- Added spacing for better readability in the MainMenu.tsx file.
- Introduced a new _defaults.scss file to define CSS variables for slider and range track styles.
- Updated index.scss to include the new defaults for improved styling consistency across components.
- Eliminated default CSS variables for slider and range track styles from Range.scss to streamline the styling process.
- Added appearance property to the range input for improved cross-browser compatibility.
- Removed unused useState import from TabContextMenu.tsx to enhance code clarity and reduce unnecessary dependencies.
- Updated the ref assignment for tab titles to use a block statement for better readability and consistency in the Tabs.tsx file.
- Updated the type casting for user_id in the Collab component to ensure proper type handling of SocketId, improving code reliability and clarity.
- Removed unused state and handlers related to the SettingsDialog in App.tsx to streamline the component.
- Added state management and conditional rendering for SettingsDialog in MainMenu.tsx, enhancing user experience and functionality.
- Added UserSettings interface in a new types.ts file to define user settings structure.
- Introduced DEFAULT_SETTINGS constant in constants.ts for default user settings.
- Updated imports in SettingsDialog and canvas files to reference the new constants and types, enhancing code organization and type safety.
…code

- Removed commented-out imports, state, and handlers related to SettingsDialog in App.tsx to streamline the component and improve code clarity.
@atyrode atyrode merged commit 3da1788 into main May 28, 2025
1 check passed
@atyrode atyrode deleted the cleanup branch May 28, 2025 14:25
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.

1 participant