Skip to content

feat(frontend): Add option for plugins to add header actions - #9570

Merged
SchrodingersGat merged 21 commits into
inventree:masterfrom
matmair:matmair/issue8593
May 21, 2026
Merged

SchrodingersGat merged 21 commits into
inventree:masterfrom
matmair:matmair/issue8593

Conversation

@matmair

@matmair matmair commented Apr 23, 2025 •

Copy link
Copy Markdown
Member

Fixes #8593
grafik
The "Project" button in this screenshot shows how this can be used

Follow up to #9283

@matmair matmair added plugin Plugin ecosystem User Interface Related to the frontend / User Interface labels Apr 23, 2025
@matmair matmair added this to the 1.0.0 milestone Apr 23, 2025
@matmair matmair self-assigned this Apr 23, 2025
@netlify

netlify Bot commented Apr 23, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 4a2b5e5
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a0f4a5f754233000877d09b
😎 Deploy Preview https://deploy-preview-9570--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 2 from production)
Accessibility: 81 (🔴 down 1 from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@matmair matmair changed the title [FR] PUI - Add option for plugins to add header actions [FR] Add option for plugins to add header actions Apr 23, 2025
@codecov

codecov Bot commented Apr 27, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.44%. Comparing base (e392348) to head (4a2b5e5).
⚠️ Report is 396 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9570      +/-   ##
==========================================
- Coverage   91.44%   91.44%   -0.01%     
==========================================
  Files         974      974              
  Lines       50704    50714      +10     
==========================================
+ Hits        46365    46374       +9     
- Misses       4339     4340       +1     
Flag Coverage Δ
backend 89.27% <90.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 91.76% <90.00%> (-0.01%) ⬇️
Backend General 93.49% <ø> (ø)
Frontend ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat

Copy link
Copy Markdown
Member

Would you be happy to bump this to 1.1.0?

@matmair

matmair commented Jul 27, 2025

Copy link
Copy Markdown
Member Author

I have a huge backlog from being away, so sure if 1.0 is imminent

@matmair matmair modified the milestones: 1.0.0, 1.1.0 Jul 27, 2025
@SchrodingersGat SchrodingersGat modified the milestones: 1.1.0, 2.0.0 Oct 31, 2025
@matmair matmair modified the milestones: 2.0.0, 1.4.0 May 16, 2026
@matmair matmair changed the title [FR] Add option for plugins to add header actions feat(frontend): Add option for plugins to add header actions May 16, 2026
@matmair matmair added the enhancement This is an suggested enhancement or new feature label May 16, 2026
@matmair
matmair marked this pull request as ready for review May 16, 2026 16:20
@matmair
matmair requested a review from SchrodingersGat as a code owner May 16, 2026 16:20
@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair can you please provide a screenshot of where these are injected / what the UI looks like?

  • We would also need to update the plugin documentation to describe this new feature
  • Requires an entry into the CHANGELOG.md

@matmair

matmair commented May 17, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat done

@SchrodingersGat

Copy link
Copy Markdown
Member

Thanks @matmair

What sort of "actions" can be performed here? Your sample code indicates that it can navigate to a URL, but could it also perform other actions, e.g. launch a modal, or call some other function?

@matmair

matmair commented May 18, 2026 •

Copy link
Copy Markdown
Member Author

Anything you can put into a function call of a plugin.
There is a shortcut for navigating to an url

@matmair

matmair commented May 21, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat ready for merge

@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair thanks, great work!

@SchrodingersGat
SchrodingersGat merged commit f27b9b5 into inventree:master May 21, 2026
53 of 54 checks passed
@SchrodingersGat
SchrodingersGat deleted the matmair/issue8593 branch May 21, 2026 22:20
johnluetke pushed a commit to johnluetke/InvenTree that referenced this pull request May 22, 2026
…ee#9570)

* [FR] PUI - Add option for plugins to add header actions
Fixes inventree#8593

* fix parsing

* fix merge

* reduce diff

* fix sample implementation

* add support for icons and colors in primary actions

* add changelog entry

* add docs

* add more detailed sample text

* pass location into context

* fix test

---------

Co-authored-by: Oliver <[email protected]>
martonmiklos pushed a commit to martonmiklos/InvenTree that referenced this pull request Jun 30, 2026
…ee#9570)

* [FR] PUI - Add option for plugins to add header actions
Fixes inventree#8593

* fix parsing

* fix merge

* reduce diff

* fix sample implementation

* add support for icons and colors in primary actions

* add changelog entry

* add docs

* add more detailed sample text

* pass location into context

* fix test

---------

Co-authored-by: Oliver <[email protected]>
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.

[FR] PUI - Add option for plugins to add header actions

2 participants