Skip to content

Fix bind and validation timing, add ripple:submit, and show a progress bar on soft navigation - #5

Merged
xentixar merged 6 commits into
mainfrom
feat/forms-bind-and-progress
Oct 19, 2026
Merged

xentixar merged 6 commits into
mainfrom
feat/forms-bind-and-progress

Conversation

@xentixar

@xentixar xentixar commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Plain ripple:bind now waits for the next request instead of posting on blur. .debounce is its own modifier (default pause still comes from performance.debounce_default), and values that only exist on the client get sent along with a call or a property update.

Property updates no longer wipe the error bag for that field before rechecking it. If another rule reads the field (confirmed, same_as, different), that rule is checked again too. Flushing models before an action still clears errors once the values are applied.

Forms can use ripple:submit="save". A submit button with its own ripple:submit wins over the form.

Soft navigations (ripple:navigate, soft redirects, back/forward) show a thin bar on <html> when the request takes more than about 150ms. Turn it off with navigate.show_progress_bar, or change the color with navigate.progress_bar_color / --ripple-progress.

- Updated the debounce configuration in `ripple.php` and `configuration.md` to clarify its application to `ripple:bind.debounce`.
- Enhanced the `bind.js` logic to ensure proper handling of debounce modifiers.
- Introduced a new `deferredModels` function in `dom.js` to manage plain ripple:bind values that differ from signed state.
- Updated the `syncProperty` method in `Component.php` to allow optional validation reset.
- Added tests to verify the application of deferred models during property updates.
- Introduced `ripple:submit` directive to streamline form submission actions, allowing buttons to specify their own methods.
- Updated `submitAction` function in `dom.js` to prioritize button-specific actions over form-level submissions.
- Modified event listener in `listeners.js` to accommodate the new submission logic and ensure proper confirmation handling.
- Revised documentation in `README.md` and `directives.md` to reflect changes in directive usage and form handling.
- Added configuration options for a top progress bar during soft navigations in `ripple.php`, allowing customization of visibility and color.
- Introduced `startProgress` and `finishProgress` functions in `progress.js` to manage the display of the progress bar.
- Updated `softNavigate` function in `navigate.js` to trigger progress bar visibility during navigation.
- Enhanced documentation to include details about the new progress bar feature in `configuration.md` and `navigation.md`.
- Added tests to verify the correct rendering of progress bar settings in `ComponentManagerTest.php`.
@xentixar xentixar self-assigned this Oct 19, 2026
@xentixar xentixar added bug Something isn't working enhancement New feature or request labels Oct 19, 2026
@xentixar
xentixar merged commit 93a3d0e into main Oct 19, 2026
3 checks passed
@xentixar
xentixar deleted the feat/forms-bind-and-progress branch October 19, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant