Skip to content

2.0 - #1

Closed
covao wants to merge 4 commits into
mainfrom
2.0
Closed

2.0#1
covao wants to merge 4 commits into
mainfrom
2.0

Conversation

@covao

@covao covao commented Jul 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 26, 2026 08:07
@covao covao closed this Jul 26, 2026
@covao
covao deleted the 2.0 branch July 26, 2026 08:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates ParamUI toward a “2.0” single-file distribution approach while adding new UI behaviors: regex-based validation for textbox parameters and automatic minimization of the navigation tree for flat parameter tables.

Changes:

  • Added regex pattern validation for string parameters (live feedback + focus-out rejection + update_prm guarding).
  • Added auto-minimize behavior for the navigation tree when no parameters use sub-paths.
  • Removed legacy packaging entry points (setup.py, paramui/__init__.py) and updated README installation guidance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
setup.py Removed legacy setuptools packaging script.
README.md Updated installation instructions and documented new regex/nav-tree features.
paramui/init.py Removed package-level re-export (shifts usage toward single-file module).
paramui.py Implemented regex validation + nav-tree minimization and related internal plumbing.
Comments suppressed due to low confidence (5)

README.md:26

  • The local download link points to ./paramui/paramui.py, but the file is ./paramui.py at the repo root. This link currently won’t resolve for users.
### Method 2: Download the source code
Download [paramui.py](./paramui/paramui.py) and place it in your project directory

paramui.py:771

  • step='file' (as documented in README) is currently treated as a regex pattern and registered for validation. This causes file-path inputs to be rejected unless they literally match the regex file. Consider excluding 'file' from pattern registration.

This issue also appears in the following locations of the same file:

  • line 809
  • line 844
    paramui.py:846
  • In no-UI initialization, step='file' is currently treated as a regex pattern and registered for validation. This will later cause file-path values to fail validation in update_prm() unless they match the regex file. Exclude 'file' here too.
    paramui.py:967
  • trace_add('write', ...) is added every time a textbox is (re)created. Since chibiui reuses the same StringVar for a key, navigating between paths can accumulate duplicate traces and call _on_pattern_text_changed multiple times per keystroke. Guard against re-registering the trace for the same StringVar.
    paramui.py:812
  • If step='file' is used (as in the README example), it currently falls into the regex-validated textbox branch instead of rendering a file browser. Treat 'file' as a file-browser specifier (or document that step must start with *.) to avoid surprising validation behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
['Flag', 'Flag 1', True, []], # Checkbox
['Text', 'Text Input', 'ABC', []], # Textbox
['Name', 'Name', 'Taro', '[A-Za-z ]{0,32}'], # Textbox with regex pattern validation
['Options/File', 'File Path', '*.txt', 'file'], # File browser
Comment thread README.md
Comment on lines +21 to 24
### Method 1: Download to the current folder using wget:
```bash
pip install git+https://github.com/covao/ParamUI
wget https://raw.githubusercontent.com/covao/ParamUI/main/paramui/paramui.py
```
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.

2 participants