Skip to content
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

[dashboard] give team URLs a dedicated slug #5544

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

svenefftinge
Copy link
Member

fixes #5465 - [teams] move team URLs in its own slug (namespace)

@roboquat roboquat added the size/M label Sep 6, 2021
@svenefftinge svenefftinge force-pushed the sefftinge/teams-move-team-urls-5465 branch 2 times, most recently from c9fa322 to 4ec10a0 Compare September 6, 2021 17:17
@svenefftinge svenefftinge requested review from AlexTugarev and removed request for jankeromnes September 6, 2021 17:21
@svenefftinge svenefftinge force-pushed the sefftinge/teams-move-team-urls-5465 branch 2 times, most recently from e36b3f5 to 6c01911 Compare September 6, 2021 18:17
@svenefftinge
Copy link
Member Author

svenefftinge commented Sep 7, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-teams-move-team-urls-5465.5

@AlexTugarev
Copy link
Member

route matchers need to be adjusted as well. for instance in ConfigureProject.tsx we have useRouteMatch<{ teamSlug: string, projectSlug: string }>("/:teamSlug/:projectSlug/configure").

@@ -58,7 +58,7 @@ export default function () {
const { teams } = useContext(TeamsContext);
const location = useLocation();
const team = getCurrentTeam(location, teams);
const routeMatch = useRouteMatch<{ teamSlug: string, projectSlug: string }>("/:teamSlug/:projectSlug/configure");
const routeMatch = useRouteMatch<{ teamSlug: string, projectSlug: string }>("/t/:teamSlug/:projectSlug/configure");
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid there are more instances of useRouteMatch to adjust, e.g. in Projects.tsx

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, thanks. I have updated those. Any other leftovers you see?
It's a little hard to find all the references ...

Copy link
Member

Choose a reason for hiding this comment

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

just searched for all useRouteMatch usages and it looks good now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to make the /t optional however. As the page needs to work with user projects as well.

@svenefftinge svenefftinge force-pushed the sefftinge/teams-move-team-urls-5465 branch from 1ac990c to 7ab510d Compare September 7, 2021 09:19
@svenefftinge
Copy link
Member Author

/hold

@AlexTugarev
Copy link
Member

AlexTugarev commented Sep 7, 2021

Hopefully, I did test all cases. It worked nicely 💯

/lgtm

@roboquat
Copy link
Contributor

roboquat commented Sep 7, 2021

LGTM label has been added.

Git tree hash: be338cf2c06ea4a5a63f7a1dcb3624d9a01b1526

fixes #5465 - [teams] move team URLs in its own slug (namespace)
@svenefftinge svenefftinge force-pushed the sefftinge/teams-move-team-urls-5465 branch from 7ab510d to 6a9717a Compare September 7, 2021 09:43
@roboquat roboquat removed the lgtm label Sep 7, 2021
@AlexTugarev
Copy link
Member

AlexTugarev commented Sep 7, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-teams-move-team-urls-5465.9

@AlexTugarev
Copy link
Member

/lgtm

@roboquat roboquat added the lgtm label Sep 7, 2021
@roboquat
Copy link
Contributor

roboquat commented Sep 7, 2021

LGTM label has been added.

Git tree hash: 1aa844010e1e27fd1678ea3d269993c0f41ec9c6

@roboquat
Copy link
Contributor

roboquat commented Sep 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexTugarev

Associated issue: #5465

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@svenefftinge
Copy link
Member Author

/hold cancel

@roboquat roboquat merged commit c1b0a05 into main Sep 7, 2021
@roboquat roboquat deleted the sefftinge/teams-move-team-urls-5465 branch September 7, 2021 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[teams] move team URLs in its own slug (namespace)
4 participants