Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CodePen): Add support for height & width options #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

talohana
Copy link

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:

  • Documentation
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #146 (4d96646) into main (668d719) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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 data
Powered by Codecov. Last update 668d719...4d96646. Read the comment docs.

@MichaelDeBoey MichaelDeBoey changed the title Adjust codepen dimensions feat(CodePen): Add support for height & width options Oct 16, 2020
@MichaelDeBoey MichaelDeBoey self-assigned this Oct 16, 2020
Copy link
Owner

@MichaelDeBoey MichaelDeBoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @talohana! 👋

Thanks for taking the time to implement this feature. 👊

I would however take a look at how the Twitch options are implemented and make them have a default value.
Exposing a defaultOptions value to merge them with the possible given options and pass that object back into the getHTML function is adding unnecessary imo.

@talohana
Copy link
Author

Hi @talohana! 👋

Thanks for taking the time to implement this feature. 👊

I would however take a look at how the Twitch options are implemented and make them have a default value.
Exposing a defaultOptions value to merge them with the possible given options and pass that object back into the getHTML function is adding unnecessary imo.

I see, it does look simpler, should I make the changes in this PR or create a new one?

@MichaelDeBoey
Copy link
Owner

MichaelDeBoey commented Oct 16, 2020

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

@talohana talohana closed this Oct 16, 2020
@MichaelDeBoey MichaelDeBoey added the ⚙️ CodePen Issue or pull request regarding CodePen label Oct 16, 2020
@talohana talohana reopened this Oct 16, 2020
@hazem3500
Copy link

will this pull request be merged soon?

@talohana
Copy link
Author

will this pull request be merged soon?

I can work on it later today, @MichaelDeBoey any changes required rather than resolving the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ CodePen Issue or pull request regarding CodePen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants