Skip to content

Improve notification profile form design#1804

Merged
Simrayz merged 8 commits intomainfrom
feat/1796-improve-profile-forms
Mar 3, 2026
Merged

Improve notification profile form design#1804
Simrayz merged 8 commits intomainfrom
feat/1796-improve-profile-forms

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Feb 23, 2026

Scope and purpose

Resolves issue #1796, based on PR #1797 and PR #1799

This pull request

Reworks notification profile forms to match the accordion card pattern from #1794.

  • Replace flat list of pre-rendered forms with collapsible accordion cards (lazy-loaded on open)
  • Use Choices.js <select multiple> for filters and destinations instead of custom DropdownMultiSelect
  • Rearrange form layout: name + actions inline at top, 2-column grid for remaining fields
  • Collapsed "preview" card gets updated when form is saved, so the collapsed card always shows the latest state.

Screenshots

image image image

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, 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 our how-to
  • 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 results in changes to the database model: Updated the ER diagram

@Simrayz Simrayz self-assigned this Feb 23, 2026
@Simrayz Simrayz added the frontend Affects frontend label Feb 23, 2026
@Simrayz Simrayz changed the base branch from main to feat/1795-refactor-notification-routes February 23, 2026 12:50
@Simrayz Simrayz changed the title Feat/1796 improve profile forms Improve notification profile form design Feb 23, 2026
@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from c12f708 to 5c2a773 Compare February 23, 2026 12:52
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from 2f1f56d to baef7f4 Compare February 23, 2026 12:52
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 23, 2026

Test results

    6 files    990 suites   1m 56s ⏱️
  747 tests   746 ✅ 1 💤 0 ❌
4 482 runs  4 476 ✅ 6 💤 0 ❌

Results for commit 546b63a.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.72%. Comparing base (703f731) to head (9458503).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1804      +/-   ##
==========================================
+ Coverage   86.18%   86.72%   +0.53%     
==========================================
  Files         137      137              
  Lines        6711     6705       -6     
==========================================
+ Hits         5784     5815      +31     
+ Misses        927      890      -37     

☔ 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 feat/1796-improve-profile-forms branch 3 times, most recently from fac9763 to e096dcc Compare February 23, 2026 13:37
@Simrayz Simrayz marked this pull request as ready for review February 23, 2026 13:38
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch 2 times, most recently from a6edfb2 to e601f76 Compare February 23, 2026 13:51
@Simrayz Simrayz requested a review from a team February 23, 2026 13:52
@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from 5c2a773 to 4fbf798 Compare February 23, 2026 20:41
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch 2 times, most recently from 3f999ec to 788e3db Compare February 24, 2026 14:04
@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Feb 24, 2026

Update:
Moved "New profile" button to the same row as the tabs, to avoid unnecessary vertical whitespace.
image

@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from b9bca63 to f0aab19 Compare February 25, 2026 11:05
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch 2 times, most recently from 2ce87b7 to 728dfcd Compare February 25, 2026 11:07
@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from f0aab19 to 3d5e71a Compare February 25, 2026 11:07
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from d01905b to 728dfcd Compare February 25, 2026 11:25
Copy link
Copy Markdown
Contributor

@aleksfl aleksfl left a comment

Choose a reason for hiding this comment

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

Has the same bug as the timeslots PR with the expand arrow, but otherwise it works as intended. Given that the bug was fixed for the related PRs and my comments are tiny, am approving anyways.

Comment thread src/argus/htmx/templates/htmx/notificationprofile/notificationprofile_list.html Outdated
Comment thread tests/htmx/notificationprofile/test_views.py Outdated
Comment thread tests/htmx/timeslot/test_views.py Outdated
Copy link
Copy Markdown
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Looks very nice! 😃

Only small nitpicks (no code deep-dive from me today):

  1. When I click the button to create my first profile, the message "No profiles yet." remains visible below the form card. While technically true, it seems somewhat confusing as I am currently adding a profile..
  2. The "active" checkbox moves around when I add destinations:
simplescreenrecorder-2026-02-25_14.33.10.mp4

@johannaengland johannaengland self-requested a review February 25, 2026 14:40
@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from 3d5e71a to 0d07d88 Compare February 25, 2026 15:53
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from 728dfcd to f0fea9b Compare February 25, 2026 15:53
@sonarqubecloud
Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from 0d07d88 to 6722282 Compare February 26, 2026 08:22
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from 3f03830 to e45595c Compare February 26, 2026 08:22
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.

When I click the New Profile button I get some errors in the console:

'#no-profiles-message' is null hyperscript-0.9.13.min.js:1:54742

,

hypertrace /// hyperscript-0.9.13.min.js:1:23402

and

  -> on click   - 
<button class="btn btn-primary htmx-request" hx-get="/notifications/profiles/create/" hx-target="#notificationprofile-create" hx-swap="outerHTML" _="on click remove #no-profiles-message">
hyperscript-0.9.13.min.js:1:23549

Comment thread src/argus/htmx/notificationprofile/views.py
Comment thread tests/htmx/notificationprofile/test_views.py Outdated
Comment thread tests/htmx/notificationprofile/test_views.py Outdated
@Simrayz Simrayz force-pushed the feat/1795-refactor-notification-routes branch from 6722282 to 7235d14 Compare February 26, 2026 13:19
@Simrayz Simrayz changed the base branch from feat/1795-refactor-notification-routes to main February 26, 2026 13:20
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from e45595c to 803095c Compare February 26, 2026 13:23
@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Feb 27, 2026

When I click the New Profile button I get some errors in the console:

'#no-profiles-message' is null hyperscript-0.9.13.min.js:1:54742

,

hypertrace /// hyperscript-0.9.13.min.js:1:23402

and

  -> on click   - 
<button class="btn btn-primary htmx-request" hx-get="/notifications/profiles/create/" hx-target="#notificationprofile-create" hx-swap="outerHTML" _="on click remove #no-profiles-message">
hyperscript-0.9.13.min.js:1:23549

This is fixed now :) The issue was that the hyperscript did not account for the element possibly missing from the page.

@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Feb 27, 2026

Looks very nice! 😃

Only small nitpicks (no code deep-dive from me today):

  1. When I click the button to create my first profile, the message "No profiles yet." remains visible below the form card. While technically true, it seems somewhat confusing as I am currently adding a profile..
  2. The "active" checkbox moves around when I add destinations:

simplescreenrecorder-2026-02-25_14.33.10.mp4

These visual bugs are now fixed 😄

@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from 87c69df to 6372d97 Compare February 27, 2026 10:55
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.

I noticed that if I have multiple destinations selected in the form instead of moving one of them into a new line I get newlines within the destination label and some are then hidden:

With two destinations:
Image

With three:
Image

With four:
Image

Is that intended like that?

@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch 2 times, most recently from 96bdcc4 to 546b63a Compare March 2, 2026 11:22
@Simrayz Simrayz requested a review from johannaengland March 2, 2026 11:22
@Simrayz Simrayz force-pushed the feat/1796-improve-profile-forms branch from 546b63a to 9458503 Compare March 3, 2026 09:56
@Simrayz Simrayz merged commit 9f98f3e into main Mar 3, 2026
11 of 12 checks passed
@Simrayz Simrayz deleted the feat/1796-improve-profile-forms branch March 3, 2026 09:57
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 3, 2026

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

Labels

frontend Affects frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants