Feature/SSD-811-ta-select#343
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds TA Select documentation and interactive previews (plus a Callout preview asset) to support SSD-811.
Changes:
- Added standalone HTML/CSS/JS preview assets for the Select component.
- Added a Select docs page with tabs for Preview/Code/CSS/JS.
- Added standalone HTML/CSS preview assets for the Callout component.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/docs/public/assets/ta-preview/select/ta-select-preview.html | New iframe preview page demonstrating Select variants/states. |
| apps/docs/public/assets/ta-preview/select/select.js | New JS behavior for the custom Select (open/close, pick option). |
| apps/docs/public/assets/ta-preview/select/select.css | New styling for Select variants (outline/ghost), sizes, disabled states. |
| apps/docs/public/assets/ta-preview/callout/ta-callout-preview.html | New iframe preview page demonstrating Callout variants/layouts. |
| apps/docs/public/assets/ta-preview/callout/callout.css | New styling for Callout variants and layout. |
| apps/docs/content/docs/develop/(transistory-assistance)/ta-select.mdx | New docs content with tabbed preview and embedded code samples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button type="button" class="select-trigger" label="Fruit"> | ||
| <span class="select-name">Fruit</span> | ||
| <span class="select-value">Select</span> | ||
| <svg width="2o" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> |
There was a problem hiding this comment.
The SVG width attribute has a typo (2o), which is not a valid numeric value and may break sizing in some browsers. Change it to 20.
| <svg width="2o" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> | |
| <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> |
| <button type="button" class="select-trigger" label="Fruit"> | ||
| <span class="select-name">Fruit</span> | ||
| <span class="select-value">Select</span> | ||
| <svg width="2o" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> |
There was a problem hiding this comment.
The docs code sample includes the same SVG width typo (2o). Update it to 20 so the documentation matches valid HTML.
| <svg width="2o" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> | |
| <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-txt-black-900 size-4" aria-hidden="true"> |
| <label class="select-label">Variant Outline</label> | ||
| <div class="custom-select select-small"> | ||
| <button type="button" class="select-trigger" label="Fruit"> |
There was a problem hiding this comment.
The <label> is not programmatically associated with the control, and the label attribute on <button> is not a valid accessible labeling mechanism. Prefer either: (1) give the button an id and set the label’s for, or (2) use aria-labelledby to reference the label element, or (3) use aria-label if there’s no visible label.
| <div class="select-option disabled" data-value="apple" disabled>Apple</div> | ||
| <div class="select-option" data-value="banana">Banana</div> | ||
| <div class="select-option disabled" data-value="blueberry" disabled>Blueberry</div> |
There was a problem hiding this comment.
The disabled attribute is invalid on <div> elements, so assistive tech won’t reliably recognize these options as disabled. Use aria-disabled=\"true\" (and keep the .disabled class / pointer-events: none styling), and ensure the JS prevents selection of aria-disabled options if click events can still reach them in other implementations.
| <div class="select-option disabled" data-value="apple" disabled>Apple</div> | |
| <div class="select-option" data-value="banana">Banana</div> | |
| <div class="select-option disabled" data-value="blueberry" disabled>Blueberry</div> | |
| <div class="select-option disabled" data-value="apple" aria-disabled="true">Apple</div> | |
| <div class="select-option" data-value="banana">Banana</div> | |
| <div class="select-option disabled" data-value="blueberry" aria-disabled="true">Blueberry</div> |
| .select-ghost:focus { | ||
| background-color: #ffffff; | ||
| border-color: #2563eb; | ||
| } | ||
|
|
||
| .dark .select-ghost:focus { |
There was a problem hiding this comment.
.select-ghost appears to be a container element (likely a <div>), so :focus will never match during keyboard focus (focus is on the button). Move these focus styles to the actual focus target (e.g., .select-ghost .select-trigger:focus) or use :focus-within on the container.
| .select-ghost:focus { | |
| background-color: #ffffff; | |
| border-color: #2563eb; | |
| } | |
| .dark .select-ghost:focus { | |
| .select-ghost:focus-within { | |
| background-color: #ffffff; | |
| border-color: #2563eb; | |
| } | |
| .dark .select-ghost:focus-within { |
| --- | ||
| import { Tab, Tabs } from "fumadocs-ui/components/tabs"; | ||
| import IframeThemePreview from "@/components/iframe-theme-preview"; | ||
|
|
There was a problem hiding this comment.
The docs code fences are labeled tsx but the content is HTML/CSS/JS. Consider switching the fence languages to html, css, and js for accurate syntax highlighting and to avoid confusing readers.
| const trigger = select.querySelector('.select-trigger'); | ||
| const dropdown = select.querySelector('.select-dropdown'); |
There was a problem hiding this comment.
The embedded JS example doesn’t match apps/docs/public/assets/ta-preview/select/select.js: the real file has dropdown and value commented out. Update the MDX snippet (or the JS file) so the docs reflect the actual implementation.
| options.forEach(option => { | ||
| option.addEventListener('click', function (e) { | ||
| e.stopPropagation(); | ||
| const value = this.dataset.value; |
There was a problem hiding this comment.
The embedded JS example doesn’t match apps/docs/public/assets/ta-preview/select/select.js: the real file has dropdown and value commented out. Update the MDX snippet (or the JS file) so the docs reflect the actual implementation.
| window.addEventListener("message", (event) => { | ||
| if (event.origin !== window.origin) return; | ||
| if (event.data?.theme) { | ||
| document.documentElement.className = event.data.theme; | ||
| console.log("Theme applied inside iframe:", event.data.theme); |
There was a problem hiding this comment.
This console.log will produce noise for anyone viewing the preview in devtools. Consider removing it or gating it behind a debug flag.
| window.addEventListener("message", (event) => { | |
| if (event.origin !== window.origin) return; | |
| if (event.data?.theme) { | |
| document.documentElement.className = event.data.theme; | |
| console.log("Theme applied inside iframe:", event.data.theme); | |
| const DEBUG_THEME_MESSAGES = false; | |
| window.addEventListener("message", (event) => { | |
| if (event.origin !== window.origin) return; | |
| if (event.data?.theme) { | |
| document.documentElement.className = event.data.theme; | |
| if (DEBUG_THEME_MESSAGES) { | |
| console.log("Theme applied inside iframe:", event.data.theme); | |
| } |
| if (event.origin !== window.origin) return; | ||
| if (event.data?.theme) { | ||
| document.documentElement.className = event.data.theme; | ||
| console.log("Theme applied inside iframe:", event.data.theme); |
There was a problem hiding this comment.
This console.log will produce noise for anyone viewing the preview in devtools. Consider removing it or gating it behind a debug flag.
| console.log("Theme applied inside iframe:", event.data.theme); |
Summarise the feature
Issue ticket # SSD-811

Description:
TA Select Component
Type of change
Affected endpoints
/?
Checklist