Skip to content

the creator of a meeting is now shown as required#4235

Open
glickgNU wants to merge 4 commits into
developfrom
#4233-creator-required-attendee
Open

the creator of a meeting is now shown as required#4235
glickgNU wants to merge 4 commits into
developfrom
#4233-creator-required-attendee

Conversation

@glickgNU
Copy link
Copy Markdown
Contributor

Changes

  • the creator of a meeting is now shown as a required attendee for a meeting.

Notes

Test Cases

  • Having the creator not marked as a required member will still be shown as a required member.
  • Having the creator marked as a required member will make the creator show up once as a required member

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4233

Copy link
Copy Markdown
Contributor

@staysgt staysgt left a comment

Choose a reason for hiding this comment

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

Looks good so far! Just a few small comments

Comment on lines +424 to +431
// Returns whether the event creator is part of the list of required members
const creatorInRequiredMembers = () => {
for (const member of requiredMemberIds) {
if (member === submitter.userId) return true;
}
return false;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This helper can be reduced to requiredMemberIds.includes(submitter.userId), so you can get rid of the function and replace its call with that line

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, instead of recomputing multiple times whether the creator is in the required members, it would be cleaner to just set a const a the top of the function called allRequiredMembers that has the set of required members + creator, and then use that throughout

Comment on lines +759 to +766
// Returns whether the event creator is part of the list of required members
const creatorInRequiredMembers = () => {
for (const member of requiredMemberIds) {
if (member === submitter.userId) return true;
}
return false;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just like above, can also be replaced with requiredMemberIds.includes(submitter.userId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The const allRequiredMembers should also be done in here as well

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.

[Maintenance] - Creator of Event Marked as Required Attendee

2 participants