Skip to content

Conversation

shashjar
Copy link
Member

@shashjar shashjar commented Oct 7, 2025

Migrates usage of deprecatedRouteProps for TeamDetails (sentry/views/settings/organizationTeams/teamDetails) and its children:

  • TeamMembers (sentry/views/settings/organizationTeams/teamMembers)
  • TeamProjects (sentry/views/settings/organizationTeams/teamProjects)
  • TeamSettings (sentry/views/settings/organizationTeams/teamSettings)

https://www.notion.so/sentry/Frontend-TSC-Project-Remove-all-uses-of-deprecatedRouteProps-true-26a8b10e4b5d8015a6a2dd14f9d41dd7

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 7, 2025
deprecatedRouteProps: true,
},
{
path: 'notifications/',
Copy link
Member Author

Choose a reason for hiding this comment

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

TeamNotificationSettings makes its own API request to fetch the team - I believe this is unnecessary and it can be folded into the same pattern as the other children with useOutletContext. @scttcper mind confirming?

</TabsContainer>

{isValidElement(children) ? cloneElement<any>(children, {team}) : null}
<Outlet context={{team} satisfies TeamDetailsOutletContext} />
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this the pattern we want? i.e. define a type for the outlet context and then assert that type on the object given to Outlet as context. Is there a better way to enforce this type?

const org = OrganizationFixture({access: [], openMembership: true});
render(<TeamMembers team={team} />, {
render(<TeamMembers />, {
outletContext: {team},
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way we can enforce the types match when outletContext is provided to render? (other than putting satisfies everywhere)

@shashjar shashjar requested a review from scttcper October 7, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant