Skip to content

tweak_view: complete UI rewrite proposal (v2)#22

Open
BraedenP232 wants to merge 3 commits intoSniffleupagus:mainfrom
BraedenP232:v2
Open

tweak_view: complete UI rewrite proposal (v2)#22
BraedenP232 wants to merge 3 commits intoSniffleupagus:mainfrom
BraedenP232:v2

Conversation

@BraedenP232
Copy link
Copy Markdown

To me tweak_view is a staple to Pwnagotchi so I've been working on a rewrite to give it a fresh look. After sitting on it for a bit, I figured I’d open this as a proposal rather than just keeping it local.

This is not meant to overwrite the current plugin without discussion. I’m thinking of it more as a potential v2 direction and wanted to get your thoughts before doing anything drastic.

Screenshot:

Screenshot 2026-02-17 at 1 02 36 PM

What this is

A pretty significant UI rewrite focused on:

  • Better usability (especially on mobile)
  • Visual feedback when editing positions
  • Safer tweaking workflow
  • A few quality-of-life additions

I kept the core idea and behavior intact — this just wraps it in a more interactive editing experience.

What changed / what’s new

UI / UX

  • Responsive layout (actually usable on mobile)
  • Sidebar + properties panel
  • Overlay highlighting when selecting elements
  • Cleaner overall layout

Editing Improvements

  • XY nudge buttons (+/- 1 and +/- 10)
  • Live bounding box overlays
  • Corner markers for shapes
  • Immediate visual feedback while adjusting

Custom Shapes

  • Ability to add Line / Rectangle / Ellipse
  • Separate tracking for custom shapes
  • Safe delete support

Import / Export

  • JSON export of tweaks
  • JSON import (with validation)
  • Full reset option

Under the hood

  • AJAX-based state sync
  • Clearer separation between UI and backend
  • Version bumped to 2.0.0
  • Original author still credited

How would you prefer to handle this?

Totally open to direction here. Options I see:

  • Make this a v2 branch
  • Replace the existing plugin
  • Maintain both versions
  • Or keep this separate entirely

Happy to restructure things however makes the most sense for the project.

BraedenP232 and others added 2 commits February 17, 2026 12:56
This commit introduces a proposed v2 rewrite of tweak_view with a modernized UI and extended functionality.

The goal of this rewrite is to improve usability (especially on mobile), provide visual editing feedback, and add guardrails around layout
modification while preserving the core purpose of the original plugin.

Key improvements:

- Fully responsive UI layout
- Live overlay selection with visual bounding boxes
- XY nudge controls (+/- 1 / +/- 10)
- Custom shape support (Line, Rectangle, Ellipse)
- Import/export of tweaks via JSON
- AJAX-based state synchronization
- Reset functionality

This rewrite is intended as a proposal for a v2 branch and does not aim to replace the original implementation without maintainer approval.

Original functionality has been preserved where possible, and the
original author is credited in metadata.
Copy link
Copy Markdown
Author

@BraedenP232 BraedenP232 left a comment

Choose a reason for hiding this comment

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

commit 878300a

  • Improved responsiveness and sizing behaviour across display modes and resolutions.
  • Fixed several layout and event-handling edge cases (deferred redraws, stale state updates).
  • Removed unused variables and cleaned up helper functions for maintainability.
  • Decided to hide 'color' input field as it's irrelevant for most users, can be added later but adds more ui complexity.
  • No functional behaviour changes besides UI improvements; existing plugin hooks preserved.
Pic 1 Pic 2 Pic 3

- Fix duplicate-ID bug causing XY inputs to not update live across
  mobile/desktop panels; replaced getElementById with querySelectorAll
  helpers (getInputVal, syncInputs) so both panels stay in sync
- Clamp XY coordinates to screen bounds in both JS (before API call)
  and Python update_elements (before applying to widget), preventing
  out-of-bounds values from crashing pwnagotchi
- Expose screen width/height via api/state (__screen__ key); display
  in topbar stats and as a hint above XY inputs in the properties panel
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