windro-xdd commented on PR #64689:
URL: https://github.com/apache/airflow/pull/64689#issuecomment-4232062181

   ## Updates Based on Review Feedback
   
   I've addressed all the feedback from the Copilot PR Reviewer and completed 
the remaining work items. Here's what changed:
   
   ### Component Improvements
   
   **Removed memo() wrapper** — After checking AssetNode and TaskNode, it's 
clear the codebase doesn't use memo() for graph nodes. Removed the wrapper and 
custom comparison logic to stay consistent with existing patterns.
   
   **Fixed translate key naming** — Changed from `const { t }` to `const { t: 
translate }` to match the convention used in AssetNode and other graph 
components. Makes the code more readable and consistent.
   
   **Removed defaultValue fallbacks** — Removed all `defaultValue` parameters 
from translate() calls. This ensures translation keys must exist across all 21 
locales instead of silently falling back.
   
   ### Translation Updates
   
   Fixed the translation value issue:
   - `graph.triggerDagRun` was "TriggerDagRunOperator" (the Python class name)
   - Now it's "Trigger DAG Run" (human-readable UI label)
   
   Added two new translation keys for better accessibility and UX:
   - `graph.triggerNodeAriaLabel` → "Trigger node" (screen reader support)
   - `graph.triggerNodeIcon` → "Trigger" (icon tooltip)
   
   Updated all 21 locale files with these three keys in appropriate 
translations.
   
   ### Testing
   
   Added comprehensive unit tests covering:
   - Default rendering and prop handling
   - Selected/unselected states with proper aria attributes
   - Label truncation (>100 chars) and XSS prevention
   - Height/width validation (40-1000px range)
   - Translation key integration
   - Edge cases (missing labels, null values, whitespace handling)
   - All data-testid attributes for automation
   
   26 test cases total covering the component surface area.
   
   ### Input Validation
   
   The component now properly:
   - Validates and constrains dimensions within safe ranges
   - Sanitizes and truncates labels to prevent issues
   - Handles edge cases gracefully with sensible defaults
   - Provides clear semantic structure for accessibility
   
   Should be good to go. Let me know if there's anything else needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to