Skip to content

refactor: add frontend coding convention for component structure and update Google connection types#1596

Merged
tyler-dane merged 2 commits intomainfrom
refactor/component-per-file-google-connect
Apr 3, 2026
Merged

refactor: add frontend coding convention for component structure and update Google connection types#1596
tyler-dane merged 2 commits intomainfrom
refactor/component-per-file-google-connect

Conversation

@tyler-dane
Copy link
Copy Markdown
Contributor

@tyler-dane tyler-dane commented Apr 3, 2026

  • Introduced a new guideline in the coding conventions document specifying that each React component should be placed in its own file to enhance modularity.
  • Removed the optional "tone" property from the Google connection sidebar status type for cleaner type definitions.
  • Refactored the Google connection utility to utilize a new buildRepairDialog function, improving the organization of repair dialog logic.
  • Created a new MonthNavButton component to encapsulate month navigation button functionality in the DatePicker, promoting reusability and clarity.

Note

Low Risk
Low risk refactor and documentation update; main impact is TypeScript type tightening and small DatePicker prop/ref handling changes that could affect calendar navigation or callbacks if miswired.

Overview
Updates developer docs with a new frontend convention to keep one React component per file.

Simplifies Google Calendar connect UI configuration by removing the sidebarStatus.tone field and deduplicating the repair dialog content via a shared buildRepairDialog helper.

Refactors DatePicker to extract month navigation buttons into a new MonthNavButton component and tweaks prop handling (default portalId, callback forwarding, and ref assignment) while preserving the existing UI behavior.

Written by Cursor Bugbot for commit f0906a4. This will update automatically on new commits. Configure here.

…te Google connection types

- Introduced a new guideline in the coding conventions document specifying that each React component should be placed in its own file to enhance modularity.
- Removed the optional "tone" property from the Google connection sidebar status type for cleaner type definitions.
- Refactored the Google connection utility to utilize a new `buildRepairDialog` function, improving the organization of repair dialog logic.
- Created a new `MonthNavButton` component to encapsulate month navigation button functionality in the DatePicker, promoting reusability and clarity.
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue. You can view the agent here.

Comment thread packages/web/src/components/DatePicker/MonthNavButton.tsx
…vButton component

- Refactored the DatePicker component to destructure props for improved readability and maintainability.
- Removed the onInputBlur prop to simplify the interface.
- Integrated the new MonthNavButton component for month navigation, enhancing modularity and reusability.
- Updated the renderCustomHeader method to utilize the new MonthNavButton for previous and next month navigation, improving code clarity.
@tyler-dane tyler-dane merged commit 53ec8ea into main Apr 3, 2026
9 checks passed
@tyler-dane tyler-dane deleted the refactor/component-per-file-google-connect branch April 3, 2026 05:14
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