Skip to content

fix: reduce uncessary navigate when switching requests and tests#7748

Merged
CurryYangxx merged 4 commits intodevelopfrom
fix/switch-request
Jul 24, 2024
Merged

fix: reduce uncessary navigate when switching requests and tests#7748
CurryYangxx merged 4 commits intodevelopfrom
fix/switch-request

Conversation

@CurryYangxx
Copy link
Member

@CurryYangxx CurryYangxx commented Jul 23, 2024

We already called navigate in GridList onAction or onSelectionChange callback. So we don't need the navigate in onSingleClick callback.

navigate(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/debug/request/${id}?${searchParams.toString()}`);

Navigating to the same URL as the current URL will cause uncessary loader revalidation.

@CurryYangxx CurryYangxx requested a review from gatzjames July 23, 2024 09:24
Comment on lines +89 to +93
const [apiSpec, workspace, workspaceMeta] = await Promise.all([
models.apiSpec.getByParentId(workspaceId),
models.workspace.getById(workspaceId),
models.workspaceMeta.getByParentId(workspaceId),
]);
Copy link
Contributor

@jackkav jackkav Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a one off / out of scope / unnecessary optimization.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, already remove from this pr. Let us focus on the stuff metioned in description 😄.

@CurryYangxx CurryYangxx requested a review from jackkav July 23, 2024 10:05
ihexxa
ihexxa previously approved these changes Jul 24, 2024
@CurryYangxx CurryYangxx merged commit 8472c28 into develop Jul 24, 2024
@CurryYangxx CurryYangxx deleted the fix/switch-request branch July 24, 2024 13:51
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.

4 participants