[bugfix/git_helper-0] Bump version to 1.0.3 and enhance UI settings#27
[bugfix/git_helper-0] Bump version to 1.0.3 and enhance UI settings#27justinkumpe merged 1 commit intomainfrom
Conversation
Updated version number and adjusted UI tool settings for improved display.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBumps the git-helper script version to 1.0.3 and simplifies its TUI behavior by using fixed dimensions and removing the --no-shadow option from dialog/whiptail invocations. Flow diagram for git-helper TUI dimension and UI tool configurationflowchart TD
A[Start git-helper.sh] --> B[Set SCRIPT_VERSION 1.0.3]
B --> C[Set HEIGHT 20]
C --> D[Set WIDTH 78]
D --> E[Set MENU_HEIGHT 12]
E --> F[Detect available UI_TOOL]
F --> G{UI_TOOL}
G --> H[whiptail: use HEIGHT, WIDTH, MENU_HEIGHT without no-shadow]
G --> I[dialog: use HEIGHT, WIDTH, MENU_HEIGHT without no-shadow]
G --> J[text: fall back to text-based UI]
H --> K[ui_menu ui_checklist ui_input ui_yesno ui_show_text_file]
I --> K
J --> K
K --> L[Display choices and capture user input]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- By replacing the dynamic HEIGHT/MENU_HEIGHT calculation with fixed values, the dialogs may render poorly or be unusable on very small or very large terminals; consider keeping a minimal dynamic calculation or letting users override dimensions via environment variables.
- Dropping the
--no-shadowflag for bothwhiptailanddialogchanges the visual behavior and may not be desired for all users; you might want to gate this via a configuration flag or environment variable so users can opt in/out of shadows.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- By replacing the dynamic HEIGHT/MENU_HEIGHT calculation with fixed values, the dialogs may render poorly or be unusable on very small or very large terminals; consider keeping a minimal dynamic calculation or letting users override dimensions via environment variables.
- Dropping the `--no-shadow` flag for both `whiptail` and `dialog` changes the visual behavior and may not be desired for all users; you might want to gate this via a configuration flag or environment variable so users can opt in/out of shadows.
## Individual Comments
### Comment 1
<location> `git_helpers/git-helper.sh:28-30` </location>
<code_context>
UI_TOOL=""
TITLE="Git Helper v${SCRIPT_VERSION}"
-WIDTH=70
+HEIGHT=20
+WIDTH=78
+MENU_HEIGHT=12
default_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
CONFIG_DIR="$default_config_dir/git-helper"
</code_context>
<issue_to_address>
**issue:** Fixed dialog dimensions may break on very small terminals and are disconnected from each other.
Previously `HEIGHT`/`MENU_HEIGHT` were based on the actual terminal size; hard-coding them can make the UI unusable on small terminals and suboptimal on large ones, and creates a risk that `HEIGHT` and `MENU_HEIGHT` diverge logically. Consider restoring dynamic sizing (even in a simplified form) or deriving `MENU_HEIGHT` from `HEIGHT` (e.g. `MENU_HEIGHT=$((HEIGHT-7))`) with clamping based on terminal size so the layout remains adaptive.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| HEIGHT=20 | ||
| WIDTH=78 | ||
| MENU_HEIGHT=12 |
There was a problem hiding this comment.
issue: Fixed dialog dimensions may break on very small terminals and are disconnected from each other.
Previously HEIGHT/MENU_HEIGHT were based on the actual terminal size; hard-coding them can make the UI unusable on small terminals and suboptimal on large ones, and creates a risk that HEIGHT and MENU_HEIGHT diverge logically. Consider restoring dynamic sizing (even in a simplified form) or deriving MENU_HEIGHT from HEIGHT (e.g. MENU_HEIGHT=$((HEIGHT-7))) with clamping based on terminal size so the layout remains adaptive.
Updated version number and adjusted UI tool settings for improved display.
Summary by Sourcery
Bump git-helper script version and adjust UI dialog defaults for a more consistent terminal interface.
Enhancements: