Skip to content

Commit

Permalink
Updating readmes for the blocks that haven't been published because o…
Browse files Browse the repository at this point in the history
…f this bug.
  • Loading branch information
vgalatro committed Jan 25, 2024
1 parent 5e8a54e commit 721654d
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 21 deletions.
1 change: 1 addition & 0 deletions blocks/algolia-assortment-content-source-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The Algolia assortment content source block allows you to display products from

## ANS Schema


not applicable

## Configurable Params
Expand Down
42 changes: 25 additions & 17 deletions blocks/article-body-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,28 +273,36 @@ Article Body Block - Used to render a Composer article via Global Content

When the content of an article-body contains a gallery component, the Gallery will emit events for when the next or previous image is viewed.
These events are named `galleryImageNext` and `galleryImagePrevious` respectively.
<br /><br />


If you want to listen to these events, the first thing is to import the EventEmitter object
into your code:<br /><br />
into your code:

`import { EventEmitter } from '@wpmedia/arc-themes-components'`
<br /><br />


Then create a callback function such as:
<br /><br />
`const myGalleryImageNext = (event) => {console.log('Here is the event: ', event);}`<br />


`const myGalleryImageNext = (event) => {console.log('Here is the event: ', event);}`

`const myGalleryImagePrevious = (event) => {console.log('Here is the event: ', event);}`
<br /><br />


Then use you use your callback in subscribing to the event:
<br /><br />


`EventEmitter.subscribe('galleryImageNext', (event) => myGalleryImageNext(event));`
`EventEmitter.subscribe('galleryImagePrevious', (event) => myGalleryImagePrevious(event));`
<br /><br />


The event object for these events will contain the following information:
<br /><br />
**eventName (String):** The event name fired. In this case could be either `galleryImageNext` or `galleryImagePrevious`.<br />
**ansGalleryId (String):** The id of the gallery.<br />
**ansGalleryHeadline (String):** The headline for the gallery.<br />
**ansImageId (String):** The id for the current image.<br />
**caption (String):** The caption for the current image.<br />
**orderPosition (Number):** The position in the carousel for the current image.<br />
**totalImages (Number):** Total number of images in the carousel.<br />
**autoplay (boolean):** whether or not the event triggered during autoplay. Value is either `true` or `false`.<br />

**eventName (String):** The event name fired. In this case could be either `galleryImageNext` or `galleryImagePrevious`.
**ansGalleryId (String):** The id of the gallery.
**ansGalleryHeadline (String):** The headline for the gallery.
**ansImageId (String):** The id for the current image.
**caption (String):** The caption for the current image.
**orderPosition (Number):** The position in the carousel for the current image.
**totalImages (Number):** Total number of images in the carousel.
**autoplay (boolean):** whether or not the event triggered during autoplay. Value is either `true` or `false`.
4 changes: 2 additions & 2 deletions blocks/card-list-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Displays a list of stories where the first story is depicted as a card.
- It expects the user to configure its content source. The list of content source options will be those with an `ans-feed` schema.
- The feature displays a card list with a custom title. The main story will have an overline, image, headline, byline block and publish date. Each story in the list will have a headline, and a smaller image.
- Makes use of ByLine to display authors of each story and ArticleDate to display the article's published date. These are included as dependencies.
- If there's one author, it will return `By <author>`
- If there is one author, it will return `By <author>`
- If there are two authors, it will return `By <author_0> and <author_1>`
- If there are three or more authors, it will return with the pattern `By <author_0>, <author_1>, ... <author_(n-1)> and <author_(n)>`

Expand All @@ -28,4 +28,4 @@ The block relies on an ANS Data in the Feed format with the following fields:
- `content_elements[x].websites[arcSite].website_url`
- `content_elements[0].credits.by` Check for multiple authors in first article
- `content_elements[0].websites[arcSite]` Uses `website_url`
- `content_elements[0].headlines.basic`
- `content_elements[0].headlines.basic`
1 change: 1 addition & 0 deletions blocks/header-nav-chain-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This block is intended to be used as the header navigation chain block.


## Props

| **Prop** | **Required** | **Type** | **Description** |
Expand Down
1 change: 1 addition & 0 deletions blocks/hero-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ contexts should provide the clarity to the message that is being conveyed.

## Events


- @wpmedia/hero-block currently emits no events.

### Event Listening
Expand Down
1 change: 0 additions & 1 deletion blocks/product-assortment-carousel-block/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# @wpmedia/product-assortment-carousel-block

A carousel block to display product assortments (rules) from Algolia.

The block is dependent on the PageBuilder Product Assortment integration to enable selecting the assortment to display within the block.

## Props
Expand Down
1 change: 1 addition & 0 deletions blocks/quilted-image-block/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# @wpmedia/quilted-image-block


The Quilted Image block is a collection of three images, each with a text and button overlay. In a mobile viewport all three images will display above one another. On a larger viewport, the top or bottom image will become full width with the other two images stacked horizontally adjacent to it.

Note: The block will only render an item if there's an overlay, image url, action url, and button text.
1 change: 1 addition & 0 deletions blocks/single-column-layout-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ This block does not emit any events.

## Additional Considerations


No additional considerations.
1 change: 1 addition & 0 deletions blocks/story-carousel-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ A ANS feed enabled carousel block.

## ANS Schema


Outline any schema information requirements necessary to know for ths block

### ANS Fields
Expand Down
4 changes: 3 additions & 1 deletion blocks/subscriptions-block/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# `@wpmedia/subscriptions-block`
# `@wpmedia/subscriptions-block`

Blocks to integrate Arc Subscriptions into Themes.
1 change: 1 addition & 0 deletions blocks/top-table-list-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

A list block that enables the display of ANS content in a range of promo configurations.


## ANS Schema

Detail the data structure returned from this content source
Expand Down

0 comments on commit 721654d

Please sign in to comment.