Skip to content

feat: add API versioning, mobile responsive layout, and component tests#2

Merged
tmushayahama merged 4 commits intomainfrom
issue-1-toolbar-versioning
Feb 20, 2026
Merged

feat: add API versioning, mobile responsive layout, and component tests#2
tmushayahama merged 4 commits intomainfrom
issue-1-toolbar-versioning

Conversation

@tmushayahama
Copy link
Copy Markdown
Collaborator

@tmushayahama tmushayahama commented Feb 20, 2026

Issues
#1

Changes

API Versioning (pango-toolbar)

  • New apiVersion prop ('pango-1' | 'pango-2', default pango-2) for switching between v1/v2 configurations
  • Auto-detects ?apiVersion= from URL when api-version attribute is not set
  • Download links now use version-aware URLs via getConfig()

Environment Constants (environment.ts)

  • Refactored from flat ENVIRONMENT object to BASE_CONFIG + VERSION_CONFIGS keyed by version
  • Renamed constants from camelCase to SCREAMING_CASE to align with site-react
  • V1 download paths include /v1/ segment; V2 ontology URL updated
  • Added version metadata: APP_VERSION, GO_RELEASE, PANTHER_VERSION

Mobile Responsive Layout

  • Toolbar actions now visible on all viewport sizes (previously hidden below 768px)
  • Below 768px: icon-only buttons for Download, About, Help, and a logos dropdown
  • Above 768px: unchanged desktop layout with text buttons and side-by-side logos

Dropdown Enhancements (pango-dropdown)

  • New align prop ('left' | 'right') for dropdown positioning
  • New --pango-dropdown-trigger-padding CSS variable

Tests

  • 11 spec tests for pango-toolbar (default rendering, custom props, download links, V1/V2 URLs, partner logos)
  • 10 spec tests for pango-dropdown (rendering, toggle, events, alignment)
  • 6 e2e tests each for both components
  • Image mock setup in stencil.config.ts for Jest PNG handling

CI/CD & Release Workflow

  • Configured semantic-release for automated versioning, changelogs, npm publish, and GitHub releases
  • Removed redundant publish.yml workflow
  • Updated ci.yml to PR-only trigger (semantic-release handles push-to-main)
  • Updated semantic-release.yml with explicit permissions and v24
  • Added commitlint CI workflow for conventional commit enforcement
  • Fixed package.json repository URL to pantherdb/pango-toolbar

Documentation

  • Expanded README with contributing guide, conventional commit reference, and release workflow docs

Test plan

  • Spec tests pass locally (25/25)
  • CI build and test pass on PR
  • After squash merge: semantic-release publishes 0.1.0 to npm
  • After squash merge: GitHub release v0.1.0 created with auto-generated notes

cc @mugitty @dustine32

- Restructure environment.ts to match site-react constants pattern
  with BASE_CONFIG + VERSION_CONFIGS (pango-1/pango-2)
- Add apiVersion prop with auto-detection from ?apiVersion= query param
- Add align prop to pango-dropdown for right-aligned positioning
Add unit tests (spec) and end-to-end tests for both components,
covering rendering, props, events, and alignment. Configure Jest
image mocking in stencil.config.ts to handle PNG imports in tests.
- Remove publish.yml (superseded by semantic-release)
- Update ci.yml to PR-only trigger
- Update semantic-release.yml with permissions and v24
- Add commitlint config and CI workflow
- Fix package.json repository URL to pantherdb/pango-toolbar
- Clean up CHANGELOG.md for semantic-release ownership
- Expand README with contributing guide and release workflow
@tmushayahama tmushayahama merged commit 1183de3 into main Feb 20, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant