Skip to content

Change Watch Keyword to Bind - #27

Merged
RiverHeart merged 3 commits into
IntegrateAppWithImageViewerfrom
ChangeWatchKeyword
Jun 13, 2026
Merged

Change Watch Keyword to Bind#27
RiverHeart merged 3 commits into
IntegrateAppWithImageViewerfrom
ChangeWatchKeyword

Conversation

@RiverHeart

@RiverHeart RiverHeart commented Jun 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

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 renames the WPF DSL keyword Watch to Bind, updates module exports accordingly, and propagates the new syntax (Bind <Property> -To <StatePath> ...) across docs, examples, and tests to reflect the new public API.

Changes:

  • Replaced Watch with Bind in the exported DSL surface (and added a test ensuring Watch is no longer exported).
  • Updated examples/docs to the new Bind ... -To ... usage, including the keyword reference page.
  • Adjusted related tests/examples to match current behavior (e.g., App content-host margin assertions) and added minor function metadata ([OutputType([bool])]).

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/modules/WPF/WPF.psd1 Updates exported function list: removes Watch, exports Bind.
src/modules/WPF/Tests/ImageViewer.Example.Tests.ps1 Updates example-content assertions from Watch to Bind ... -To ....
src/modules/WPF/Tests/DSL/App.Tests.ps1 Updates expected content-host margin values to match current App implementation.
src/modules/WPF/Tests/Bind.Tests.ps1 Renames coverage from Watch→Bind and asserts Watch is not exported.
src/modules/WPF/README.md Updates README example usage to Bind ... -To ....
src/modules/WPF/Public/Helpers/Set-WPFWindowFullScreen.ps1 Updates comment to reference Bind callbacks.
src/modules/WPF/Public/Helpers/New-WPFObservableState.ps1 Updates help text to reference Bind instead of Watch.
src/modules/WPF/Public/DSL/Helpers/State.ps1 Updates help text to reference Bind instead of Watch.
src/modules/WPF/Public/DSL/Helpers/BindProperty.ps1 Clarifies docs about internal Binding creation and $this in scriptblock.
src/modules/WPF/Public/DSL/Helpers/Binding.ps1 Clarifies docs around when to use Binding vs BindProperty.
src/modules/WPF/Public/DSL/Helpers/Bind.ps1 Renames the keyword implementation WatchBind and changes the API to use -To.
src/modules/WPF/Examples/ReadmeExample/ReadmeExample.ps1 Updates example script to Bind ... -To ....
src/modules/WPF/Examples/ImageViewer/ImageViewer.DSL.ps1 Updates ImageViewer DSL usage from Watch to Bind ... -To ....
src/modules/WPF/Examples/ImageViewer/functions/Test-ImageViewerShouldNavigate.ps1 Adds comment-based help and [OutputType([bool])].
src/modules/WPF/Docs/KeywordReference.md Updates keyword reference TOC/content from Watch→Bind and updates examples.
Comments suppressed due to low confidence (1)

src/modules/WPF/Public/DSL/Helpers/Bind.ps1:15

  • In the help text, the description of the -To path still says the last segment is the observable property "to watch", which is inconsistent with the keyword rename to Bind. This makes the docs confusing for users learning the new API.

@RiverHeart
RiverHeart merged commit b04c7b6 into IntegrateAppWithImageViewer Jun 13, 2026
1 check passed
@RiverHeart
RiverHeart deleted the ChangeWatchKeyword branch June 13, 2026 23:17
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