Render PortAdmin feedback modal from pre-loaded template#3772
Conversation
46794f8 to
655a691
Compare
|
Test results 21 files 21 suites 24m 22s ⏱️ Results for commit 655a691. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3772 +/- ##
==========================================
- Coverage 63.14% 63.14% -0.01%
==========================================
Files 616 616
Lines 45545 45542 -3
Branches 43 43
==========================================
- Hits 28761 28758 -3
Misses 16774 16774
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lunkwill42
left a comment
There was a problem hiding this comment.
An administrator from the nav-ref group reported and demonstrated a bug in Portadmin where the feedback modal does not open before a long delay. I was not able to reproduce their bug, but the only identified probable culprit is the network call to load the initial modal with HTMX.
Seems like an apt analysis. When mr. Nesland demoed it to us, I received multiple tracebacks from their NAV installation about netconf errors in the backend. If the original depended on a non-failing HTMX response from the backend before displaying anything, then that would certainly be an issue :)
Sounds like this will certainly fix it then yeah. The normal modal-flow in NAV is to load it with a htmx endpoint, which of course requires a response before rendering the modal (by appending to the body). |



Fixes #3772
Scope and purpose
An administrator from the nav-ref group reported and demonstrated a bug in Portadmin where the feedback modal does not open before a long delay. I was not able to reproduce their bug, but the only identified probable culprit is the network call to load the initial modal with HTMX.
This PR changes the feedback modal to load from a pre-rendered template, which is cloned and destroyed when the modal is closed. This should show the modal immediately without requiring a round-trip to the server first, while using the server-rendered modal template.
Since we simplified the modal loading, I also removed the render modal view and related tests.
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.
<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.