ampproject / ampproject/amphtml

[amp-consent] Post-prompt UI doesn't appear in sample

Open
#33,958 10 comments 0 reactions 0 assignees View on GitHub
Component: amp-consent Stale Type: Bug WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## What's the issue?

In [the new granular amp-consent sample on amp.dev](https://amp.dev/documentation/examples/user-consent/granular_user_consent), the post-prompt UI never appears.

## Briefly describe the bug.

It doesn't appear! Its `hidden` attribute is never removed:

```html


Do you want to make your consent choices again?
I do!

```

However, it does appear in [the demo version with the same code](https://amp.dev/documentation/examples/user-consent/granular_user_consent/preview/?format=websites), as well as [the playground version](https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fexamples%2Fuser-consent%2Fgranular_user_consent&format=websites). I can only surmise that the failure in the first version is caused by the DOM structure that surrounds the `` component there.

I kept looking for something I'd done wrong, but I haven't found that something. (You might. 😏)

Contributor guide

Open the contributing guide

Research direction

Start with the granular amp-consent sample on amp.dev and compare its DOM structure with the linked demo and playground versions, focusing on the repromptDialog element and amp-consent component. Done means the post-prompt UI appears in the sample and its hidden attribute is removed as it is in the working versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.