Commit Graph

21 Commits

Author SHA1 Message Date
Aaron Powell
a1da290d10 Refactor code for consistency and readability
- Standardized string quotes to double quotes across multiple files.
- Improved formatting and indentation for better readability.
- Added a function to format multiline text in tools rendering.
- Enhanced dropdown and action button handlers for better event management.
- Updated the theme application logic to initialize on page load.
- Refactored utility functions for consistency and clarity.
- Improved error handling and user feedback in download and share functionalities.
2026-02-02 16:42:22 +11:00
copilot-swe-agent[bot]
9e44173f94 Improve comment clarity for string escaping fix
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
2026-02-02 05:07:06 +00:00
copilot-swe-agent[bot]
fb5f22a6b2 fix(website): properly escape backslashes and quotes in file paths
The previous implementation only escaped single quotes, which could allow
backslashes in file paths to break out of the JavaScript string context.
Now we escape backslashes first (\ -> \\), then single quotes (' -> \'),
preventing potential security issues.

Fixes CodeQL alert #26 for incomplete string escaping.

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
2026-02-02 05:05:42 +00:00
Aaron Powell
611474f980 fix(website): resolve TypeScript errors in samples.ts
- Remove SearchableRecipe interface that conflicted with SearchableItem
- Use proper type casting for search results
- Fix FuzzySearch generic type usage
2026-02-02 15:42:34 +11:00
Aaron Powell
9eab4ec6e7 fix(website): use Choices.js wrapper for samples tag filter
Use the same createChoices/getChoicesValues helpers as other pages
for consistent multi-select behavior.
2026-02-02 15:14:45 +11:00
Aaron Powell
b8d93a0344 feat(website): add samples/cookbook page with recipe browser
Integrates the cookbook/ folder into the website's Samples page:

Data Structure:
- Add cookbook/cookbook.yml manifest defining cookbooks and recipes
- Add .schemas/cookbook.schema.json for validation
- Add COOKBOOK_DIR constant to eng/constants.mjs

Build Integration:
- Add generateSamplesData() to generate samples.json from cookbook.yml
- Include recipe variants with file paths for each language
- Add samples count to manifest.json

Website UI:
- Create samples.ts with FuzzySearch, language/tag filtering
- Replace placeholder samples.astro with functional recipe browser
- Recipe cards with language indicators and action buttons
- Language tabs for switching between implementations
- View Recipe/View Example buttons open modal
- GitHub link for each recipe

Features:
- Search recipes by name/description
- Filter by programming language (Node.js, Python, .NET, Go)
- Filter by tags (multi-select with Choices.js)
- 5 recipes across 4 languages = 20 recipe variants
2026-02-02 15:11:12 +11:00
Aaron Powell
94a395dbe0 feat(website): add comprehensive accessibility improvements
Phase 1 - Screen Reader Critical:
- Add aria-label to main navigation
- Add accessible names to icon-only buttons (GitHub, theme toggle, close)
- Add aria-hidden to decorative SVGs and emoji icons
- Add role=dialog, aria-modal, aria-labelledby to modal
- Add skip link with visible focus state

Phase 2 - Keyboard Navigation:
- Implement focus trap in modal (Tab/Shift+Tab cycles)
- Return focus to trigger element on modal close
- Replace outline:none with visible focus rings
- Add keyboard navigation to install dropdown (arrows, escape)
- Add aria-expanded to dropdown toggles

Phase 3 - Dynamic Content:
- Add aria-live=polite to results counts and loading states
- Add role=listbox to search results
- Add role=list to resource lists
- Add role=menu/menuitem to dropdown menus

Phase 4 - Forms & Labels:
- Add .sr-only utility class for screen reader text
- Add visually hidden labels to all search inputs
- Add aria-label to filter dropdowns

Files modified:
- BaseLayout.astro, Modal.astro (ARIA attributes)
- modal.ts (focus trap, keyboard navigation)
- global.css (sr-only, skip-link, focus styles)
- All page files (labels, live regions, roles)
2026-02-02 11:52:31 +11:00
Aaron Powell
e3894a0b1b Merge resource counts into home page cards
- Remove separate hero-stats section
- Add card-count element to each resource card
- Update JS to populate counts from manifest
- Add card-with-count CSS for layout with count badge
- Reduces vertical space on home page
2026-02-02 10:09:36 +11:00
Aaron Powell
c8d342cc62 Add tools catalog with YAML schema and website page
- Create website/data/tools.yml with 6 tools:
  - Awesome Copilot MCP Server
  - Awesome GitHub Copilot Browser (VS Code extension)
  - APM - Agent Package Manager (CLI)
  - Workspace Architect (npm CLI)
  - Prompt Registry (VS Code extension)
  - GitHub Node for Visual Studio

- Add .schemas/tools.schema.json for YAML validation
- Update eng/generate-website-data.mjs to generate tools.json
- Add parseYamlFile() to eng/yaml-parser.mjs
- Refactor tools.astro to use external TypeScript module
- Create website/src/scripts/pages/tools.ts with:
  - FuzzySearch integration for search
  - Category filtering
  - Copy configuration functionality
2026-01-29 13:48:42 +11:00
Aaron Powell
3bb799616a feat: show collections as item list in modal instead of raw YAML
- Display collection name, description, and tags
- Show clickable list of items in the collection
- Each item shows icon, filename, usage hint, and type badge
- Clicking an item opens that file in the modal
- Hide copy/download buttons for collections (they don't apply)
2026-01-29 10:37:55 +11:00
Aaron Powell
9da53a279e feat: add deep linking support for file modal
- Update URL hash when opening/closing modal (#file=path)
- Handle browser back/forward navigation
- Open modal on page load if hash is present
- Share button now copies deep link URL instead of GitHub URL
2026-01-29 10:34:06 +11:00
Aaron Powell
82accb2cd6 Some more ts updates 2026-01-29 10:26:03 +11:00
Aaron Powell
d46210b2de fix: make FuzzySearch generic to support typed items
- Add SearchableItem base interface for minimum required fields
- Make FuzzySearch class generic with type parameter
- Update all page scripts to use typed FuzzySearch instances
- Fix type casting in calculateScore method
2026-01-29 09:56:20 +11:00
Aaron Powell
63fb276a6c Tweaking a label set 2026-01-29 09:53:29 +11:00
Aaron Powell
d450d7d3d5 feat: add download and share buttons to list view and modal
- Add Download button to download file as .md file
- Add Share button to copy GitHub link to clipboard
- Both buttons appear in modal header and list view actions
- Use icon-only buttons in list view for cleaner UI
2026-01-29 09:44:31 +11:00
Aaron Powell
009c6c72f8 style: remove VS Code icons from dropdown menu items 2026-01-29 09:37:32 +11:00
Aaron Powell
c378488ceb style: remove icon from install button 2026-01-29 09:35:41 +11:00
Aaron Powell
7e7b5c8610 feat: implement split button dropdown for install options
- Replace separate VS Code/Insiders buttons with single Install dropdown
- Primary 'Install' button opens in VS Code, dropdown chevron reveals options
- Dropdown shows 'VS Code' and 'VS Code Insiders' choices
- Add CSS for split button styling with glassmorphism dropdown
- Apply to modal and all list views (agents, prompts, instructions)
2026-01-29 09:33:49 +11:00
Aaron Powell
1887d9ba56 feat: add VS Code install buttons to list views
- Add VS Code and VS Code Insiders install buttons to agent, prompt, and instruction list items
- Use smaller button style for list view
- Include VS Code icon for visual identification
2026-01-28 19:51:35 +11:00
Aaron Powell
d0bcc226ba feat: add VS Code and VS Code Insiders install buttons
- Fix VS Code install URL format to match README links
- Add separate buttons for VS Code and VS Code Insiders
- Support install links for agents, prompts, and instructions
- Add VS Code icon SVG to buttons
2026-01-28 19:45:22 +11:00
Aaron Powell
aa42998e29 chore: rename website-astro to website, update gitignore
- Rename website-astro/ to website/
- Add website/dist/ and website/.astro/ to gitignore
- Update generate-website-data.mjs output path
2026-01-28 16:42:32 +11:00