Skip to content

[Dashboard] Deslugging #16070

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

Merged
merged 1 commit into from
Jan 31, 2023
Merged

[Dashboard] Deslugging #16070

merged 1 commit into from
Jan 31, 2023

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Jan 27, 2023

Description

This change removes the team slugs and instead relies on a search param that if provided on any URL will switch the currently active org. I've decided not only add a generic redirect for old URLs (/t/*) under the assumption that those URLs are not (or super rarely) shared outside the app (I have no data 😇 )

Attention: This is a follow up and includes the changes in #16050, you can either review all changes together or separated

Related Issue(s)

Fixes #16053

How to test

Check all navigation paths and verify they work as intended.

Release Notes

removed org slugs

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-se-deslugging.1 because the annotations in the pull request description changed
(with .werft/ from main)

@svenefftinge svenefftinge marked this pull request as ready for review January 27, 2023 16:47
@svenefftinge svenefftinge requested a review from a team January 27, 2023 16:47
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jan 27, 2023
@@ -232,13 +228,13 @@ export default function Menu() {
) {
teamSettingsList.push({
title: "Usage",
link: `/t/${team.slug}/usage`,
link: `/org-usage`,
Copy link
Member Author

Choose a reason for hiding this comment

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

we can align usage and org-usage in follow-up steps, same for billing/org-billing

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good - the /org-usage path here felt weird to me since nothing else is prefixed by /org-. Do you mean it'll be easier to change after this PR to something like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just fewer changes. the PR is already quite big.

const entries: (ContextMenuEntry & { slug: string })[] = [
...(hasIndividualProjects
const entries: ContextMenuEntry[] = [
...(!user?.additionalData?.isMigratedToTeamOnlyAttribution
Copy link
Member Author

Choose a reason for hiding this comment

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

with this change I'm adding the previously deprecated "personal account" entry back in the drop-down menu unless you have been migrated (in preview env everyone is migrated, so you don't see this) If you want to test the behavior you need to change the config cat value and delete/recreate your user.

@selfcontained
Copy link
Contributor

selfcontained commented Jan 27, 2023

Something doesn't seem to persist my org selection between a refresh. For example:

  • Have 2 Teams, Team A and Team B
  • Go to Team B - Navigate to Org Settings (can go anywhere so that the query param is dropped)
  • Refresh page
  • Now it's on Team A settings

Related - If you create a project under each team, and navigate to Team B, select a project so you're on something like the project's branches (or another project tab), and refresh, you end up w/ Team A select, and an empty project page.
image

Copy link
Contributor

@selfcontained selfcontained left a comment

Choose a reason for hiding this comment

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

A few changes/recommendations - I did bump into what seems like a bug when dealing with multiple orgs, and refreshing the page not seeming to load the last selected org correctly, which seems worth looking into.

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 30, 2023

/werft run

👍 started the job as gitpod-build-se-deslugging.4
(with .werft/ from main)

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 30, 2023

Thank you @selfcontained 🙏 I've fixed the reload issue and also addressed all of your feedback.

@svenefftinge svenefftinge force-pushed the se/deslugging branch 2 times, most recently from f8c7039 to fbe8ac6 Compare January 30, 2023 14:34
@roboquat roboquat merged commit e17bbae into main Jan 31, 2023
@roboquat roboquat deleted the se/deslugging branch January 31, 2023 09:55
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XXL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Remove slugs for orgs
5 participants