Skip to content

feat(shared-filesystem-storage): migrates replicas to functional TypeScript (#1966)#1988

Open
hodanoori wants to merge 3 commits into
masterfrom
hoda-elektra-react-19-replicas-list
Open

feat(shared-filesystem-storage): migrates replicas to functional TypeScript (#1966)#1988
hodanoori wants to merge 3 commits into
masterfrom
hoda-elektra-react-19-replicas-list

Conversation

@hodanoori
Copy link
Copy Markdown
Contributor

@hodanoori hodanoori commented Mar 31, 2026

Summary

Migrates ReplicaList and ReplicaItem components in the shared filesystem storage plugin to TypeScript as part of the React 19 migration epic (#1774). ReplicaList is converted from a class component to a functional component; ReplicaItem was already functional and is converted to TypeScript.

Changes Made

  • Replace class component ReplicaList with a functional TypeScript component in list.tsx
  • Convert ReplicaItem from JSX to TypeScript in item.tsx (already functional)
  • Replace componentDidMount and UNSAFE_componentWillReceiveProps with useEffect([active]) in ReplicaList
  • Add TypeScript interfaces for Replica, Share, SharesState, and component props in both files
  • Add type declaration for lib/policy in app/javascript/types/global.d.ts
  • Add list.test.tsx with 9 unit tests covering loading state, table rendering, and dependency loading
  • Add item.test.tsx with 15 unit tests covering row rendering and actions menu

Related Issues

Screenshots (if applicable)

266F94DB-629A-4DFD-906B-40A061019691

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

@hodanoori hodanoori self-assigned this Mar 31, 2026
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.

[Task](shared-filesystem-replicas-list): Migrate shared_filesystem_storage/components/replicas/list.jsx

2 participants