From 710c2942fa8bd589192d3b6f8d855e408824ac7a Mon Sep 17 00:00:00 2001 From: MinamiFunakoshiTR Date: Wed, 18 Jan 2023 11:46:10 -0600 Subject: [PATCH 1/2] hides bg from SR, adds alt text, updates docs --- src/components/@types/global.ts | 4 +-- .../Scroller/Embedded/Background.svelte | 6 ++--- .../Scroller/Embedded/Foreground.svelte | 14 +++++++++- src/components/Scroller/Foreground.svelte | 14 +++++++++- .../Scroller/Scroller.stories.svelte | 27 ++++++++++++++++--- src/components/Scroller/Scroller.svelte | 4 ++- src/components/Scroller/docProps.ts | 2 ++ .../Scroller/stories/docs/ai2svelte.md | 12 +++++++++ .../Scroller/stories/docs/component.md | 26 +++++++++++++----- .../Scroller/stories/docs/interactive.md | 26 +++++++++++++----- .../Scroller/stories/docs/quickit.md | 4 +++ 11 files changed, 116 insertions(+), 23 deletions(-) diff --git a/src/components/@types/global.ts b/src/components/@types/global.ts index 918a739f..e76ba307 100644 --- a/src/components/@types/global.ts +++ b/src/components/@types/global.ts @@ -5,11 +5,11 @@ import type { ComponentType } from 'svelte'; */ export type ContainerWidth = 'narrower' | 'narrow' | 'normal' | 'wide' | 'wider' | 'widest' | 'fluid'; - /** * A step in the Scroller component. */ export interface ScrollerStep { + altText: string; /** * A background component * @required @@ -19,7 +19,7 @@ export interface ScrollerStep { * Optional props for background component */ backgroundProps?: Object; - /** + /** * Foreground can either be a component or markdown-formatted string. * @required */ diff --git a/src/components/Scroller/Embedded/Background.svelte b/src/components/Scroller/Embedded/Background.svelte index f776f259..8081ba70 100644 --- a/src/components/Scroller/Embedded/Background.svelte +++ b/src/components/Scroller/Embedded/Background.svelte @@ -1,6 +1,6 @@ - -
+ + diff --git a/src/components/Scroller/docProps.ts b/src/components/Scroller/docProps.ts index e16fec25..aa8cba51 100644 --- a/src/components/Scroller/docProps.ts +++ b/src/components/Scroller/docProps.ts @@ -1,7 +1,7 @@ import type { ComponentType } from 'svelte'; interface BlockStep { - AltText: string; + AltText?: string; Background: string; Text: string; } diff --git a/src/components/Scroller/stories/docs/ai2svelte.md b/src/components/Scroller/stories/docs/ai2svelte.md index 5bead0e3..e7217632 100644 --- a/src/components/Scroller/stories/docs/ai2svelte.md +++ b/src/components/Scroller/stories/docs/ai2svelte.md @@ -52,19 +52,21 @@ Step1Text: #### Step 1 Lorem Ipsum :end AltText1: A map showing the Upper West side in New York City. +:end Step2Text: #### Step 2 Lorem Ipsum :end AltText2: The same map now highlights 98th Street. +:end Step3Text: #### Step 3 Lorem Ipsum :end AltText3: The same map now highlights three locations near 98th Street where something particulary important happened. - +:end ``` ```svelte diff --git a/src/components/Scroller/stories/docs/quickit.md b/src/components/Scroller/stories/docs/quickit.md index b6b02189..214ac5a7 100644 --- a/src/components/Scroller/stories/docs/quickit.md +++ b/src/components/Scroller/stories/docs/quickit.md @@ -37,12 +37,16 @@ StackBackground: true :end AltText: A map showing the Upper West side in New York City. + Can add paragraphs of alt text if you want to break up sentences. + :end + Background: AiMap2 Text: #### Step 2 Lorem ipsum :end AltText: The same map now highlights 98th Street. + :end Background: AiMap3 Text: #### Step 3 @@ -50,7 +54,7 @@ StackBackground: true Lorem ipsum :end AltText: The same map now highlights three locations near 98th Street where something particulary important happened. - + :end [] ```