From 69c9fd601440c08f39fdce9d1cdadf0bb8421e21 Mon Sep 17 00:00:00 2001 From: Daniel Esteves Date: Fri, 25 Dec 2020 17:43:39 -0400 Subject: [PATCH 1/3] feat: adding more stories to docs --- README.md | 2 +- package.json | 2 +- src/styles/styles.css | 41 ++++++++++++++-------------- stories/ReactYouTubeLite.stories.tsx | 14 ++++++++++ 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9c9308f..b62ccd1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A responsive react component to render YouTube videos in a lazyload mode to get a high speed load website. -You can see a [demo here](demo) +You can see a [demo here](https://danestves.github.io/react-youtube-lite) ## ⏳ Installation diff --git a/package.json b/package.json index 8ab9c54..371d6bf 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.0", + "version": "1.0.0", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/styles/styles.css b/src/styles/styles.css index a611185..7fe7671 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -1,31 +1,10 @@ /* Styles for Storybook */ -.aspect-ratio-none { - padding-bottom: 0; -} - -.aspect-ratio-square { - padding-bottom: 100%; -} - -.aspect-ratio-16\/9 { - padding-bottom: 56.25%; -} - -.aspect-ratio-4\/3 { - padding-bottom: 75%; -} - -.aspect-ratio-21\/9 { - padding-bottom: 42.86%; -} - .embed-responsive { position: relative !important; display: block !important; height: 0 !important; padding: 0 !important; - padding-bottom: 56.25% !important; overflow: hidden !important; } @@ -43,6 +22,26 @@ border: 0; } +.aspect-ratio-none { + padding-bottom: 0 !important; +} + +.aspect-ratio-square { + padding-bottom: 100% !important; +} + +.aspect-ratio-16\/9 { + padding-bottom: 56.25% !important; +} + +.aspect-ratio-4\/3 { + padding-bottom: 75% !important; +} + +.aspect-ratio-21\/9 { + padding-bottom: 42.86% !important; +} + /* Components Styles */ .ryt-lite { diff --git a/stories/ReactYouTubeLite.stories.tsx b/stories/ReactYouTubeLite.stories.tsx index 1805bc1..bf76955 100644 --- a/stories/ReactYouTubeLite.stories.tsx +++ b/stories/ReactYouTubeLite.stories.tsx @@ -25,3 +25,17 @@ export const Default = Template.bind({}); Default.args = { url: 'https://www.youtube.com/watch?v=DVQTGidS1yk', }; + +export const NoCookies = Template.bind({}); + +NoCookies.args = { + url: 'https://www.youtube.com/watch?v=DVQTGidS1yk', + noCookies: true, +}; + +export const NoAd = Template.bind({}); + +NoAd.args = { + url: 'https://www.youtube.com/watch?v=DVQTGidS1yk', + adNetwork: false, +}; From d7b9aed19cb24834cf3bcc02e7eb17a515d6cb38 Mon Sep 17 00:00:00 2001 From: Daniel Esteves Date: Fri, 25 Dec 2020 17:56:16 -0400 Subject: [PATCH 2/3] feat: changelog integration --- .chglog/CHANGELOG.tpl.md | 49 ++++++++++++++++++++++++++++ .chglog/config.yml | 27 +++++++++++++++ stories/ReactYouTubeLite.stories.tsx | 6 ++-- 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..389e978 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,49 @@ +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .RevertCommits -}} +### Reverts +{{ range .RevertCommits -}} +- {{ .Revert.Header }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..0df0e2e --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,27 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/danestves/react-youtube-lite +options: + commits: + # filters: + # Type: + # - feat + # - fix + # - perf + # - refactor + commit_groups: + # title_maps: + # feat: Features + # fix: Bug Fixes + # perf: Performance Improvements + # refactor: Code Refactoring + header: + pattern: "^(\\w*)\\:\\s(.*)$" + pattern_maps: + - Type + - Subject + notes: + keywords: + - BREAKING CHANGE \ No newline at end of file diff --git a/stories/ReactYouTubeLite.stories.tsx b/stories/ReactYouTubeLite.stories.tsx index bf76955..6ec1c3c 100644 --- a/stories/ReactYouTubeLite.stories.tsx +++ b/stories/ReactYouTubeLite.stories.tsx @@ -26,11 +26,11 @@ Default.args = { url: 'https://www.youtube.com/watch?v=DVQTGidS1yk', }; -export const NoCookies = Template.bind({}); +export const NoCookie = Template.bind({}); -NoCookies.args = { +NoCookie.args = { url: 'https://www.youtube.com/watch?v=DVQTGidS1yk', - noCookies: true, + noCookie: true, }; export const NoAd = Template.bind({}); From e336a9878fa11819ea9b458fb1d953d10f2e1923 Mon Sep 17 00:00:00 2001 From: Daniel Esteves Date: Fri, 25 Dec 2020 17:57:36 -0400 Subject: [PATCH 3/3] feat: compiling build of docs --- docs/iframe.html | 2 +- docs/main.f1f7bccb3e8f3933841f.bundle.js | 2 -- docs/main.f1f7bccb3e8f3933841f.bundle.js.map | 1 - docs/main.fa188c12686e594ebf76.bundle.js | 2 ++ docs/main.fa188c12686e594ebf76.bundle.js.map | 1 + docs/runtime~main.f1f7bccb3e8f3933841f.bundle.js.map | 1 - ....bundle.js => runtime~main.fa188c12686e594ebf76.bundle.js} | 2 +- docs/runtime~main.fa188c12686e594ebf76.bundle.js.map | 1 + docs/vendors~main.f1f7bccb3e8f3933841f.bundle.js.map | 1 - ....bundle.js => vendors~main.fa188c12686e594ebf76.bundle.js} | 4 ++-- ...> vendors~main.fa188c12686e594ebf76.bundle.js.LICENSE.txt} | 0 docs/vendors~main.fa188c12686e594ebf76.bundle.js.map | 1 + 12 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 docs/main.f1f7bccb3e8f3933841f.bundle.js delete mode 100644 docs/main.f1f7bccb3e8f3933841f.bundle.js.map create mode 100644 docs/main.fa188c12686e594ebf76.bundle.js create mode 100644 docs/main.fa188c12686e594ebf76.bundle.js.map delete mode 100644 docs/runtime~main.f1f7bccb3e8f3933841f.bundle.js.map rename docs/{runtime~main.f1f7bccb3e8f3933841f.bundle.js => runtime~main.fa188c12686e594ebf76.bundle.js} (97%) create mode 100644 docs/runtime~main.fa188c12686e594ebf76.bundle.js.map delete mode 100644 docs/vendors~main.f1f7bccb3e8f3933841f.bundle.js.map rename docs/{vendors~main.f1f7bccb3e8f3933841f.bundle.js => vendors~main.fa188c12686e594ebf76.bundle.js} (99%) rename docs/{vendors~main.f1f7bccb3e8f3933841f.bundle.js.LICENSE.txt => vendors~main.fa188c12686e594ebf76.bundle.js.LICENSE.txt} (100%) create mode 100644 docs/vendors~main.fa188c12686e594ebf76.bundle.js.map diff --git a/docs/iframe.html b/docs/iframe.html index c9a02ce..01f4981 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -130,4 +130,4 @@ - window['FRAMEWORK_OPTIONS'] = {}; \ No newline at end of file + window['FRAMEWORK_OPTIONS'] = {}; \ No newline at end of file diff --git a/docs/main.f1f7bccb3e8f3933841f.bundle.js b/docs/main.f1f7bccb3e8f3933841f.bundle.js deleted file mode 100644 index 1b86184..0000000 --- a/docs/main.f1f7bccb3e8f3933841f.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1083:function(module,exports,__webpack_require__){"use strict";__webpack_require__(3),__webpack_require__(51),__webpack_require__(40),__webpack_require__(31),__webpack_require__(42),__webpack_require__(1084),__webpack_require__(1085),__webpack_require__(7),__webpack_require__(41);var _clientApi=__webpack_require__(55),_clientLogger=__webpack_require__(34),_configFilename=__webpack_require__(1086);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i