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

Show route information in window title #1752

Merged
merged 10 commits into from
Apr 5, 2024
Merged

Conversation

grolu
Copy link
Contributor

@grolu grolu commented Mar 18, 2024

What this PR does / why we need it:
Screenshot 2024-04-04 at 16 50 02

Which issue(s) this PR fixes:
Fixes #1605

Special notes for your reviewer:

Release note:

Route information is now included in the browser window title

@gardener-robot gardener-robot added the needs/review Needs review label Mar 18, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 18, 2024
@gardener-robot gardener-robot added the size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) label Mar 18, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 18, 2024
@gardener-robot
Copy link

@holgerkoser You have pull request review open invite, please check

@gardener-robot gardener-robot added size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) and removed size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Mar 21, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 21, 2024
@grolu grolu force-pushed the enh/show_route_information branch from f834285 to 7b0b665 Compare March 21, 2024 14:29
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 21, 2024
- Added project breadcrumb
@grolu grolu force-pushed the enh/show_route_information branch from 7b0b665 to 2256181 Compare March 21, 2024 14:46
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Mar 21, 2024
- Project link to Project Cluster list
- Clusters link to All Projects Cluster list
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 22, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 22, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 25, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 25, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 25, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Mar 25, 2024
@gardener-robot gardener-robot added the size/s Size of pull request is small (see gardener-robot robot/bots/size.py) label Apr 4, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 4, 2024
@gardener-robot gardener-robot removed the size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) label Apr 4, 2024
- Changed page title calcultion accordingly
@grolu grolu force-pushed the enh/show_route_information branch from 9b83f74 to e8e872e Compare April 4, 2024 14:48
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 4, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 4, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 4, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 4, 2024
frontend/src/router/guards.js Outdated Show resolved Hide resolved
frontend/src/router/guards.js Outdated Show resolved Hide resolved
frontend/src/router/guards.js Outdated Show resolved Hide resolved
frontend/src/router/guards.js Outdated Show resolved Hide resolved
Comment on lines 89 to 102
const projectName = projectStore.projectName
const routeParamName = route.params.name
const pageTitle = route.meta.title ?? route.name

let titleItems = [pageTitle]
if (route.meta.namespaced !== false) {
const locationTitle = [projectName, routeParamName].filter(item => item !== undefined).join('/')
titleItems.push(locationTitle)
}
titleItems = titleItems.filter(item => item?.length)

if (titleItems.length) {
appTitle = `${titleItems.join(' • ')} | ${appTitle}`
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const projectName = projectStore.projectName
const routeParamName = route.params.name
const pageTitle = route.meta.title ?? route.name
let titleItems = [pageTitle]
if (route.meta.namespaced !== false) {
const locationTitle = [projectName, routeParamName].filter(item => item !== undefined).join('/')
titleItems.push(locationTitle)
}
titleItems = titleItems.filter(item => item?.length)
if (titleItems.length) {
appTitle = `${titleItems.join(' • ')} | ${appTitle}`
}
const titleItems = []
const pageTitle = route.meta.title ?? route.name
if (pageTitle) {
titleItems.push(pageTitle)
}
if (route.meta.namespaced !== false) {
const projectName = projectStore.projectName
const routeParamName = route.params.name
if (routeParamName) {
titleItems.push([projectName, routeParamName].join('/'))
} else if (projectName) {
titleItems.push(projectName)
}
}
if (titleItems.length) {
appTitle = `${titleItems.join(' • ')} | ${appTitle}`
}

frontend/src/App.vue Outdated Show resolved Hide resolved
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 5, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 5, 2024
Copy link
Member

@holgerkoser holgerkoser left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Apr 5, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 5, 2024
Copy link
Member

@petersutter petersutter left a comment

Choose a reason for hiding this comment

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

/lgtm

@grolu grolu added the area/ipcei IPCEI (Important Project of Common European Interest) label Apr 5, 2024
@grolu grolu merged commit 0f734ec into master Apr 5, 2024
9 checks passed
@grolu grolu deleted the enh/show_route_information branch April 5, 2024 08:05
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei IPCEI (Important Project of Common European Interest) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/s Size of pull request is small (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show route information in dashboard window title
7 participants