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

fix: catalog entity tabs order #2425

Merged

Conversation

its-mitesh-kumar
Copy link
Member

@its-mitesh-kumar its-mitesh-kumar commented Feb 20, 2025

Fixing RHIDP-5803
Description : With the fix user will be able to order entity tabs by providing priority and also they can hide any default tab by providing -ve value as priority

entity-tabs-order_Z5zxRutJ.mp4

For testing add below config in app-config.yaml

dynamicPlugins:
  rootDirectory: dynamic-plugins-root
  frontend:
    roadiehq.backstage-plugin-github-pull-requests:
      mountPoints:
        - mountPoint: entity.page.overview/cards
          importName: EntityGithubPullRequestsOverviewCard
          config:
            layout:
              gridColumnEnd:
                lg: "span 4"
                md: "span 6"
                xs: "span 12"
            if:
              allOf:
                - isGithubPullRequestsAvailable
        - mountPoint: entity.page.pull-requests/cards
          importName: EntityGithubPullRequestsContent
          config:
            layout:
              gridColumn: "1 / -1"
            if:
              allOf:
                - isGithubPullRequestsAvailable

    entity-tabs-customization:
      entityTabs:
        - path: "/pr"
          title: "Changed Pull/Merge Requests"
          priority: 1
          mountPoint: "entity.page.pull-requests"
        - path: "/"
          title: "Changed Overview"
          mountPoint: "entity.page.overview"
          priority: 6
        - path: "/api"
          title: "My Api"
          mountPoint: "entity.page.api"
          priority: -7
        - path: "/dependencies"
          title: "Ghor Dependecy"
          mountPoint: "entity.page.dependencies"
          priority: 5

Try to play with priority

  1. -ve priority tabs will be not visible
  2. Higher priority tabs will be shown first

@its-mitesh-kumar its-mitesh-kumar changed the title fixing entity tabs order fix : Catalog entity tabs order Feb 20, 2025
Signed-off-by: its-mitesh-kumar <[email protected]>
@its-mitesh-kumar
Copy link
Member Author

cc @debsmita1 @christoph-jerolimov

@its-mitesh-kumar its-mitesh-kumar changed the title fix : Catalog entity tabs order fix: Catalog entity tabs order Feb 20, 2025
@its-mitesh-kumar its-mitesh-kumar changed the title fix: Catalog entity tabs order fix: catalog entity tabs order Feb 20, 2025
Signed-off-by: its-mitesh-kumar <[email protected]>
Copy link
Contributor

Copy link
Contributor

Copy link
Contributor

github-actions bot commented Mar 3, 2025

@invincibleJai
Copy link
Member

invincibleJai commented Mar 6, 2025

This works as expected, tested in cluster

image

tested in local

image
entity-tabs-customization:
      entityTabs:
        - path: "/dependencies"
          title: "Ghor Dependecy"
          mountPoint: "entity.page.dependencies"
          priority: 15 
        - path: "/pr"
          title: "Changed Pull/Merge Requests"
          priority: 1
          mountPoint: "entity.page.pull-requests"
        - path: "/image-registry"
          title: "my quay"
          mountPoint: "entity.page.image-registry"
          priority: 55 
        - path: "/"
          title: "Changed Overview"
          mountPoint: "entity.page.overview"
          priority: 6
        - path: "/api"
          title: "My Api"
          mountPoint: "entity.page.api"
          priority: -7

@invincibleJai
Copy link
Member

invincibleJai commented Mar 6, 2025

@invincibleJai invincibleJai requested a review from gashcrumb March 6, 2025 09:47
@openshift-ci openshift-ci bot added the approved label Mar 6, 2025
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@invincibleJai
Copy link
Member

/retest

@invincibleJai
Copy link
Member

/cherry-pick release-1.5

@openshift-cherrypick-robot
Copy link
Contributor

@invincibleJai: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@its-mitesh-kumar
Copy link
Member Author

/cherry-pick release-1.5

@openshift-cherrypick-robot
Copy link
Contributor

@its-mitesh-kumar: only redhat-developer org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually.

In response to this:

/cherry-pick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Member

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Mar 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: invincibleJai, karthikjeeyar

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

@teknaS47
Copy link
Contributor

teknaS47 commented Mar 6, 2025

Works as expected, tested on a cluster

@its-mitesh-kumar
Copy link
Member Author

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 0abeaa4 into redhat-developer:main Mar 6, 2025
16 checks passed
@openshift-cherrypick-robot
Copy link
Contributor

@invincibleJai: new pull request created: #2523

In response to this:

/cherry-pick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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.

7 participants