ampproject / ampproject/amphtml

allow social share to be clicked from wrapping div

Open
#31,781 2 comments 0 reactions 0 assignees View on GitHub
Component: amp-social-share P3: When Possible Stale Type: Feature Request WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## Describe the new feature or change to an existing feature you'd like to see

Hello,
I'm trying to display our 3 social share methods as stacked rows with a specific design like the following:

[amp social share] [text to explain] [call to action text] [right arrow icon]

so far the design is done, the only thing left is allowing row click to trigger the social share component. Which I couldnt finddocumented anywhere.

## Describe alternatives you've considered

I tried to use an amp script for each row, and have ids that reference the rows, so they could be clicked from the scripts. but for some reason, the click event isn't fired.

![Screenshot from 2021-01-02 18-23-51](https://user-images.githubusercontent.com/11743389/103461551-d3f45300-4d27-11eb-98f8-eb4ab294fcb5.png)

if this use case already supported, please point me to the docs/example usage.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the AMP social share component and its documented usage, especially how click events from surrounding elements are handled. Reproduce the stacked-row example described in this issue and check the attempted amp-script approach. Done means either enabling the wrapping div to trigger the share action or documenting a supported example and limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.