-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: change trace and svg mutations to lazy query #1640
Conversation
@@ -23,7 +23,7 @@ interface PlanToSvgButtonProps { | |||
export function PlanToSvgButton({plan, database}: PlanToSvgButtonProps) { | |||
const [error, setError] = React.useState<string | null>(null); | |||
const [blobUrl, setBlobUrl] = React.useState<string | null>(null); | |||
const [getPlanToSvg, {isLoading}] = planToSvgApi.usePlanToSvgQueryMutation(); | |||
const [getPlanToSvg, {isLoading}] = planToSvgApi.useLazyPlanToSvgQueryQuery(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats actual changes
@@ -20,7 +20,7 @@ export function TraceButton({traceId, isTraceReady}: TraceUrlButtonProps) { | |||
const checkTraceUrl = traceCheck?.url ? replaceParams(traceCheck.url, {traceId}) : ''; | |||
const traceUrl = traceView?.url ? replaceParams(traceView.url, {traceId}) : ''; | |||
|
|||
const [checkTrace, {isLoading, isUninitialized}] = traceApi.useCheckTraceMutation(); | |||
const [checkTrace, {isLoading, isUninitialized}] = traceApi.useLazyCheckTraceQuery(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats actual changes
@@ -27,29 +27,6 @@ test.describe('Test Query Editor', async () => { | |||
await tenantPage.goto(pageQueryParams); | |||
}); | |||
|
|||
test('Settings dialog opens on Gear click and closes on Cancel', async ({page}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to separate files
This pull request includes several changes to the
src/containers/Tenant/Query/ExecuteResult
components, updates to API endpoints, and new test cases for the sidebar and query editor functionalities. The most important changes include modifying API queries, adding new test utilities and classes, and updating existing test cases.API Query Modifications:
src/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.tsx
: Changed fromusePlanToSvgQueryMutation
touseLazyPlanToSvgQueryQuery
.src/containers/Tenant/Query/ExecuteResult/TraceButton.tsx
: Changed fromuseCheckTraceMutation
touseLazyCheckTraceQuery
.src/store/reducers/planToSvg.ts
: ChangedplanToSvgQuery
from a mutation to a query.src/store/reducers/trace.ts
: ChangedcheckTrace
from a mutation to a query.Test Enhancements:
tests/suites/nodes/nodes.test.ts
: AddedtoggleExperiment
utility and updated the test to use it for enabling paginated tables. [1] [2]tests/suites/sidebar/Sidebar.ts
: Added a newSidebar
class to manage sidebar interactions in tests.tests/suites/sidebar/sidebar.test.ts
: Added comprehensive tests for the sidebar, including visibility, button interactions, and experiment toggling.tests/suites/tenant/queryEditor/planToSvg.test.ts
: Added a new test suite for the Plan to SVG functionality, including experiment toggling and SVG verification.tests/suites/tenant/queryEditor/queryEditor.test.ts
: Moved tests for functionalities to separate files. [1] [2] [3] [4]Closes #1639
CI Results
Test Status: ✅ PASSED
📊 Full Report
Bundle Size: 🔽
Current: 66.07 MB | Main: 66.08 MB
Diff: 0.00 MB (-0.01%)
✅ Bundle size decreased.
ℹ️ CI Information