gatsby-remark-embedder
gatsby-remark-embedder copied to clipboard
feat(CodePen): Add support for height & width options
What: Added option to override hardcoded CodePen dimensions, with option to merge provided options with default options
Why: In order to change hardcoded CodePen's iframe width/height
How:
Each transformer can optionally export a const defaultOptions.
When the plugin runs it merges provided options ( services[name]) if exist with defaultOptions with precedence of provided options, and passes them as a second argument to the transformer exported getHTML function
Checklist:
- [x] Documentation
- [x] Tests
- [x] Ready to be merged
Codecov Report
Merging #146 (4d96646) into main (668d719) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## main #146 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 300 300
Branches 95 96 +1
=========================================
Hits 300 300
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/transformers/CodePen.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 668d719...4d96646. Read the comment docs.
Hi @talohana! 👋
Thanks for taking the time to implement this feature. 👊
I would however take a look at how the
Twitchoptions are implemented and make them have a default value. Exposing adefaultOptionsvalue to merge them with the possible given options and pass that object back into thegetHTMLfunction is adding unnecessary imo.
I see, it does look simpler, should I make the changes in this PR or create a new one?
should I make the changes in this PR or create a new one?
@talohana You can just hard reset this branch onto upstream/master and push new commits
will this pull request be merged soon?
will this pull request be merged soon?
I can work on it later today, @MichaelDeBoey any changes required rather than resolving the conflicts?