Skip to content

Fix missing 'Add sentiment' button in admin interface#18

Closed
jjroelofs wants to merge 0 commit into1.xfrom
fix/add-sentiment-button
Closed

Fix missing 'Add sentiment' button in admin interface#18
jjroelofs wants to merge 0 commit into1.xfrom
fix/add-sentiment-button

Conversation

@jjroelofs
Copy link
Copy Markdown
Contributor

Summary

Fixes the missing "Add sentiment" button on the admin settings page by implementing proper action links and standardizing routing paths.

Closes #17

Changes Made

1. Created Missing Action Links File

  • Added: analyze_ai_sentiments.links.action.yml
  • Defines the action button that appears on the settings page
  • Follows the same pattern used by sibling modules (analyze_ai_content_marketing_audit, analyze_ai_content_security_audit)

2. Fixed Routing Path Inconsistencies

  • Modified: analyze_ai_sentiments.routing.yml
  • Standardized all paths to use consistent pattern: /admin/config/analyze/sentiments/sentiment/
  • Before: Mixed patterns with /admin/config/analyze/ai-sentiments/ and /admin/config/analyze/sentiments/
  • After: Consistent /admin/config/analyze/sentiments/sentiment/ pattern

Technical Details

Action Links Configuration

analyze_ai_sentiments.sentiment.add:
  route_name: analyze_ai_sentiments.add_sentiments
  title: 'Add sentiment'
  appears_on:
    - analyze_ai_sentiments.settings

Routing Path Changes

  • Add route: /admin/config/analyze/ai-sentiments/add/admin/config/analyze/sentiments/sentiment/add
  • Delete route: /admin/config/analyze/ai-sentiments/{sentiments_id}/delete/admin/config/analyze/sentiments/sentiment/{sentiments_id}/delete

Testing

  • ✅ All drupal-check validations pass (0 errors)
  • ✅ All coding standards checks pass (drupal-lint)
  • ✅ Action button now appears on settings page
  • ✅ Routing consistency maintained across all CRUD operations

Impact

  • Users can now add custom sentiments through the admin UI
  • Module interface is consistent with sibling analyze modules
  • No breaking changes to existing functionality

🤖 Generated with Claude Code

@jjroelofs jjroelofs self-assigned this Sep 11, 2025
@jjroelofs jjroelofs closed this Sep 11, 2025
@jjroelofs jjroelofs force-pushed the fix/add-sentiment-button branch from 08625cb to e12af54 Compare September 11, 2025 12:46
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.

Missing 'Add sentiment' button in admin interface

1 participant