Skip to content

Standardize UI component naming conventions#178

Open
jjroelofs wants to merge 1 commit into1.xfrom
refactor/standardize-ui-naming
Open

Standardize UI component naming conventions#178
jjroelofs wants to merge 1 commit into1.xfrom
refactor/standardize-ui-naming

Conversation

@jjroelofs
Copy link
Copy Markdown
Contributor

Summary

Align error tooltip, loader, and placeholder naming with established codebase patterns (ck-ai-* prefix for CSS, consistent method names).

ID Changes

Old New
gpt-error ck-ai-agent-error
gpt-response-loader ck-ai-agent-loader
slash-placeholder ck-ai-agent-placeholder

CSS Class Changes

Old New
response-error ck-ai-agent-error
show-response-error ck-ai-agent-error--visible
response-error--warning ck-ai-agent-error--warning
gpt-loader ck-ai-agent-loader
show-gpt-loader ck-ai-agent-loader--visible
place-holder ck-ai-agent-placeholder
show-place-holder ck-ai-agent-placeholder--visible

Method Changes

Old New
showGptErrorToolTip showErrorTooltip
hideGptErrorToolTip hideErrorTooltip
addGptErrorToolTip createErrorTooltip

Constant Changes

Old New
GPT_RESPONSE_LOADER_ID LOADER_ID
GPT_RESPONSE_ERROR_ID ERROR_TOOLTIP_ID

This removes inaccurate "GPT" references (the plugin supports multiple AI providers) and follows the ck-ai-* naming pattern used elsewhere in the codebase.

BREAKING CHANGE: CSS class names changed. Users with custom styles targeting the old class names will need to update them.

Fixes #177

Test plan

  • Verify TypeScript compilation passes
  • Test error tooltip display (trigger an error condition)
  • Test loader display during AI generation
  • Test placeholder display on empty lines
  • Verify warning tooltip styling works (blocked URLs warning)

Align error tooltip, loader, and placeholder naming with established
codebase patterns (ck-ai-* prefix for CSS, consistent method names).

Changes:
- Rename IDs: gpt-error -> ck-ai-agent-error, gpt-response-loader -> ck-ai-agent-loader, slash-placeholder -> ck-ai-agent-placeholder
- Rename CSS classes to use ck-ai-agent-* prefix with BEM modifiers (--visible, --warning)
- Rename methods: showGptErrorToolTip -> showErrorTooltip, hideGptErrorToolTip -> hideErrorTooltip, addGptErrorToolTip -> createErrorTooltip
- Update ID constants: GPT_RESPONSE_LOADER_ID -> LOADER_ID, GPT_RESPONSE_ERROR_ID -> ERROR_TOOLTIP_ID
- Remove stray console.log from aiagentcontext.ts

This removes inaccurate "GPT" references (the plugin supports multiple AI providers) and follows the ck-ai-* naming pattern used elsewhere in the codebase.

BREAKING CHANGE: CSS class names changed. Users with custom styles targeting the old class names will need to update them.

Fixes #177
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.

Refactoring: Standardize error/loader UI component naming conventions

1 participant