ui-implementation-standards
Implement or refactor frontend behavior in templates with consistent responsiveness, accessibility, and maintainable JavaScript patterns. Use when changing HTML/CSS/JS in rendered pages.
- License 许可
- MIT
- 最近更新
- 2026-11-01
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ui-implementation-standards
- description
- Implement or refactor frontend behavior in templates with consistent responsiveness, accessibility, and maintainable JavaScript patterns. Use when changing HTML/CSS/JS in rendered pages.
02 资源文件 1
- 脚本scripts/check_ui_templates.py4.4 KB
03 SKILL.md 正文
UI Implementation Standards
Use this skill when implementing or reviewing frontend changes in this repository.
Quick Start
Run the frontend template checks:
uv run python \
.github/skills/frontend/ui-implementation-standards/scripts/check_ui_templates.py
Fail the run when issues are found:
uv run python \
.github/skills/frontend/ui-implementation-standards/scripts/check_ui_templates.py \
--fail-on-issues
Required Behavior
- Base UI changes on existing Flask-rendered templates under
templates/. - Preserve core calendar interactions unless the user explicitly requests behavior changes.
- Keep layouts responsive for small and large screens.
- Prefer semantic HTML and maintain accessible labels and controls.
- Keep JavaScript clear, scoped, and resilient to fetch failures.
- Avoid duplicating client-side request logic when a shared function can be reused.
Workflow
- Identify the user flow impacted by the UI change.
- Locate the template and script blocks involved.
- Apply minimal, explicit HTML/CSS/JS edits that solve the request.
- Ensure selectors, listeners, and API routes remain aligned.
- Re-check responsive structure and accessibility labels.
Review Checks
Before finalizing, confirm:
- Controls remain usable with keyboard and screen-reader-friendly labels.
- Existing country/year/subdivision/zone flows still work as intended.
- Error paths do not leave stale or misleading UI state.
- Markup and script changes are understandable and not over-coupled.
check_ui_templates.pyreports no unresolved issues (or issues are explicitly accepted by the user).
Best Practices
- Prefer progressive enhancement: baseline HTML should still communicate key information before JavaScript runs.
- Keep DOM queries and listeners close to where state changes happen.
- Reuse helpers for repeated fetch and error handling paths.
- Minimize inline styles; prefer class-based styling for maintainability.
- Keep copy and labels explicit and user-facing (avoid ambiguous placeholders).
Notes
- Keep CDN dependency usage consistent with current project style unless a dependency migration is requested.
- For broad UI redesigns, prefer incremental changes over large rewrites.
04 同仓库更多 Skills
technical-seo-checklist
Apply technical SEO best practices for rendered pages, including metadata quality, semantic structure, crawlability, indexability, and performance-aware implementation choices.
roadmap-todo-changelog-auto-updater
Update ROADMAP.md, TODO.md, and CHANGELOG.md automatically from merged PR metadata using deterministic role ownership rules.
pull-request-authoring-workflow
Create or update pull requests for this repo using the required process. Use when opening a PR, editing a PR body, preparing a PR title, checking the pull request template, applying conventional commit style to PR titles, linking tickets, or verifying GitHub PR rendering.
commit-message-guidelines
Prepare commit messages for this repo using the required conventional commit rules. Use when reviewing staged changes, choosing a commit type, selecting a scope, writing a commit summary, or checking whether a commit message follows the repository format.
caveman-commit
Write a Conventional Commits message compressed to intent only. Use for "write a commit", "commit message", /commit or /caveman-commit.
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.