Skip to content

Conversation

@debsmita1
Copy link
Member

@debsmita1 debsmita1 commented Oct 1, 2025

Hey, I just made a Pull Request!

Resolves: https://issues.redhat.com/browse/RHIDP-6810

  • Addressed the review comments received here feat(marketplace): integrate plugins-info plugin #1395
  • Fixed the package info drawer to keep the Actions dropdown consistent with the plugin info drawer
  • Implemented the row actions
  • Handled the RBAC permissions to modify package configuration
  • Added translations where ever required
  • Added and updated tests

Notes:

  • The Uninstall action will be worked on in a different PR

Screenshots:

Screenshot 2025-10-01 at 10 27 40 PM
Screen.Recording.2025-10-01.at.10.28.33.PM.mov

Test setup:

dynamicPlugins:
  rootDirectory: dynamic-plugins-root
  frontend:
     default.main-menu-items:
      menuItems:
        default.admin:
          title: Administration
          icon: admin
     backstage-community.plugin-rbac:
            appIcons:
              - name: rbacIcon
                importName: RbacIcon
            dynamicRoutes:
              - path: /rbac
                importName: RbacPage
                menuItem:
                  icon: rbacIcon
                  text: RBAC
            menuItems:
              rbac:
                parent: default.admin
     red-hat-developer-hub.backstage-plugin-marketplace:
      appIcons:
        - name: pluginsIcon
          importName: PluginsIcon
      dynamicRoutes:
        - path: /extensions
          importName: DynamicMarketplacePluginRouter
          menuItem:
            icon: pluginsIcon
            text: Extensions
      menuItems:
        extensions:
          parent: default.admin
      translationResources:
        - importName: marketplaceTranslations
          ref: marketplaceTranslationRef

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Oct 1, 2025

Unexpected Changesets

The following changeset(s) reference packages that have not been changed in this PR:

  • /home/runner/work/rhdh-plugins/rhdh-plugins/workspaces/marketplace/.changeset/nasty-gifts-provide.md: @red-hat-developer-hub/backstage-plugin-marketplace-backend

Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-marketplace-common workspaces/marketplace/plugins/marketplace-common patch v0.10.0
@red-hat-developer-hub/backstage-plugin-marketplace workspaces/marketplace/plugins/marketplace patch v0.11.1

@ShiranHi
Copy link

ShiranHi commented Oct 2, 2025

Thank you @debsmita1 , looks great!
Could you add a screenshot that shows the tooltip text for the icons?

@debsmita1 debsmita1 force-pushed the packages-row-actions branch from 9233fc2 to f1ecf4a Compare October 3, 2025 08:43
@debsmita1
Copy link
Member Author

Thank you @debsmita1 , looks great! Could you add a screenshot that shows the tooltip text for the icons?

The icons currently don't have a tooltip. Only if they are disabled for any reason , the tooltip shown.

@debsmita1 debsmita1 force-pushed the packages-row-actions branch 2 times, most recently from a1f739f to 939488f Compare October 3, 2025 10:57
Copy link
Member

@ciiay ciiay left a comment

Choose a reason for hiding this comment

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

Hi @debsmita1 , thanks for the PR. I finally got it working with some specific commit. When I use marketplace backend plugin exported from this PR with current rhidp-8301-remove-dynamic-plugins-info-plugin branch version RHDH, the marketplace plugin doesn't load any data like this
image
image

Then I tried some old commits, which worked together to test changes in this PR, here's the version I used.
image
image

It seems that the issue is with the backstage version bump in marketplace backend plugin. After the backstage version bump, the backend stops loading. (cc @teknaS47 , @christoph-jerolimov )

Here's the recording for the UI changes in this PR:

pr_1558.mp4

Things I observed:

  1. when hover on Edit button, the highlight effect is not a circle but a oral shape(low priority)
  2. clicking on Cancel button on package edit page takes the user to the drawer, instead of going directly back to the installed packages table.
  3. tooltip for action buttons only shows up when buttons are disabled, and the message seems off, it should be the permission hint instead of the button function.
  4. enable/disable toggle button not working correctly, when coming back to the installed packages table, the toggle button shows the old value. Will this be handled in another story?
  5. only when I am in the list of admin.superUsers I have permissions for action buttons. If I'm in the admin.users list, I have no permission to use these row action buttons. Is this expected? The following is what I see when I am only in the admin.users list, instead of being admin.superUsers list. The tooltip looks right in this case.
image

@debsmita1 debsmita1 force-pushed the packages-row-actions branch 2 times, most recently from e62d59a to f5605e1 Compare October 7, 2025 08:37
plugin,
}: {
plugin: MarketplacePlugin;
plugin: MarketplacePlugin | MarketplacePackage;
Copy link
Member

Choose a reason for hiding this comment

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

Naaa? Why is this needed? We had a MarketplacePackageContent before? I expect we lose a lot of type save-tyness if we say "this can be a package as well"

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 used this Content component for both cases so I could reuse the Actions dropdown that we display in the plugin drawer content. We want to show the same dropdown for the package as well. Since it’s rendered based on permissions, I wanted to avoid duplicating that logic.

@debsmita1 debsmita1 force-pushed the packages-row-actions branch from f5605e1 to e890039 Compare October 7, 2025 10:35
@debsmita1
Copy link
Member Author

Here's the recording for the UI changes in this PR:

pr_1558.mp4
Things I observed:

  1. clicking on Cancel button on package edit page takes the user to the drawer, instead of going directly back to the installed packages table.

Fixed it !

  1. tooltip for action buttons only shows up when buttons are disabled, and the message seems off, it should be the permission hint instead of the button function.

Updated the tooltip to show the action function when package entity is available and the logged in user has permission to manage package config

Screenshot 2025-10-07 at 2 08 14 PM Screenshot 2025-10-07 at 2 08 22 PM Screenshot 2025-10-07 at 2 08 31 PM

Package without entity
Screenshot 2025-10-07 at 4 04 32 PM

cc @ShiranHi

  1. enable/disable toggle button not working correctly, when coming back to the installed packages table, the toggle button shows the old value. Will this be handled in another story?

It Requires backend restart after you change anything in the config. We should test this on a cluster

  1. only when I am in the list of admin.superUsers I have permissions for action buttons. If I'm in the admin.users list, I have no permission to use these row action buttons. Is this expected? The following is what I see when I am only in the admin.users list, instead of being admin.superUsers list. The tooltip looks right in this case.

Yes, this is how it works as of today, you need the following permissions to manage plugin configuration

p, role:default/team_a, extensions-plugin, read, allow
p, role:default/team_a, extensions-plugin, create, allow

else you add yourself as a super user

@ShiranHi I also added the alert for package config modification

Screenshot 2025-10-07 at 2 09 25 PM Screenshot 2025-10-07 at 2 10 03 PM

@debsmita1 debsmita1 force-pushed the packages-row-actions branch 2 times, most recently from 338e2bf to 4feffaa Compare October 7, 2025 13:48
@debsmita1 debsmita1 force-pushed the packages-row-actions branch 2 times, most recently from 105becd to 9847fac Compare October 7, 2025 13:55
@ciiay
Copy link
Member

ciiay commented Oct 8, 2025

Hi @debsmita1 , thanks for the updates. It's almost working perfect now except for the "disable/enable" toggle button which doesn't do anything when I click on it with permission. When I don't have the permission the tooltips are showing two kinds of messages, is this expected?

pr_1558_2.mp4

Also, this time I was able to use the current rhidp-8301-remove-dynamic-plugins-info-plugin branch code to run RHDH.

@debsmita1 debsmita1 force-pushed the packages-row-actions branch from 147896f to fa0b12d Compare October 8, 2025 12:07
@debsmita1
Copy link
Member Author

Hi @debsmita1 , thanks for the updates. It's almost working perfect now except for the "disable/enable" toggle button which doesn't do anything when I click on it with permission. When I don't have the permission the tooltips are showing two kinds of messages, is this expected?

@ciiay Yes, if the package doesn't have an entity, we cannot really check if the user has permission to manage the package config as the usePermission hook depends on entity namespace and its parent plugin's name

the Enable & Disable actions rely on extensions create permission. If your user entity doesn't have extensions create, you will not have the permission to enable/disable a plugin. Can you verify if you have the required permission?

pr_1558_2.mp4
Also, this time I was able to use the current rhidp-8301-remove-dynamic-plugins-info-plugin branch code to run RHDH.

My last commit resolves the below issue
Screenshot 2025-10-08 at 5 15 05 PM

After:
Screenshot 2025-10-08 at 5 29 40 PM

@debsmita1 debsmita1 force-pushed the packages-row-actions branch from fa0b12d to 944a9be Compare October 8, 2025 12:57
@debsmita1 debsmita1 force-pushed the packages-row-actions branch 2 times, most recently from 4710c31 to e216877 Compare October 8, 2025 15:15
@debsmita1 debsmita1 force-pushed the packages-row-actions branch from e216877 to 9f6f02e Compare October 8, 2025 15:16
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

Copy link
Member

@ciiay ciiay left a comment

Choose a reason for hiding this comment

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

/lgtm

Verified on RHDH locally and functions including translation are working great. Great job 👏

image

@openshift-ci openshift-ci bot added the lgtm label Oct 8, 2025
@debsmita1 debsmita1 merged commit 4d79286 into redhat-developer:main Oct 8, 2025
10 checks passed
@ShiranHi
Copy link

Updated the tooltip to show the action function when package entity is available and the logged in user has permission to manage package config

@debsmita1 I know this PR has already been merged, but I think we should update the tooltip text to align with the design. The rest looks great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants