Skip to content

Replace navlet modals with htmx#3487

Merged
Simrayz merged 4 commits intomasterfrom
chore/replace-navlet-modals-with-htmx
Sep 5, 2025
Merged

Replace navlet modals with htmx#3487
Simrayz merged 4 commits intomasterfrom
chore/replace-navlet-modals-with-htmx

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Sep 1, 2025

Scope and purpose

Part of #2972, and continuation of #3461.

This PR refactors the dashboard to use HTMX modals for deleting and adding new navlets.

This pull request

  • Adds support for HTMX attributes in navlet templates
  • Uses HTMX modals for deletion of navlets
  • Uses HTMX modals for adding new navlets

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.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@Simrayz Simrayz self-assigned this Sep 1, 2025
@Simrayz Simrayz changed the base branch from master to poc/replace-foundation-js-modals September 1, 2025 08:29
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 1, 2025

Test results

   12 files     12 suites   12m 17s ⏱️
2 420 tests 2 420 ✅ 0 💤 0 ❌
6 795 runs  6 795 ✅ 0 💤 0 ❌

Results for commit 278dd91.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.35%. Comparing base (6017aa5) to head (278dd91).
⚠️ Report is 324 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3487      +/-   ##
==========================================
+ Coverage   61.24%   61.35%   +0.11%     
==========================================
  Files         611      611              
  Lines       44768    44782      +14     
  Branches       43       43              
==========================================
+ Hits        27416    27476      +60     
+ Misses      17342    17296      -46     
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch 2 times, most recently from ddaa680 to 0f561ba Compare September 1, 2025 13:22
@Simrayz Simrayz requested a review from a team September 1, 2025 13:35
@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch from 0f561ba to bc2ab17 Compare September 1, 2025 13:37
@Simrayz Simrayz marked this pull request as ready for review September 2, 2025 07:22
@johannaengland johannaengland requested review from a team and removed request for a team September 3, 2025 09:33
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

The "Add widget" modal looks quite different for me

Before:
Screenshot from 2025-09-03 13-42-29

After:
Screenshot from 2025-09-03 13-41-47

And a nitpick: The commit "Add tests for adding and removing navlets" includes other code changes, please factor them out when rebasing

Base automatically changed from poc/replace-foundation-js-modals to master September 3, 2025 12:49
@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch from bc2ab17 to 240710d Compare September 3, 2025 14:11
@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch from 240710d to 5799d0b Compare September 4, 2025 08:14
@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Sep 4, 2025

@johannaengland I rebased the "Add tests" commit, and moved the__init__.py changes to the "remove modal" commit. Pending approval of #3502 to adjust the sizing of the "Add navlets" modal.

@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Sep 4, 2025

Rebased on the modal change in master, and it now looks like this:
image

@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch from 5799d0b to 5d1b9fd Compare September 4, 2025 10:37
@johannaengland johannaengland requested a review from a team September 5, 2025 08:24
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

Great job!

@Simrayz Simrayz force-pushed the chore/replace-navlet-modals-with-htmx branch from 5d1b9fd to 278dd91 Compare September 5, 2025 08:34
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 5, 2025

@Simrayz Simrayz merged commit 4a38fe3 into master Sep 5, 2025
16 checks passed
@Simrayz Simrayz deleted the chore/replace-navlet-modals-with-htmx branch September 5, 2025 08:47
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.

2 participants