Skip to content

feat: Add Web Share API support via Page.share() and Page.isShareSupported()#24325

Open
Artur- wants to merge 2 commits into
mainfrom
feature/web-share
Open

feat: Add Web Share API support via Page.share() and Page.isShareSupported()#24325
Artur- wants to merge 2 commits into
mainfrom
feature/web-share

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented May 12, 2026

Detect navigator.share support during browser details collection and expose it through ExtendedClientDetails.isWebShareSupported(). Add Page.isShareSupported() for checking support and Page.share() for invoking the native share dialog. The share() method throws UnsupportedOperationException if the browser lacks support.

…orted()

Detect navigator.share support during browser details collection
and expose it through ExtendedClientDetails.isWebShareSupported().
Add Page.isShareSupported() for checking support and Page.share()
for invoking the native share dialog. The share() method throws
UnsupportedOperationException if the browser lacks support.
@Artur- Artur- force-pushed the feature/web-share branch from b11fc3b to b71461f Compare May 12, 2026 13:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Test Results

 1 406 files  ±0   1 406 suites  ±0   1h 19m 23s ⏱️ - 2m 38s
10 142 tests +3  10 072 ✅ +3  70 💤 ±0  0 ❌ ±0 
10 617 runs  +3  10 538 ✅ +3  79 💤 ±0  0 ❌ ±0 

Results for commit cc9dc4a. ± Comparison against base commit 126b8bc.

♻️ This comment has been updated with latest results.

Move the support state to a UIInternals ValueSignal<WebShareSupport>
seeded from the bootstrap handshake, expose Page.shareSupportSignal()
in place of isShareSupported(), and route Page.share() through a new
WebShare.ts module installed under window.Vaadin.Flow.share. Drops the
duplicate v-ns capture from BootstrapHandler.js so the parameter is
collected only in Flow.ts, matching v-pv and v-ga.
@github-actions github-actions Bot added +0.1.0 and removed +1.0.0 labels May 13, 2026
@sonarqubecloud
Copy link
Copy Markdown

Artur- added a commit to vaadin/use-cases that referenced this pull request May 13, 2026
Six use cases exercising Page#shareSupportSignal() and Page#share(...)
from vaadin/flow#24325: share this page, copy-link fallback, custom
message, per-item share in a list, completion feedback, and invite
link. Includes browserless tests, Fly deployment config, and an
API-GAPS.md noting the file-share / canShare / test-simulator gaps
surfaced while building the demos.
@Artur-
Copy link
Copy Markdown
Member Author

Artur- commented May 15, 2026

This should be based on trigger/action type API

*
* @return the read-only Web Share support signal
*/
public Signal<WebShareSupport> shareSupportSignal() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

getShareSupportSignal() or perhaps only getShareSupport() as Sinal is the return type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🔎Iteration reviews

Development

Successfully merging this pull request may close these issues.

3 participants