Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create elevation page #4222

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/ninety-avocados-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/design-tokens": minor
"@twilio-paste/core": minor
---

[Design Tokens] Update aliases and add new tokens for elevation foundations
6 changes: 6 additions & 0 deletions .changeset/selfish-bottles-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/in-page-navigation": minor
"@twilio-paste/core": minor
---

[InPageNavigation] modified vertical items to wrap text as opposed to using ellipses
6 changes: 6 additions & 0 deletions .changeset/tough-moles-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/ai-chat-log": minor
"@twilio-paste/core": minor
---

[AI Chat Log] added optional typewriter animation to AIChatMessageBody
3 changes: 0 additions & 3 deletions .github/workflows/on_pull_request_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
# List of all teams for dsys
team: "[Design Systems PD,design-systems,Design Systems Eng,Design Systems Eng Leads]"

- name: Debug in group
run: echo "${{ github.actor }} is team member ${{ steps.teamAffiliation.outputs.isTeamMember }}"

- name: Auto contribution labeler
if: ${{ steps.teamAffiliation.outputs.isTeamMember == 'false' }}
uses: actions/labeler@v5
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"db:reset": "yarn supabase db reset"
},
"devDependencies": {
"supabase": "^1.204.3"
"supabase": "^2.6.8"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create extension if not exists "vector" with schema "public" version '0.5.0';
create extension if not exists "vector" with schema "public";

create sequence "public"."page_id_seq";

Expand Down
136 changes: 130 additions & 6 deletions apps/backend/supabase/schema.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,19 @@ export type Database = {
[_ in never]: never
}
Functions: {
binary_quantize:
| {
Args: {
"": string
}
Returns: unknown
}
| {
Args: {
"": unknown
}
Returns: unknown
}
get_page_parents: {
Args: {
page_id: number
Expand All @@ -236,18 +249,104 @@ export type Database = {
meta: Json
}[]
}
halfvec_avg: {
Args: {
"": number[]
}
Returns: unknown
}
halfvec_out: {
Args: {
"": unknown
}
Returns: unknown
}
halfvec_send: {
Args: {
"": unknown
}
Returns: string
}
halfvec_typmod_in: {
Args: {
"": unknown[]
}
Returns: number
}
hnsw_bit_support: {
Args: {
"": unknown
}
Returns: unknown
}
hnsw_halfvec_support: {
Args: {
"": unknown
}
Returns: unknown
}
hnsw_sparsevec_support: {
Args: {
"": unknown
}
Returns: unknown
}
hnswhandler: {
Args: {
"": unknown
}
Returns: unknown
}
ivfflat_bit_support: {
Args: {
"": unknown
}
Returns: unknown
}
ivfflat_halfvec_support: {
Args: {
"": unknown
}
Returns: unknown
}
ivfflathandler: {
Args: {
"": unknown
}
Returns: unknown
}
l2_norm:
| {
Args: {
"": unknown
}
Returns: number
}
| {
Args: {
"": unknown
}
Returns: number
}
l2_normalize:
| {
Args: {
"": string
}
Returns: string
}
| {
Args: {
"": unknown
}
Returns: unknown
}
| {
Args: {
"": unknown
}
Returns: unknown
}
match_discussions: {
Args: {
embedding: string
Expand Down Expand Up @@ -320,6 +419,24 @@ export type Database = {
count: number
}[]
}
sparsevec_out: {
Args: {
"": unknown
}
Returns: unknown
}
sparsevec_send: {
Args: {
"": unknown
}
Returns: string
}
sparsevec_typmod_in: {
Args: {
"": unknown[]
}
Returns: number
}
upsert_story_and_create_story_render: {
Args: {
_storybook_id: string
Expand All @@ -338,12 +455,19 @@ export type Database = {
}
Returns: string
}
vector_dims: {
Args: {
"": string
}
Returns: number
}
vector_dims:
| {
Args: {
"": string
}
Returns: number
}
| {
Args: {
"": unknown
}
Returns: number
}
vector_norm: {
Args: {
"": string
Expand Down
9 changes: 5 additions & 4 deletions cypress/integration/sitemap-vrt/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ export const SITEMAP = [
"/components/input/",
"/components/input/api",
"/components/input/changelog",
"components/keyboard-key",
"components/keyboard-key/api",
"components/keyboard-key/changelog",
"/components/keyboard-key",
"/components/keyboard-key/api",
"/components/keyboard-key/changelog",
"/components/label/",
"/components/label/api",
"/components/label/changelog",
Expand Down Expand Up @@ -281,6 +281,7 @@ export const SITEMAP = [
"/foundations/content/content-checklist/",
"/foundations/content/voice-and-tone/",
"/foundations/content/word-list/",
"/foundations/elevation/",
"/foundations/illustrations/",
"/foundations/data-visualization/",
"/foundations/spacing-and-layout/",
Expand Down Expand Up @@ -340,7 +341,7 @@ export const SITEMAP = [
"/tokens/",
];

const SITEMAP_CHUNKS: string[][] = [];
const SITEMAP_CHUNKS = [];
const CHUNK_SIZE = 25;

for (let i = 0, len = SITEMAP.length; i < len; i += CHUNK_SIZE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { HTMLPasteProps } from "@twilio-paste/types";
import * as React from "react";

import { AIMessageContext } from "./AIMessageContext";
import { useAnimatedText } from "./utils";

const Sizes: Record<string, BoxStyleProps> = {
default: {
Expand Down Expand Up @@ -35,11 +36,59 @@ export interface AIChatMessageBodyProps extends HTMLPasteProps<"div"> {
* @memberof AIChatMessageBodyProps
*/
size?: "default" | "fullScreen";
/**
* Whether the text should be animated with type writer effect
*
* @default false
* @type {boolean}
* @memberof AIChatMessageBodyProps
*/
animated?: boolean;
/**
* A callback when the animation is started
*
* @default false
* @type {() => void}
* @memberof AIChatMessageBodyProps
*/
onAnimationStart?: () => void;
/**
* A callback when the animation is complete
*
* @default false
* @type {() => void}
* @memberof AIChatMessageBodyProps
*/
onAnimationEnd?: () => void;
}

export const AIChatMessageBody = React.forwardRef<HTMLDivElement, AIChatMessageBodyProps>(
({ children, size = "default", element = "AI_CHAT_MESSAGE_BODY", ...props }, ref) => {
(
{
children,
size = "default",
element = "AI_CHAT_MESSAGE_BODY",
animated = false,
onAnimationEnd,
onAnimationStart,
...props
},
ref,
) => {
const { id } = React.useContext(AIMessageContext);
const [showAnimation] = React.useState(animated && children !== undefined);
const animationSpeed = size === "fullScreen" ? 8 : 10;
const { animatedChildren, isAnimating } = useAnimatedText(children, animationSpeed, showAnimation);

React.useEffect(() => {
if (onAnimationStart && animated && isAnimating) {
onAnimationStart();
}

if (animated && !isAnimating && onAnimationEnd) {
onAnimationEnd();
}
}, [isAnimating, showAnimation]);

return (
<Box
Expand All @@ -55,7 +104,7 @@ export const AIChatMessageBody = React.forwardRef<HTMLDivElement, AIChatMessageB
whiteSpace="pre-wrap"
id={id}
>
{children}
{animatedChildren}
</Box>
);
},
Expand Down
Loading