Skip to content

Replace search hint modals in Radius tool - #3494

Merged
Simrayz merged 2 commits into
masterfrom
chore/replace-radius-modals
Sep 4, 2025
Merged

Simrayz merged 2 commits into
masterfrom
chore/replace-radius-modals

Conversation

@Simrayz

@Simrayz Simrayz commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor

Scope and purpose

Part of #2972, based on #3454.

Uses HTMX modals to replace foundation implementation on search hints for the following tabs:

  • Account Log: /radius/acctsearch
  • Error Log: /radius/logsearch
  • Top Talkers: /radius/acctcharts

There is another usage of foundation in the Status tool, namely the #details_modal in account_log.html.
However, I do not have any test data to display at the moment, and the modal is used to display details about a given result.

Edit: 040925 10:30 (post review by @johannaengland)
Made the modals smaller to better fit the text content and increase usability. They are also using the current max size (large). The modal could be made wider by using the "fit-content" size, but a lot of long single lines of text is not very user friendly.

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

@github-actions

github-actions Bot commented Sep 2, 2025 •

Copy link
Copy Markdown

Test results

   12 files     12 suites   12m 25s ⏱️
2 406 tests 2 406 ✅ 0 💤 0 ❌
6 753 runs  6 753 ✅ 0 💤 0 ❌

Results for commit 7edce01.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 2, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.07%. Comparing base (7401ec9) to head (7edce01).
⚠️ Report is 472 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3494      +/-   ##
==========================================
+ Coverage   60.99%   61.07%   +0.08%     
==========================================
  Files         607      607              
  Lines       44435    44451      +16     
  Branches       43       43              
==========================================
+ Hits        27101    27150      +49     
+ Misses      17324    17291      -33     
  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 changed the title Replace search hint modals Replace search hint modals in Radius tool Sep 2, 2025
@Simrayz
Simrayz marked this pull request as ready for review September 2, 2025 08:02
@Simrayz
Simrayz requested a review from a team September 2, 2025 08:02
@johannaengland
johannaengland requested review from a team and removed request for a team September 3, 2025 12:24
Base automatically changed from poc/replace-foundation-js-modals to master September 3, 2025 12:49

@johannaengland johannaengland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The size of the modal is different when comparing

Before:
Screenshot from 2025-09-03 14-30-24

After:
Screenshot from 2025-09-03 14-30-35

Comment thread python/nav/web/radius/urls.py Outdated
Comment thread python/nav/web/radius/urls.py Outdated
Comment thread python/nav/web/templates/radius/error_log.html Outdated
Comment thread python/nav/web/templates/radius/error_log.html Outdated
@Simrayz

Simrayz commented Sep 4, 2025

Copy link
Copy Markdown
Contributor Author

@johannaengland Fixed the feedback on the URLs, and added a comment to the PR description about modal size :)

@johannaengland johannaengland left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just one last nitpick

I'm happy with changes to improve UX, I just like them to be documented within the PR to show that it is intentional 🙂

Comment thread python/nav/web/radius/urls.py Outdated
@Simrayz
Simrayz force-pushed the chore/replace-radius-modals branch from 5d510d6 to 7edce01 Compare September 4, 2025 10:01
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2025

Copy link
Copy Markdown

@Simrayz
Simrayz merged commit c0c88a8 into master Sep 4, 2025
16 checks passed
@Simrayz
Simrayz deleted the chore/replace-radius-modals branch September 4, 2025 10:28
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