Automattic / Automattic/jetpack
googlemaps shortcode w=100%
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Steps to reproduce the issue
1. Go to a page or post that is still in the classic editor mode (not converted to blocks yet) and create a googlemaps shortcode with a width in % like for example:
`[googlemaps https://www.google.com/maps/embed?pb=...&w=100%&h=450]`
2. Check public side to see the map is rendered in an iframe with width 100% (should be the case)
3. Go back to edit the page/post and convert it to the new editor blocks. Notice how the googlemaps shortcode gets correctly converted to a shortcode block with and the w=100% is still in there.
4. See public side again: the iframe is now 100px wide instead of 100%.
As a bonus:
5. Go back to edit the page/post again and now put the shortcode (with w=100%) in a Classic block instead of a Shortcode block.
6. Check public side again and notice it is still 100px wide...
#### What I expected
Same behavior as in classic editor / WordPress pre-gutenberg
#### What happened instead
Percentage values are seen as px values
https://wordpress.org/support/topic/googlemaps-shortcode-w100-issue/
Contributor guide
Research direction
Start by locating the googlemaps shortcode handling and the conversion path from the classic editor to a Shortcode or Classic block. Compare the iframe width before and after conversion, then verify that a w=100% value remains percentage-based on the public page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100