diff --git a/changelog.d/1862-kit-sweep-chat-voice.md b/changelog.d/1862-kit-sweep-chat-voice.md new file mode 100644 index 0000000000..511c798fcb --- /dev/null +++ b/changelog.d/1862-kit-sweep-chat-voice.md @@ -0,0 +1,2 @@ +- The AI chat panel's and voice control's buttons and glyphs are now kit + controls (manjunath22466, samehkhamis, #1862). diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index 2dcedab29f..15d8223889 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -192,6 +192,23 @@ while a query is typed. The Filter button opens a disclosure and carries a `UiIcon` with `:size="null"`, so `layer-finder.css` still sizes them (`src/ui/kit/layerFinderControls.test.mjs` pins it); the search field's magnifier is `UiSearchField`'s own span. +The AI chat panel's and the voice control's buttons are ghost +`UiButton`s: the chat's Settings, quick prompts, attachment removes, +Attach layer, Attach a file, Expand conversation, command suggestions, +Expand chat, Add attachment and Send (a submit button that turns into +Stop reply), and the voice control's Open AI chat, Back to chat, Back to +voice, its Preview and Settings tabs and the error tray's DISMISS, beside +the tier button, the mic and the dock and minimize buttons, which already +were. The tier button and dock are pressed toggles; the mic is one only +while its owner has a state for it; the tabs keep `role="tab"` and +`aria-selected`. DISMISS is a text button, not a cross, so it is not a +`UiCloseButton`. The Settings and tab glyphs are `UiIcon`s with +`:size="null"`, so voice-cost.css and voice-card.css still size them +(`src/ui/kit/chatVoiceControls.test.mjs` pins it). The chat bubble, +globe, attach, send and stop, expand and Back glyphs stay inline SVG, +since no Material symbol the page loads draws them the same, and the +message box, file picker and inactivity minutes stay native fields, which +the kit has none of. The voice modules build no controls in script. The small surfaces' buttons are ghost `UiButton`s: the locale picker's button, the phone tab bar's tabs, the globe actions' Clear, Share, Reset and north-up compass, the imagery divider's handle, the scene sharing diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 7e53712e1d..16d082ebbe 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1351,6 +1351,7 @@ "src/ui/kit/welcomeControls.test.mjs", "src/ui/kit/omnibarControls.test.mjs", "src/ui/kit/storiesControls.test.mjs", + "src/ui/kit/chatVoiceControls.test.mjs", "src/ui/kit/cockpitControls.test.mjs", "src/ui/kit/smallSurfacesControls.test.mjs", "src/ui/kit/commandDockControls.test.mjs", diff --git a/src/ui/kit/chatVoiceControls.test.mjs b/src/ui/kit/chatVoiceControls.test.mjs new file mode 100644 index 0000000000..b1716157ca --- /dev/null +++ b/src/ui/kit/chatVoiceControls.test.mjs @@ -0,0 +1,150 @@ +// The AI chat panel's and the voice control's buttons and Material glyphs +// are the kit's: neither their templates nor the voice card and panel +// layout buttons they render hand-write a + @@ -76,7 +78,7 @@ const quickPrompts = () => [t('Fly to Tokyo'), t('Show live flights')];

{{ t('Explore with a question') }}

{{ t('Find a place, explore live data, or change your view.') }}

- + {{ prompt }}
{{ message.role === 'user' ? t('YOU') : ASSISTANT_NAME }}{{ message.text }} @@ -86,7 +88,7 @@ const quickPrompts = () => [t('Fly to Tokyo'), t('Show live flights')];

{{ props.view.chat.authNote }}

- + {{ item.name }} ×
@@ -95,27 +97,27 @@ const quickPrompts = () => [t('Fly to Tokyo'), t('Show live flights')]; - + {{ t('Attach layer') }}
- + {{ t('Attach a file') }}

{{ t('TXT, Markdown, CSV, JSON or GeoJSON · up to 10 KB in total. Attachments are sent to your AI provider with your message.') }}

{{ group.label }} - + {{ command }}
- - + + - +
diff --git a/src/ui/views/panels/VoiceControl.vue b/src/ui/views/panels/VoiceControl.vue index bcbce56b87..ba7c04907f 100644 --- a/src/ui/views/panels/VoiceControl.vue +++ b/src/ui/views/panels/VoiceControl.vue @@ -11,6 +11,7 @@ import PanelLayoutButtons from './PanelLayoutButtons.vue'; import UiButton from '../../kit/UiButton.vue'; import UiCheckbox from '../../kit/UiCheckbox.vue'; import UiCloseButton from '../../kit/UiCloseButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; import UiSelect from '../../kit/UiSelect.js'; // The voice control in the command dock, as its presenter @@ -79,7 +80,7 @@ const frameStyle = (panel) => ({ {{ view.mic.text }} - + {{ t('CHAT') }} @@ -94,12 +95,12 @@ const frameStyle = (panel) => ({
- - + {{ t('Back to chat') }} + {{ t('Back to voice') }} {{ t('VOICE') }}
- - + +
@@ -158,7 +159,7 @@ const frameStyle = (panel) => ({