ParabolInc / parabol

Free online agile retrospective meeting tool
https://www.parabol.co/
Other
1.91k stars 326 forks source link

chore: Make meeting series naming consistent #9928

Closed Dschoordsch closed 2 months ago

Dschoordsch commented 3 months ago

Fixes #9928

Make the meeting name a separate parameter so it can be used for the meeting, meeting series and gcal event. This makes everything more consistent.

Demo

https://www.loom.com/share/63b49765c63b4575a59838ab4fc8a402?sid=5fd46150-274e-4b70-baad-08d12521516a

Testing scenarios

[Please list all the testing scenarios a reviewer has to check before approving the PR]

Final checklist

Summary by CodeRabbit

coderabbitai[bot] commented 3 months ago

Walkthrough

The changes across multiple files focus on simplifying the handling of recurrence settings by removing the RecurrenceSettingsInput type and directly using name and rrule parameters. This modification affects various components, mutations, and tests by updating the function signatures and parameters to reflect this new approach.

Changes

Files Change Summary
…/ActivityLibrary/ActivityDetailsSidebar.tsx, …/ActivityLibrary/ScheduleMeetingButton.tsx Updated the handleStartActivity function to accept name and rrule instead of RecurrenceSettingsInput.
…/Recurrence/EndRecurringMeetingModal.tsx, …/Recurrence/UpdateRecurrenceSettingsModal.tsx Modified the structure of UpdateRecurrenceSettingsMutation to directly pass name and rrule instead of recurrenceSettings object.
…/ScheduleDialog.tsx Changed the onStartActivity function signature to use name, rrule, and gcalInput directly.
…/mutations/StartRetrospectiveMutation.ts, …/mutations/StartTeamPromptMutation.ts Updated mutation parameters to replace recurrenceSettings with name and rrule.
…/mutations/UpdateRecurrenceSettingsMutation.ts Changed the mutation function's signature to use name and rrule instead of recurrenceSettings.
…/__tests__/startRetrospective.test.ts Updated mutation parameters in tests and added a test for naming a single retro. Changed the default name for retrospectives.
…/graphql/public/types/CreateGcalEventInput.ts Removed the title field from the CreateGcalEventInput GraphQL input object type.
…/dataloader/customLoaderMakers.ts Added a new exported function meetingCount to calculate the count of meetings based on team ID and meeting type.
…/graphql/mutations/helpers/safeCreateRetrospective.ts, …/graphql/public/mutations/startRetrospective.ts Required the name parameter and adjusted the logic for generating meeting names. Updated resolver to accept name, rrule, and gcalInput parameters, fetching additional data concurrently and modifying parameters for meeting creation and Google Calendar event handling.

Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 0fb3d7e5db8c28c08ddeb1df3f251c2d187e2c43 and 00cd524d1ab0018c801076d06b7bc8c970e4c4c9.
Files selected for processing (6) * packages/client/components/ActivityLibrary/ScheduleMeetingButton.tsx (3 hunks) * packages/client/components/Recurrence/RecurrenceSettings.tsx (1 hunks) * packages/client/components/ScheduleDialog.tsx (4 hunks) * packages/server/dataloader/customLoaderMakers.ts (1 hunks) * packages/server/graphql/mutations/helpers/safeCreateRetrospective.ts (3 hunks) * packages/server/graphql/public/mutations/startRetrospective.ts (6 hunks)
Files skipped from review as they are similar to previous changes (2) * packages/client/components/ActivityLibrary/ScheduleMeetingButton.tsx * packages/server/graphql/public/mutations/startRetrospective.ts
Additional context used
Learnings (1)
packages/server/graphql/mutations/helpers/safeCreateRetrospective.ts (1)
``` Learnt from: Dschoordsch PR: ParabolInc/parabol#9928 File: packages/server/graphql/mutations/helpers/safeCreateRetrospective.ts:19-19 Timestamp: 2024-07-08T08:50:33.211Z Learning: When verifying the presence of parameters in function calls, ensure to use a sufficiently large context size to capture the complete function call. ```
Additional comments not posted (4)
packages/client/components/ScheduleDialog.tsx (2)
`34-34`: **Update the `onStartActivity` function signature.** The function signature now includes `name` and `rrule`. Ensure that these parameters are correctly handled in the function implementation. --- `101-117`: **Verify the construction and validation of `name`.** The `handleSubmit` function constructs the `name` variable and validates it before passing it to `onStartActivity`. Ensure that `name` is correctly validated and propagated.
packages/client/components/Recurrence/RecurrenceSettings.tsx (1)
`258-258`: **Verify the display of the next meeting name.** The `title` parameter is used to show the next meeting name in the description. Ensure that the `title` is correctly handled and displayed.
packages/server/dataloader/customLoaderMakers.ts (1)
`862-884`: **Ensure proper implementation and usage of `meetingCount`.** The `meetingCount` function calculates the count of meetings based on team ID and meeting type. Ensure that the function is correctly implemented and used. Consider adding error handling and logging if necessary.
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.