Automattic / Automattic/jetpack
Persistant Jetpack Subscription Modal on Posts HTML Code - Atomic Sites Only
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### Quick summary
Atomic sites only.
There is a modal that shows up when you scroll down a post if this option is enabled:
Newsletter > Show subscription pop-up when scrolling a post
That modal isn't included in the HTML code of the posts if the option is deactivated. But, if the site is Atomic, the modal is visible in the HTML code. With its visibility set to hidden and opacity set to 0. Which is not too SEO-friendly, particularly since it includes an H2 tag.
### Steps to reproduce
1. Open any atomic site (even a new one)
2. Go to a post
3. Check the HTML code for an element with the class `jetpack-subscription-modal`
### A clear and concise description of what you expected to happen.
The `jetpack-subscription-modal` should be visible only when `Newsletter > Show subscription pop-up when scrolling a post` is enabled.
It shouldn't be in the HTML code of any post if the option is deactivated.
### What actually happened
The modal is in the HTML code of all posts. It's hidden with CSS code.
### Impact
Most (> 50%)
### Available workarounds?
Yes, difficult to implement
### If the above answer is "Yes...", outline the workaround.
A PHP filter could do but I don't have the bandwidth to find the exact one right now.
### Platform (Simple and/or Atomic)
Atomic
### Logs or notes
8886459-zen
Contributor guide
Research direction
Start by searching the Jetpack code for `jetpack-subscription-modal` and the `Newsletter > Show subscription pop-up when scrolling a post` setting, then reproduce the behavior on an Atomic post. Done means the modal is absent from the post HTML when the setting is disabled and remains available when it is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100