Chips in the Packs code

Hi! In the code related to schema for Packs, what does the following phrase mean and why is it important?

“In the Coda doc this will be displayed as a chip.”

// Which of the properties defined above will be shown inside the chip.

primary: “daylight”,

Thank you -
from a super newbie.

Hi @SIMG_ADMIN - So when a Pack returns an object (a bundle of data) it is shown visually as a “chip”, with rounded corners. When you hover over the chip you can get a preview of all the information stored inside:

image

The text that shows inside the chip (before hover) comes from the object, and the primary field of the schema defines which of the properties of the schema to show there. For instance, in the Daylight example the value of the daylight property will be shown inside the chip.

2 Likes