Refactor schedule components to use InformationBlockFact#119
Conversation
…ct and update package dependencies
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 28s —— View job PR Review: Refactor schedule components to use InformationBlockFactTasks:
Overall this is a clean, well-executed migration. The old Issues1. const mechanics = block.artifact.mechanics as {
kind?: string
scheduleMetadata?: { method?: string }
periodsWithEntries?: number
}This casts an untyped Consider extracting this into a typed guard or adding an assertion comment documenting which API contract version this depends on. At minimum, a 2.
3. In // Suggestion
{formatMonth(fact.periodStart ?? fact.periodEnd)}Or guard the render: {fact.periodStart ? formatMonth(fact.periodStart) : '—'}Nits
Table row key uses Summary
The two medium items (#1 and #3) are worth fixing before merge — #1 because it creates a silent failure surface, and #3 because null dates render visibly broken. #2 is a quick cleanup. Everything else looks good. |
…iodStart and remove taxonomyName from ScheduleRow
Summary
This PR refactors the
SchedulePanelandSchedulesContentcomponents to adopt theInformationBlockFactcomponent pattern from the@robosystems/clientlibrary, replacing the previous implementation. The@robosystems/clientdependency is updated from its prior version to 0.3.9 to support this change.Changes
Component Refactoring
SchedulePanel.tsx(ledger/close/components): Updated to useInformationBlockFactfor rendering schedule data, streamlining how individual facts/fields are displayed within the panel.SchedulesContent.tsx(ledger/schedules): Significant refactor (~78 lines changed) to integrateInformationBlockFact, replacing prior markup and layout logic with the standardized component from the shared library.Dependency Updates
@robosystems/client: Bumped to0.3.9, which introduces or stabilizes theInformationBlockFactcomponent used in this PR.package-lock.json: Regenerated to reflect the updated dependency tree (~1596 lines changed).Key UI/UX Improvements
InformationBlockFactpattern for displaying schedule information, ensuring visual and structural consistency across the ledger module.@robosystems/client.Breaking Changes
SchedulePanelorSchedulesContent, they may need to be updated to reflect the new markup produced byInformationBlockFact.Testing Notes for Reviewers
SchedulePanelrenders schedule facts/details correctly with proper formatting and layout./ledger/schedulesand confirm that the content displays all schedule information as expected, with no missing data or layout regressions.InformationBlockFacthandles these gracefully.Browser Compatibility Considerations
InformationBlockFactcomponent from@robosystems/client@0.3.9, which should follow the same browser support matrix as the rest of the shared library.🤖 Generated with Claude Code
Branch Info:
feature/information-blockmainCo-Authored-By: Claude noreply@anthropic.com