Determines which item to highlight within the list and what information to display to user about this item.
The original results are first filtered and ordered using the filter-by and order-by keys. The top result after that is selected as the highlighted item. If the item was already selected by a previous highlight, the next result in the filtered and/or sorted list is selected.
When iterating through the items in the list, the value of that item is assigned to the key binding passed to select, such as select (pick), where pick is the key binding. To access that item's current value within the select block, you need to reference the key binding that was passed.
highlights {
select (pick) {
order-by {
sorting (pick.firstName)
}
label (Top Pick) //required
macro (test) {
param (param1) {
expression (pick)
}
}
}
} highlights {
select (pick) {
summary {
macro (MOVIE_GENRE_HIGHLIGHT_SPOKEN_SUMMARY) {
param (movieGenre) {
expression (pick)
}
}
}
label {
macro (MOVIE_GENRE_HIGHLIGHT_LABEL_TODAY)
}
macro (MOVIE_GENRE_SUMMARY) {
param (genre) {
expression (pick)
}
}
// Distribute the 8 genres that can appeal to general audiences across different days
filter-by (exists(now().date.day) && now().date.day % 8 == 0 ? pick == 'Mystery' : now().date.day % 8 == 1 ? pick == 'Adventure' : now().date.day % 8 == 2 ? pick == 'Action' : now().date.day % 8 == 3 ? pick == 'Fantasy' : now().date.day % 8 == 4 ? pick == 'ScienceFiction' : now().date.day % 8 == 5 ? pick == 'Comedy' : now().date.day % 8 == 6 ? pick == 'Documentary' : pick == 'Music')
}
}
}
}
conversation-drivers {
conversation-driver {
macro (PLAY_GENRE_QUIZ_CONVO_DRIVER)
}
}
}| title-area required | Layout container to hold a title area, which can contain title text and other detailed text |
| cell-area optional | A cell-area defines a cell within a layout, with no background or border (which is partially what differentiates it from a cell-card) |
| cell-card optional | A cell defined as a card |
| compound-card optional | A card that can contain other Views components, such as another card, text, images, hbox containers, or title-areas |
| image-card optional | A card that uses a rich image as the background of the card, alongside information that can be placed in three slots |
| filter-by optional | Determines the filtering method of the items in a list |
| label optional | Dialog enables you to communicate to users of your capsule, such as asking questions, providing status, or paraphrasing results |
| layout-macro optional | Defines a layout or a portion of a layout with a macro |
| layout-match optional | This key is deprecated |
| macro optional | Defines a layout, a portion of a layout, or a dialog with a macro |
| order-by optional | Determines the ordering of the items in a list |
| summary optional | Summarizes the current item in a selected highlight when in hands-free mode |
| map-card optional | A card that displays a summary of a location on a static map |
| paragraph optional | Paragraph of text, providing a summary of information for the user |
| single-line optional | Content that spans a single line |
| thumbnail-area optional | A layout container that displays an image in a smaller format, as well as additional information within a title-area |
| thumbnail-card optional | A card that displays an image in a smaller format, as well as additional information within a title-area |
| title-card optional | A card that primarily shows text in three slots |