Skip to content

Add kiosk mode#1970

Open
aleksfl wants to merge 11 commits into
mainfrom
add-kiosk-mode
Open

Add kiosk mode#1970
aleksfl wants to merge 11 commits into
mainfrom
add-kiosk-mode

Conversation

@aleksfl

@aleksfl aleksfl commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Scope and purpose

Fixes #1938 .

Before:
image

After:
Screenshot from 2026-07-02 09-56-22

Screenshot from 2026-07-02 09-56-30

Adds some extra tests to pad the coverage.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • 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 this results in changes in the UI: Added screenshots of the before and after

@aleksfl aleksfl requested a review from a team June 23, 2026 13:50
@aleksfl aleksfl self-assigned this Jun 23, 2026
@aleksfl aleksfl added frontend Affects frontend column Frontend incident column and column layout adjustments filter:incident list labels Jun 23, 2026
@aleksfl aleksfl linked an issue Jun 23, 2026 that may be closed by this pull request
@aleksfl aleksfl requested review from a team and removed request for a team June 23, 2026 13:50
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Test results

    8 files  1 808 suites   3m 21s ⏱️
  997 tests   996 ✅ 1 💤 0 ❌
7 976 runs  7 968 ✅ 8 💤 0 ❌

Results for commit caaa79d.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.56%. Comparing base (af2df43) to head (caaa79d).
⚠️ Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
src/argus/htmx/incident/views.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1970      +/-   ##
==========================================
+ Coverage   88.62%   89.56%   +0.94%     
==========================================
  Files         149      152       +3     
  Lines        7185     7296     +111     
==========================================
+ Hits         6368     6535     +167     
+ Misses        817      761      -56     

☔ View full report in Codecov by Harness.
📢 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.

Comment thread src/argus/htmx/incident/views.py Fixed
@aleksfl aleksfl force-pushed the add-kiosk-mode branch 3 times, most recently from e2b2244 to 28a973e Compare June 24, 2026 13:40
Comment thread src/argus/htmx/incident/views.py Outdated
@aleksfl aleksfl requested review from a team and hmpf June 30, 2026 09:43
Comment thread src/argus/htmx/incident/views.py Outdated
Comment thread src/argus/htmx/incident/views.py Outdated
aleksfl and others added 2 commits June 30, 2026 15:00

@lunkwill42 lunkwill42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Kiosk mode sure doesn't look much different than just collapsing the filters, which was already possible - only detectable difference for me is that the footer line is removed and its filter summary moved to the filter row instead (and that isn't very space-saving - at worst, the footer would have just been pushed outside of the viewport in a long incident list)

I think I would prefer an even more minimal kiosk mode, perhaps pushing the "details" to the blue argus navbar instead. Likely the only thing needed in kiosk mode is to print the name of the selected filter, and the timestamp of the last update. But these are just opinions - I think this kiosk mode should be demoed to our NOC to get some actual user feedback.

One potential show-stopper in the details, thoug...

Comment thread src/argus/htmx/templates/htmx/incident/_filter_controls.html Outdated
Comment thread src/argus/htmx/templates/htmx/incident/_filter_controls.html Outdated
hmpf
hmpf previously approved these changes Jul 1, 2026

@hmpf hmpf 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.

Works, but I can only know that the kiosk-mode does something by hovering.

I have suggested adding "link", but we could also decide on never using btn-ghost.

There was a discussion at the accessibility group's latest meeting about invisible buttons. Common, but inaccessible. Ditto hiding the link underline. We have the much slopped #1985 which is about the same problem but in other parts of the dashboard.

Another possibility is having a two-pixel border around such buttons (also including the "special filters"-one, but that would have to be fixed in a different PR).

@hmpf

hmpf commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Kiosk mode sure doesn't look much different than just collapsing the filters, which was already possible /../

/../ I think this kiosk mode should be demoed to our NOC to get some actual user feedback.

Agreed.

@hmpf hmpf dismissed their stale review July 1, 2026 06:25

Didn't notice lunkwill's comments.

@aleksfl aleksfl force-pushed the add-kiosk-mode branch 2 times, most recently from de848a8 to 30d8d9b Compare July 1, 2026 12:28
@hmpf

hmpf commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Look/feel is approved.

@hmpf

hmpf commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up: how to highlight links in general, what to do with buttons of little importance (like "special filters" in filter box), with updated style guide.

@aleksfl

aleksfl commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@hmpf @lunkwill42 Current version has been reworked to be even more minimal, I ran a live demo with the NOC and they preferred this version to their previous suggestion. Happy to get feedback on the code now, since the changes have been quite extensive to facilitate the rework.

@aleksfl aleksfl requested review from a team, hmpf and lunkwill42 July 2, 2026 08:55

@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.

Looks good, only nitpicks about tests and maybe more places to add link

Comment thread src/argus/htmx/templates/htmx/incident/_filter_controls.html Outdated
Comment thread src/argus/htmx/templates/htmx/incident/incident_list.html Outdated
ArgusHtmxPreferencesFactory(user=request.user)
return request

def test_given_non_default_sort_field_it_should_apply_secondary_sort(self):

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.

From the test code I cannot see that you're testing what you're claiming to test here

response = incident_list(self._make_request({"sort": "level"}))
self.assertEqual(response.status_code, 200)

def test_given_timeframe_in_session_it_should_include_timeframe_in_query(self):

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.

Same here



class IncidentDetailTests(test.TestCase):
def test_given_existing_incident_it_should_render_detail(self):

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.

Same here

Co-authored-by: Johanna England <johanna.england@sikt.no>
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

column Frontend incident column and column layout adjustments filter:incident list frontend Affects frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add kiosk mode

5 participants