Skip to content

Commit

Permalink
Feature/carousel (#6724)
Browse files Browse the repository at this point in the history
* Merge prototype branch (#6643)

* added sample

* Add serialization property

* sample update

* TBD property parsing working

* Parse CarouselPage object

* Code that adds containers

* added js

* [compilation fix]

* fixed issue

* Add todo list

* Fix extra spacing

* Show first element on start up

* implemented toDo items in toDo.md

* updated dot ui

* updated dot

* added a new scenario card

* Version not yet working

* Version almost working

* Hard code sample

* package changes

* Add more modifications that I saw on the interwebz

* fixed swiper

* Version where some stuff works but other stuff doesnt

* updated carousel render

* [update]

* Fix carousel

* Fix more stuff

* Version that works!! Yeah!!

* added walkaround for css loading issue

* added carousel cards to ui tests

* Fix more stuff

* Fix arrows to look better

* changed swiper properties from static class member variable to private member variable

* Fix static variables

* refactored

* fixed tab

* updated

Co-authored-by: nesalang <Joseph.Woo@microsoft.com>

* Initial design (#6644)

Co-authored-by: Paul Campbell (DEP) <paulcam@microsoft.com>

* Prototype clean up (#6651)

* Rename TBD to display

* Undo changes to site

* removed cns css from header.ejs and removed css from prototype 0 (#6653)

* Fix support for unsupported elements (#6654)

* Rename TBD to display

* Undo changes to site

* Rename unsupported elements list

* Fix parsing to handle nested items

* Upgrade sample

* Remove commented code

* Handle forbidden actions

* Update test to handle containers actions

* Add support for autoplay (#6665)

* Jwoo/feature/carousel 2 (#6673)

* updated for accessibility

* reverted Action.OpenURL changes

* [Carousel] Added Host Config options (#6675)

* updated for accessibility

* reverted Action.OpenURL changes

* added host config options

* fixed a11y tab index issue not being able to use space on pagination
bulltes

* Revert "fixed a11y tab index issue not being able to use space on pagination"

This reverts commit 16da572.

* fixed a11y tab index issue not being able to use space on pagination bullets (#6677)

* updated for accessibility

* reverted Action.OpenURL changes

* added host config options

* fixed a11y tab index issue not being able to use space on pagination
bulltes

* updated it

* clean-up

* Fix pause autoplay on hover (#6671)

* Fix pause autoplay on hover

* Fix build break

* Fix package.json files (#6678)

* Add unit test for carousel page

* Remove swiper from root level import

* Add swiper as dev dependency

* Added carousel page id (#6690)

* added carousel page id upon action invocation

* review comments addressed

* [JS] Carousel schema changes (#6667)

* [JS] Carousel schema changes

* Pass `forbiddenTypes` instead of the empty set during fallback

* Remove `getPage[At|Count]()` as they conflict with mandatory `getItem[At|Count]()`

* [Styling] Update swiper style (#6664)

* Rename TBD to display

* Undo changes to site

* Rename unsupported elements list

* Fix parsing to handle nested items

* Upgrade sample

* Remove commented code

* Handle forbidden actions

* Update test to handle containers actions

* Improve css styles to have a better control

* Remove changes made to designer

* Fix cards not showing up

* Fix merge

* Fix css again

* Remove important flags

* Fix issue where keyboard navigation goes to other cards

* Fix sample

* Add semicolon

* Fix addeventlisteners and focus not firing (#6704)

* [JS] Pin newer jest dependency for `adaptivecards` (#6702)

Just a minor oversight - the version of `jest` I saw recommended to fix our problems consuming the `swiper` module ended
up being a pre-release version. `jest@^27` has since had a full release, so I just wanted to make sure we were requiring
it specifically. For what it's worth, we weren't actually *using* the prerelease version see
[here](https://github.com/microsoft/AdaptiveCards/blob/2c3f8530556213a1a1f5ed742b62c28f24a4c24d/source/nodejs/adaptivecards/package-lock.json#L4485-L4486),
but all the same it's better to declare our dependency against full-fledged release.

* Jwoo/feature/remove properties (#6706)

* updatred supported properties for Carousel & CarouselPages

* updated spacing in sample

* Updated package-lock.json after rebase

* Fix CSS story for now

* UI Tests for carousel (#6707)

* Update Tests for timer vs no timer

* Fix autoplay being instantiated without being required

* Fixes and some ui tests

* Fix another json file and add working tests

* Fix autoplay issue

* Add more tests

* Format json

* Fix PR comments

* Fix carousel again and fix test

* Refactor some code

* Add timeout (#6718)

* Carousel spec (#6698)

* Changed teams target version to 1.4

* fixed blog link to point to proper release

* Added horizontal carousel spec

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* Fix minor Css changes for carousel (#6722)

* Pull css changes to ui test app

* Make cards in carousel use as much space as possible

* [JS][Carousel] Fixed sudden jump of carousel page when focused (#6720)

* Updated RTL support for Carousel (#6723)

* [JS][Carousel] Fixed sudden jump of carousel page when focused

* [JS][Carousel] Updated RTL

* added a minor changes

* [JS][Carousel] Made RTL workw with navigation css changes

* change per review comments

* Revert "change per review comments"

This reverts commit 3ad698b.

* clean change commit

* [JS][Carousel] Updated SubmitAction (#6728)

* [JS][Carousel] Updated SubmitAction

* review coment

* updated hostconfig json

* Fix PR comments (#6727)

Co-authored-by: nesalang <Joseph.Woo@microsoft.com>

* [JS] Change how we produce/consume CSS (#6732)

* [JS] Change how we produce/consume CSS

See #6710 -- this is a partial solution

* Fix indenting

* Back out case-insensitivity in regex

* Remove `sass-loader` dependency

* Fixes for `adaptivecards-ui-testapp`

* Fix quoting on `generate-css` script

Fix build break on Windows?

* Fix up `adaptivecards-designer-app`

* Fix up `adaptivecards-react`

* Fix `webpack.config.js` formatting

Co-authored-by: nesalang <Joseph.Woo@microsoft.com>
Co-authored-by: Paul Campbell (DEP) <paulcam@microsoft.com>
Co-authored-by: J.P. Roca <jproca@microsoft.com>
  • Loading branch information
4 people committed Nov 13, 2021
1 parent 554455b commit 65de1ad
Show file tree
Hide file tree
Showing 78 changed files with 12,233 additions and 9,910 deletions.
464 changes: 464 additions & 0 deletions samples/v1.6/Elements/Carousel.ScenarioCards.Timer.json

Large diffs are not rendered by default.

463 changes: 463 additions & 0 deletions samples/v1.6/Elements/Carousel.ScenarioCards.json

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions samples/v1.6/Elements/Carousel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"body": {
"type": "Carousel",
"timer": 5000,
"pages": [
{
"type": "CarouselPage",
"id": "firstCarouselPage",
"selectAction": {
"type": "Action.OpenUrl",
"title": "Click for more information about the first carousel page!",
"url": "https://adaptivecards.io/"
},
"items": [
{
"type": "Image",
"url": "https://adaptivecards.io/content/cats/1.png",
"size": "medium"
}
]
},
{
"type": "CarouselPage",
"id": "theSecondCarouselPage",
"items": [
{
"type": "Image",
"url": "https://adaptivecards.io/content/cats/2.png",
"size": "medium"
}
]
},
{
"type": "CarouselPage",
"id": "last-carousel-page",
"items": [
{
"type": "Image",
"url": "https://adaptivecards.io/content/cats/3.png",
"altText": "That's a cool cat!",
"size": "medium"
}
]
}
]
},
"actions": [
{
"type": "Action.OpenUrl",
"title": "See more",
"url": "https://adaptivecards.io"
},
{
"type": "Action.OpenUrl",
"title": "Another action",
"url": "https://adaptivecards.io"
}
]
}
202 changes: 202 additions & 0 deletions samples/v1.6/Tests/Carousel.ForbiddenActions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"body": {
"type": "Carousel",
"pages": [
{
"type": "CarouselPage",
"id": "firstCarouselPage",
"items": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "There should be no actions rendered below",
"wrap": true,
"id": "id1"
}
]
}
]
},
{
"type": "CarouselPage",
"id": "secondCarouselPage",
"items": [
{
"type": "RichTextBlock",
"inlines": [
"No action should be rendered here ",
{
"type": "TextRun",
"text": "this is a showcard action,",
"selectAction": {
"type": "Action.ShowCard",
"title": "Action.ShowCard",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "What do you think?"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Neat!"
}
]
}
}
},
{
"type": "TextRun",
"text": " and this is a toggle visibility action. ",
"selectAction": {
"type": "Action.ToggleVisibility",
"title": "Show!",
"targetElements": [
"id1"
]
}
}
]
}
]
},
{
"type": "CarouselPage",
"id": "thirdCarouselPage",
"items": [
{
"type": "TextBlock",
"wrap": true,
"text": "This card has Containers & Columns with SelectActions that should not be honoured"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"wrap": true,
"text": "This is a container with ShowCard action"
}
],
"selectAction": {
"type": "Action.ShowCard",
"title": "Action.ShowCard",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "What do you think?"
}
]
}
}
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"wrap": true,
"text": "This is a container with ToggleVisibility action"
}
],
"selectAction": {
"type": "Action.ToggleVisibility",
"title": "Show!",
"targetElements": [
"id1"
]
}
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"wrap": true,
"text": "This is a container with ShowCard action"
}
],
"selectAction": {
"type": "Action.ShowCard",
"title": "Action.ShowCard",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "What do you think?"
}
]
}
}
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"wrap": true,
"text": "This is a container with ToggleVisibility action"
}
],
"selectAction": {
"type": "Action.ToggleVisibility",
"title": "Show!",
"targetElements": [
"id1"
]
}
}
]
}
]
}
]
},
"actions": [
{
"type": "Action.ShowCard",
"title": "Action.ShowCard",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "What do you think?"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Neat!"
}
]
}
},
{
"type": "Action.ToggleVisibility",
"title": "Action.ToggleVisibility",
"targetElements": [
"id1"
]
}
]
}
95 changes: 95 additions & 0 deletions samples/v1.6/Tests/Carousel.ForbiddenElements.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"body": {
"type": "Carousel",
"pages": [
{
"type": "CarouselPage",
"id": "firstCarouselPage",
"items": [
{
"type": "TextBlock",
"text": "List of forbidden items, no elements should be shown below besides TextBlock",
"wrap": true
},
{
"type": "TextBlock",
"text": "Input.Text"
},
{
"type": "Input.Text",
"id": "id1"
},
{
"type": "TextBlock",
"text": "Input.Number"
},
{
"type": "Input.Number",
"id": "id2"
},
{
"type": "TextBlock",
"text": "Input.ChoiceSet"
},
{
"type": "Input.ChoiceSet",
"id": "id3",
"choices": [
{
"title": "Red",
"value": "1"
},
{
"title": "Green",
"value": "2"
}
]
},
{
"type": "TextBlock",
"text": "Input.Date"
},
{
"type": "Input.Date",
"id": "id4"
},
{
"type": "TextBlock",
"text": "Input.Toggle"
},
{
"type": "Input.Toggle",
"id": "id5",
"title": "I accept the terms and agreements"
},
{
"type": "TextBlock",
"text": "Input.Time"
},
{
"type": "Input.Time",
"id": "id6"
},
{
"type": "TextBlock",
"text": "Media"
},
{
"type": "Media",
"poster": "https://adaptivecards.io/content/poster-video.png",
"id": "id7",
"sources": [
{
"mimeType": "video/mp4",
"url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4"
}
]
}
]
}
]
}
}
Loading

0 comments on commit 65de1ad

Please sign in to comment.