Wf setup - #24
Conversation
- Add WorkfrontClient service for API communication - Implement Workfront event registry for event subscription management - Add configure-workfront service to save Workfront config for brands - Add list-workfront-companies and list-workfront-groups services - Add manage-workfront-subscriptions service for event management - Update Brand class with Workfront configuration fields - Add WorkfrontConfigModal UI component for configuration - Implement token caching utility for API authentication - Update app.config.yaml with new Workfront service actions This enables agencies to configure Workfront integration settings for each brand, including server URL, company, and group selection.
- Fix Workfront data persistence in DemoBrandManager - Add Workfront fields to getBrandFromJson() method - Add Workfront fields to createBrand() method - Ensures data persists after save and shows in list view - Improve Brand form layout and user experience - Change layout from maxWidth size-5000 to size-6000 with better padding - Add full-width background (gray-50) aligned with header bar - Remove centering (marginX auto) for left-aligned content layout - Fix gap between header and content area with explicit margin/padding - Enhance Workfront integration section - Stack all Workfront fields vertically with Flex column layout - Add consistent size-200 gap between fields - Set width 100% on all fields for proper container spanning - Auto-load companies/groups when opening edit form with existing data - Add dynamic required indicators (Company/Group required when URL provided) - Implement validation error display with auto-clear on selection - Clear validation errors when Workfront URL is removed - Fix logo upload DropZone styling - Remove width 100% that caused overflow - Use minHeight instead of fixed height - Add proper border, padding, and centering with UNSAFE_style - Contained within Well component boundaries - Improve brand metadata display in view mode - Change from horizontal jumble to vertical stack using Flex - Add bold labels for better readability - Add consistent spacing with gap size-100 - Fix date handling with proper new Date() wrapping - Add comprehensive documentation - Create WORKFRONT_DATA_PERSISTENCE_FIX.md with detailed explanation - Document root cause, fixes, and expected behavior - Include verification steps and testing guidelines
| } | ||
|
|
||
| // Parse runtime info | ||
| const runtimeInfo = new ApplicationRuntimeInfo( |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
The best way to fix this issue is to remove the unused variable runtimeInfo entirely from the function. Specifically, eliminate the statement on line 62 where runtimeInfo is initialized. If there are no side-effects from creating the ApplicationRuntimeInfo object, removing this line will not alter the program's functional behavior or performance besides a minor improvement. Only line 62 (and, if applicable, line 63 which feeds into this initialization) should be deleted, with no other code changes required.
| @@ -59,9 +59,6 @@ | ||
| } | ||
|
|
||
| // Parse runtime info | ||
| const runtimeInfo = new ApplicationRuntimeInfo( | ||
| JSON.parse(params.APPLICATION_RUNTIME_INFO) | ||
| ); | ||
|
|
||
| // Initialize Brand Manager | ||
| const brandManager = new BrandManager(params.LOG_LEVEL || 'info'); |
| } | ||
|
|
||
| // Parse runtime info | ||
| const runtimeInfo = new ApplicationRuntimeInfo( |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
The best fix is to simply remove the declaration of the unused variable runtimeInfo (line 80-82), since it isn't used in the code shown. This entails deleting these lines from the function. No other code appears to depend on this variable, and thus, no other changes are needed. This action improves performance and clarity by not performing unnecessary computation.
| @@ -77,9 +77,6 @@ | ||
| } | ||
|
|
||
| // Parse runtime info | ||
| const runtimeInfo = new ApplicationRuntimeInfo( | ||
| JSON.parse(params.APPLICATION_RUNTIME_INFO) | ||
| ); | ||
|
|
||
| // Initialize Brand Manager | ||
| const brandManager = new BrandManager(params.LOG_LEVEL || 'info'); |
| import { v4 as uuidv4 } from 'uuid'; | ||
| import { apiService } from '../../services/api'; | ||
| import { Brand } from '../../classes/Brand'; | ||
| import { ActionButton } from '@adobe/react-spectrum'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, the unused import { ActionButton } from @adobe/react-spectrum on line 35 of src/components/layout/BrandManagerView.tsx should be removed. This involves deleting only line 35, without affecting any other parts of the file (such as keeping all other imports intact). If ActionButton is genuinely not used elsewhere in the file, and only Button (from line 16) is used for all related components, this removal won't affect functionality.
| @@ -32,7 +32,6 @@ | ||
| import { v4 as uuidv4 } from 'uuid'; | ||
| import { apiService } from '../../services/api'; | ||
| import { Brand } from '../../classes/Brand'; | ||
| import { ActionButton } from '@adobe/react-spectrum'; | ||
|
|
||
| type ViewMode = 'list' | 'add' | 'edit' | 'view'; | ||
|
|
Lost work related to workfront endpoint registration and company and group selection