refactor: Drop /dashboard prefix from user-facing URLs#5151
Conversation
|
@chenlica please assign a reviewer |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5151 +/- ##
============================================
- Coverage 43.66% 43.61% -0.06%
+ Complexity 2218 2215 -3
============================================
Files 1049 1049
Lines 40580 40483 -97
Branches 4324 4318 -6
============================================
- Hits 17719 17656 -63
+ Misses 21766 21729 -37
- Partials 1095 1098 +3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
as this is user-facing, please include screenshot (of url difference). |
|
please also make sure PR description fits our template, and fill the coverage. thanks |
|
Yes, some of my PRs are corrupted. Please hold out on review. I noticed them, but I am trying to fix them. The reason is that I am the only one editing the comment commands in our GitHub workflow, so my main has gotten out of sync with the Apache main. |
Please mark PRs that are not ready for review as draft. Otherwise, we assume the PR is ready for review. |
dbad080 to
652269d
Compare
|
@Yicong-Huang, I added test coverage for existing spec files. I'll add the spec files for the untested hub and dashboard components in a separate pr. Please refer to this issue: #5167 |
… dashboard from URL.
|
@Yicong-Huang, also, I have finished making changes. Please review again and I apologize for the prior issue. |
Yicong-Huang
left a comment
There was a problem hiding this comment.
LGTM. left some inline comments please take care of them.
| it("routes projects to the user project page", () => { | ||
| component.entry = { id: 200, type: "project", ...baseStats } as unknown as DashboardEntry; | ||
| component.initializeEntry(); | ||
| expect(component.entryLink).toEqual([USER_PROJECT, "200"]); | ||
| }); |
There was a problem hiding this comment.
Looking into this, I see that projects are still routed in routing.module.ts
path: "user",
canActivate: [AuthGuardService],
children: [
{
path: "project",
component: UserProjectComponent,
},
{
path: "project/:pid",
component: UserProjectSectionComponent,
},
There was a problem hiding this comment.
let's raise a separate issue to discuss what to do with projects.
| routes.push({ | ||
| path: "dashboard", | ||
| path: "", | ||
| component: DashboardComponent, |
There was a problem hiding this comment.
do we have plan to rename this component?
There was a problem hiding this comment.
Not to my knowledge
| // default route renders the workspace editor directly; if userSystem is enabled at runtime, | ||
| // AppComponent will navigate to DASHBOARD_ABOUT instead. | ||
| routes.push({ | ||
| path: "", | ||
| component: WorkspaceComponent, | ||
| canActivate: [rootRedirectGuard], | ||
| }); | ||
|
|
There was a problem hiding this comment.
this seems unintended change. can we move it out from this PR?
There was a problem hiding this comment.
please make sure to update PR description after this.
Added default route to render WorkspaceComponent with guard. Signed-off-by: Matthew B. <mgball@uci.edu>
What changes were proposed in this PR?
/dashboardsegment:/dashboard/user/workflow/2358becomes/user/workflow/2358.DashboardComponentatpath: ""instead of"dashboard"and setsDASHBOARD = ""so all derived route constants automatically shed the prefix.WorkspaceComponentroot route whose guard always redirected;WorkspaceComponentstays reachable via/user/workflow/:id./dashboard/...references (admin execution link, share-access message, navbar-hiding regex) and the Scala email-link path.Any related issues, documentation, or discussions?
Closes: #4407
How was this PR tested?
yarn format:fix(clean, 501 files unchanged).sbt scalafmtAll(clean).tsc --noEmit(no type errors).dashboard.component.spec.tsmock router URL to match new paths.Before
After
Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in compliance with ASF