Skip to content

Enhance UI/UX and add drag-and-drop functionality to Results page - #57

Open
maexled wants to merge 6 commits into
masterfrom
feature/ui-improvements
Open

Enhance UI/UX and add drag-and-drop functionality to Results page#57
maexled wants to merge 6 commits into
masterfrom
feature/ui-improvements

Conversation

@maexled

@maexled maexled commented May 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

maexled and others added 6 commits May 22, 2026 16:27
- base.html: Bootstrap Icons CDN, active nav highlighting, flexbox footer,
  restored original navbar brand name without icons
- index.html: section headers with device count badges, empty state,
  table-hover, icons on buttons, HR divider between device types
- device_table_entries.html: colored badges for Active/Inactive,
  IP in <code>, pencil icon on Edit button, empty-state row
- device_form.html: icons on Save/Cancel/Remove buttons,
  spinner in Save button while submitting
- results.html: full-width inline device rows replacing 3-col card grid,
  chart expands directly below each device row, fixed Show/Hide toggle
  button text, Bootstrap Icons replacing missing Font Awesome refs,
  Details link per device, Set-based shown tracking
- single_result.html: breadcrumb navigation, device header with type badge
  and IP, {% with %} scoped correctly inside each block
- mystrom_chart.html / shelly_chart.html: loading animation now removed
  only after chart is fully rendered — success callback made async,
  resolve() moved to after await renderChart(), chart.render() returns
  its Promise, resolve() on fail instead of always()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Drag & drop:
- All devices (MyStrom + Shelly) in one unified sortable list via SortableJS 1.15.6
- Grab handle (⠿) on the left of each row; ghost + chosen CSS for drag feedback
- Order persisted in localStorage (key: mystrom-device-order)
- "Reset order" button appears after any reorder, reloads to default order
- Deleted/unknown device IDs in saved order are silently skipped

Hide devices:
- Eye icon button next to each drag handle hides a device with a smooth
  collapse animation
- Hidden devices stored in localStorage (key: mystrom-device-hidden)
- "X device(s) hidden · Show all" notice appears in the page header
- "Show all" restores all hidden devices instantly
- Hidden state and order are both restored independently on page load

Offline support:
- Bootstrap Icons (CSS + woff2/woff fonts) vendored into static/css/
- SortableJS vendored into static/js/
- No external CDN dependencies remain

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Bootstrap 4 uses mr-* (margin-right), not the Bootstrap 5 me-*
(margin-end) classes. All occurrences replaced across templates so
icons and button labels have proper spacing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The spinner was set in chartDiv but then wiped by chartDiv.innerHTML=""
inside setTimeout before the AJAX even started. Fix: remove the premature
clear from toggleChart; instead clear chartElement inside the chart load
functions right before render (once data has arrived).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Expect <code> wrapper around IP addresses in device table
- Check for class="device-row" absence instead of <tr> after delete all
- Update modal title assertion from "Create" to "Add"
- Update edit form title assertion from "Edit device" to "Edit Device"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant