Skip to content

[UI] Add selection-aware plugin table actions - #13199

Open
7h0ma5 wants to merge 5 commits into
inventree:masterfrom
7h0ma5:feature/selection-aware-table-actions
Open

7h0ma5 wants to merge 5 commits into
inventree:masterfrom
7h0ma5:feature/selection-aware-table-actions

Conversation

@7h0ma5

@7h0ma5 7h0ma5 commented Nov 5, 2026

Copy link
Copy Markdown

We need a way for our custom plugin to act on records selected in a table. This PR adds UserInterfaceMixin.get_ui_table_actions, allowing plugins to provide table-header actions that receive the current selection when clicked.

Actions require a selection by default. The PR includes documentation, a sample action, and automated tests. We have also tested the integration with a custom plugin we are developing.

@netlify

netlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

👷 Deploy request for inventree-web-pui-preview pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5c853bf

Comment thread CHANGELOG.md Outdated

- [#13141](https://github.com/inventree/InvenTree/pull/13141) Adds a notification when a token is issued and warns if that notification can not be send
- [#13069](https://github.com/inventree/InvenTree/pull/13069) Adds an audit log which tracks changes made to internal data and exposes read-only API endpoints (/api/audit/) for accessing the audit log.
- Adds selection-aware plugin actions to table headers through `UserInterfaceMixin.get_ui_table_actions`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please link to the PR here

```

`selectedIds` are not sent to the feature-discovery API. Client-side visibility and disabled state are not security checks: any API called by the action must validate the current user's permissions and each requested item. See the [sample UI plugin](#sample-plugin) for a working example.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

An example screenshot would be useful here

@SchrodingersGat

Copy link
Copy Markdown
Member

@7h0ma5 thanks for the submission, this looks like a solid implementation

@SchrodingersGat

Copy link
Copy Markdown
Member

@7h0ma5 just waiting on responses and fixes

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem User Interface Related to the frontend / User Interface labels Nov 16, 2026
@SchrodingersGat SchrodingersGat added this to the 1.8.0 milestone Nov 16, 2026
@7h0ma5
7h0ma5 force-pushed the feature/selection-aware-table-actions branch from dc48ef5 to 11bf2a9 Compare November 18, 2026 12:56
@7h0ma5

7h0ma5 commented Nov 18, 2026

Copy link
Copy Markdown
Author

Thanks for the review! I’ve added the PR link and a screenshot.

@SchrodingersGat

Copy link
Copy Markdown
Member

@7h0ma5 please address merge conflicts and I can review again

@SchrodingersGat

Copy link
Copy Markdown
Member

somehow this is deleting our translation files - please fix that @7h0ma5 - the only changes here should be the new feature

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

restore this file

@7h0ma5

7h0ma5 commented Nov 29, 2026

Copy link
Copy Markdown
Author

Sorry, I should have checked the diff again after merging master. I didn't notice that @matmair had pushed 2dd6b6a directly to my PR, and I missed that deletion staying in there. I have added a commit to restore the file.

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

Labels

enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants