refactor(frontend): Restructure Pages and Table components#1221
Merged
lusergit merged 16 commits intoedgehog-device-manager:mainfrom Feb 10, 2026
Merged
refactor(frontend): Restructure Pages and Table components#1221lusergit merged 16 commits intoedgehog-device-manager:mainfrom
lusergit merged 16 commits intoedgehog-device-manager:mainfrom
Conversation
Pull Request Test Coverage Report for Build 21858925309Details
💛 - Coveralls |
b2e1316 to
941e1f6
Compare
15b3cce to
1b47882
Compare
Emina-M
approved these changes
Feb 6, 2026
1b47882 to
e7a0754
Compare
OmarBrbutovic
requested changes
Feb 9, 2026
| @@ -163,7 +156,7 @@ const formatJson = (jsonString: unknown) => { | |||
|
|
|||
| type volumeDetailsProps = { | |||
Collaborator
There was a problem hiding this comment.
if we are changing the naming volumes should follow the same pattern with the first capital letter
Comment on lines
+91
to
+126
| const debounceRefetch = useMemo( | ||
| () => | ||
| _.debounce((text: string) => { | ||
| if (text === "") { | ||
| refetch( | ||
| { | ||
| first: RECORDS_TO_LOAD_FIRST, | ||
| }, | ||
| { fetchPolicy: "network-only" }, | ||
| ); | ||
| } else { | ||
| refetch( | ||
| { | ||
| first: RECORDS_TO_LOAD_FIRST, | ||
| filter: { | ||
| or: [{ name: { ilike: `%${text}%` } }], | ||
| }, | ||
| }, | ||
| { fetchPolicy: "network-only" }, | ||
| ); | ||
| } | ||
| }, 500), | ||
| [refetch], | ||
| ); | ||
|
|
||
| useEffect(() => { | ||
| if (searchText !== null) { | ||
| debounceRefetch(searchText); | ||
| } | ||
| }, [debounceRefetch, searchText]); | ||
|
|
||
| const loadNextApplications = useCallback(() => { | ||
| if (hasNext && !isLoadingNext) { | ||
| loadNext(RECORDS_TO_LOAD_NEXT); | ||
| } | ||
| }, [hasNext, isLoadingNext, loadNext]); |
Collaborator
There was a problem hiding this comment.
Not a request, but it might be good to explore extracting this into something like hooks/usePaginatedSearch.ts, so that we dont have to duplicate it so much. Since the current implementation is all over the place, some are memonized some and some are not.
Example usage:
const { data, searchText, setSearchText, isLoading, loadMore } =
usePaginatedSearch({
fragment: DEVICES_FRAGMENT,
fragmentRef: devicesData,
buildSearchFilter: (text) => ({
or: [
{ name: { ilike: `%${text}%` } },
{ deviceId: { ilike: `%${text}%` } },
],
}),
});
Collaborator
Author
There was a problem hiding this comment.
I like the idea, but I think it would be better to do it in a separate PR
e7a0754 to
8dfbab1
Compare
OmarBrbutovic
approved these changes
Feb 10, 2026
- Refactor ApplicationsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Applications page - Centralize delete behavior and modal handling Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor BaseImageCollectionsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to BaseImageCollections page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor ChannelsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Channels page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor DeploymentCampaignsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to DeploymentCampaigns page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor DeploymentsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Deployments page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor DevicesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Devices page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor DeviceGroupsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to DeviceGroups page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor HardwareTypesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to HardwareTypes page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor ImageCredentialsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to ImageCredentials page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor NetworksTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Networks page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor SystemModelsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to SystemModels page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor UpdateCampaignsTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to UpdateCampaigns page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor VolumesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Volumes page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor ContainersTable and ReleaseDevicesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Release page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor BaseImagesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to BaseImageCollection page Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
- Refactor ReleasesTable and ApplicationDevicesTable into a stateless, presentational component - Move Relay pagination, search, and filtering logic to Application page - Centralize delete behavior and modal handling Signed-off-by: ArnelaL <arnela.lisic@secomind.com>
8dfbab1 to
cabf949
Compare
Collaborator
|
/fast-forward |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor Frontend
Refactor Pages and Tables to separate data fetching from presentation
Checklist
Further Comments (optional)
Screenshots / Demos (optional)