Skip to content

feat: public read API on ClipboardBinding#24480

Merged
mshabarov merged 2 commits into
mainfrom
feature/clipboard-read
Jun 9, 2026
Merged

feat: public read API on ClipboardBinding#24480
mshabarov merged 2 commits into
mainfrom
feature/clipboard-read

Conversation

@Artur-

@Artur- Artur- commented May 29, 2026

Copy link
Copy Markdown
Member

Clipboard.onClick(button).read(onPayload, onError) — and the
single-field convenience variants readText / readHtml — make the
read side reachable from the same binding entry point as the write
side, instead of forcing callers to instantiate the internal
ReadFromClipboardAction themselves.

ClipboardPayload moves out of trigger.internal into the public
clipboard package so it can sit in the read methods' signatures
without leaking an internal type, mirroring how ClipboardContent
already lives there for the write side. The private bind() helper
on ClipboardBinding is generalised to accept any Action so it can
route both write and read actions.

The read IT view is restructured into headed sections and gains
two new buttons (read-text, read-html); the IT picks up matching
scenarios that use the existing resolving-clipboard shim.

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown

Test Results

 1 438 files  ±0   1 438 suites  ±0   1h 20m 54s ⏱️ - 2m 4s
10 115 tests +5  10 047 ✅ +5  68 💤 ±0  0 ❌ ±0 
10 587 runs  +5  10 518 ✅ +5  69 💤 ±0  0 ❌ ±0 

Results for commit 2497bc5. ± Comparison against base commit fe8fa21.

♻️ This comment has been updated with latest results.

@mshabarov mshabarov self-requested a review June 1, 2026 11:35
@Artur- Artur- marked this pull request as draft June 1, 2026 14:40
Clipboard.onClick(button).read(onPayload, onError) — and the
single-field convenience variants readText / readHtml — make the
read side reachable from the same binding entry point as the write
side, instead of forcing callers to instantiate the internal
ReadFromClipboardAction themselves.

ClipboardPayload moves out of trigger.internal into the public
clipboard package so it can sit in the read methods' signatures
without leaking an internal type, mirroring how ClipboardContent
already lives there for the write side. The private bind() helper
on ClipboardBinding is generalised to accept any Action so it can
route both write and read actions.

The read IT view is restructured into headed sections and gains
two new buttons (read-text, read-html); the IT picks up matching
scenarios that use the existing resolving-clipboard shim.
@Artur- Artur- force-pushed the feature/clipboard-read branch from 9f2f2c5 to 55e142f Compare June 6, 2026 15:01
@Artur- Artur- marked this pull request as ready for review June 6, 2026 15:08
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@mshabarov mshabarov added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 1ac94ad Jun 9, 2026
34 checks passed
@mshabarov mshabarov deleted the feature/clipboard-read branch June 9, 2026 08:55
@github-project-automation github-project-automation Bot moved this from 🔎Iteration reviews to Done in Vaadin Flow | Hilla | Kits ongoing work Jun 9, 2026
@vaadin-bot

Copy link
Copy Markdown
Collaborator

Hi @Artur- and @mshabarov, when i performed cherry-pick to this commit to 25.2, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 1ac94ad
error: could not apply 1ac94ad... feat: public read API on ClipboardBinding (#24480)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@Artur-

Artur- commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Need to wait for #24470

Artur- added a commit that referenced this pull request Jun 9, 2026
This PR cherry-picks changes from the original PR #24480 to branch 25.2.
---
#### Original PR description
> Clipboard.onClick(button).read(onPayload, onError) — and the
> single-field convenience variants readText / readHtml — make the
> read side reachable from the same binding entry point as the write
> side, instead of forcing callers to instantiate the internal
> ReadFromClipboardAction themselves.
> 
> ClipboardPayload moves out of trigger.internal into the public
> clipboard package so it can sit in the read methods' signatures
> without leaking an internal type, mirroring how ClipboardContent
> already lives there for the write side. The private bind() helper
> on ClipboardBinding is generalised to accept any Action so it can
> route both write and read actions.
> 
> The read IT view is restructured into headed sections and gains
> two new buttons (read-text, read-html); the IT picks up matching
> scenarios that use the existing resolving-clipboard shim.
>

Co-authored-by: Artur Signell <artur@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants