🏗 Add "wrapper": "bento" option to Bento components#34838
Merged
caroqliu merged 1 commit intoampproject:mainfrom Jun 11, 2021
Merged
🏗 Add "wrapper": "bento" option to Bento components#34838caroqliu merged 1 commit intoampproject:mainfrom
"wrapper": "bento" option to Bento components#34838caroqliu merged 1 commit intoampproject:mainfrom
Conversation
westonruter
added a commit
to westonruter/amphtml
that referenced
this pull request
Jun 11, 2021
…ebook-like-bento-version * 'main' of github.com:ampproject/amphtml: minor updates + fix broken links (ampproject#34840) Add "wrapper": "bento" option to Bento components (ampproject#34838) ♻️ Move src/layout into core to unblock buildDOM for amp-layout (ampproject#34818) ♿ Apply `lang="en"` to relevant snippets in `test/` (ampproject#34768) Bento: Enable `npm` for `amp-video` (ampproject#34822) ✨[story-ads] Introduce new yellow segment progress bar v2 (ampproject#34804) SwG Release (ampproject#34825) 📦 Update build-system devDependencies to v7.14.5 (ampproject#34802) Disable viewport warnings in experiment. (ampproject#34809) Apply lang="en" to examples/ (ampproject#34759) ✨ [Amp story] Scaffold desktop one panel experiment (ampproject#34755) ♻️ Migrate Style and DOM helpers into core/DOM + type-checking (ampproject#34681) 🏗 Don't pull all externs into experiments (ampproject#34800) typechecking: remove pride as not compatible with rest of strategy (ampproject#34787) Fix forbidden terms to unblock `main` (ampproject#34799)
alanorozco
added a commit
that referenced
this pull request
Jun 11, 2021
`amp make-extension --bento` now adds property to bundle config like in #34838
AnuragVasanwala
added a commit
to rtCamp/amphtml
that referenced
this pull request
Jun 14, 2021
ampproject#34838 Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>
alanorozco
added a commit
that referenced
this pull request
Jun 14, 2021
This was referenced Jun 16, 2021
caroqliu
added a commit
that referenced
this pull request
Jun 24, 2021
* Initial Commit * Property mappings and Cleanup * Minor fixes, Formatting and Comments * More readable variable name * Test Cases for Bento * Updated test-cases and Storybook * Added base CSS File * Bug Fix: Layout System and Unit * Parent element changed from <div> to <> * Type correction for 'visual' parameter * Bug fix for color parameter in storybook * Update extensions/amp-soundcloud/1.0/base-element.js Bento components are required to be R1. We have an equivalent static getPreconnects(element) in R1 designed to take care of this. Co-authored-by: Justin Ridgewell <justin@ridgewell.name> * ♻️ Add 'wrapper' designation to bento #34838 Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Delete init/constructor of `amp-soundcloud` No need to override `init` if no changes were made to it except calling parent class's `init`. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Use `passthroughNonEmpty` which only give `<slot>` for non empty `children` Since `passthrough` gives a `<slot>` reference to the children prop in all cases, let's make this passthroughNonEmpty -- which will only give a `<slot>` if there are children in the given markup. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Warning for required props when not present * ♻️ Warning for required pros when not present * ♻️ Warning for required props when not present * ♻️ `trackId` and `playlistId` order chek Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ `trackId` and `playlistId` order check Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Removed explicitly specify boolean `true` for conditional block No need to explicitly specify boolean `true` for conditional block. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Added default value for `visual` prop in Preact component Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed props handled by AMP's layout system `height`, `heights`, `media`, `sizes`, and `width` are not needed to pass through as these attributes are specific to AMP's layout system and handled by the runtime. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed unnecessary typedef `height`, `heights`, `media`, `sizes`, and `width` are not needed to pass through as these attributes are specific to AMP's layout system and handled by the runtime. Thus they do not need to be specify in typedef. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed interface as no API exposed * ♻️ Moved `converter.js` into storybook * 🚮 Removed `layout` from Preact example, ♻️ Added `height` into style * 🚮 Removed empty CSS and `hasCss` from `bundles.config.extensions.json` * 🐛 `htmlFor` import fix for test case, ♻️ added `data-trackid` attribute * ♻️ Replaced `<iframe>` with `<IframeEmbed>` * ♻️ Updated specification for validation * 🏗 Added `npm` to `bundles.config.extensions.json` Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ New line at EOF in `validator-amp-soundcloud.out` * Added 'loadable' to indicate a resource intensive component * 🏗 Fixes reported by 'amp lint' for CI * 🏗 Fixes for aliased imports for CI Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>
antiphoton
pushed a commit
to antiphoton/amphtml
that referenced
this pull request
Jun 25, 2021
* Initial Commit * Property mappings and Cleanup * Minor fixes, Formatting and Comments * More readable variable name * Test Cases for Bento * Updated test-cases and Storybook * Added base CSS File * Bug Fix: Layout System and Unit * Parent element changed from <div> to <> * Type correction for 'visual' parameter * Bug fix for color parameter in storybook * Update extensions/amp-soundcloud/1.0/base-element.js Bento components are required to be R1. We have an equivalent static getPreconnects(element) in R1 designed to take care of this. Co-authored-by: Justin Ridgewell <justin@ridgewell.name> * ♻️ Add 'wrapper' designation to bento ampproject#34838 Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Delete init/constructor of `amp-soundcloud` No need to override `init` if no changes were made to it except calling parent class's `init`. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Use `passthroughNonEmpty` which only give `<slot>` for non empty `children` Since `passthrough` gives a `<slot>` reference to the children prop in all cases, let's make this passthroughNonEmpty -- which will only give a `<slot>` if there are children in the given markup. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Warning for required props when not present * ♻️ Warning for required pros when not present * ♻️ Warning for required props when not present * ♻️ `trackId` and `playlistId` order chek Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ `trackId` and `playlistId` order check Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Removed explicitly specify boolean `true` for conditional block No need to explicitly specify boolean `true` for conditional block. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ Added default value for `visual` prop in Preact component Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed props handled by AMP's layout system `height`, `heights`, `media`, `sizes`, and `width` are not needed to pass through as these attributes are specific to AMP's layout system and handled by the runtime. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed unnecessary typedef `height`, `heights`, `media`, `sizes`, and `width` are not needed to pass through as these attributes are specific to AMP's layout system and handled by the runtime. Thus they do not need to be specify in typedef. Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * 🚮 Removed interface as no API exposed * ♻️ Moved `converter.js` into storybook * 🚮 Removed `layout` from Preact example, ♻️ Added `height` into style * 🚮 Removed empty CSS and `hasCss` from `bundles.config.extensions.json` * 🐛 `htmlFor` import fix for test case, ♻️ added `data-trackid` attribute * ♻️ Replaced `<iframe>` with `<IframeEmbed>` * ♻️ Updated specification for validation * 🏗 Added `npm` to `bundles.config.extensions.json` Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com> * ♻️ New line at EOF in `validator-amp-soundcloud.out` * Added 'loadable' to indicate a resource intensive component * 🏗 Fixes reported by 'amp lint' for CI * 🏗 Fixes for aliased imports for CI Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR establishes
build-system/compile/bundles.config.extensions.jsonas the file to be utilized as the ground truth for all components which have a Bento version and what that version is, while configuring all current Bento components withoptions: { "wrapper": "bento" }. This change does not impact the bundling/build process.Notes:
options: {wrapper: "bento"}is a temporary state that is being introduced immediately for ease of reference by publishers wanting to use Bento components and easily identify which these are. It is preferred tobento: trueorbentoVersion: "1.0"because thewrapperpiece will be utilized by the auto-envelope effort (see below).options: {wrapper: wrappers.bento}once[WIP] Bento Auto-Envelope #30275🏗♻️ Bento Auto-Envelope #34820 is finalized.optionis made distinct from thenpm: trueoption because the set of Bento components is not equal to the set of components that publish to npm (though it is true that these heavily overlap.)