Skip to content

Conversation

@rosajsx
Copy link
Contributor

@rosajsx rosajsx commented Jan 2, 2025

This pull request introduces a new feature to track and display the history of executed CQL queries in the query runner. The most important changes include adding a new component for displaying the query history, updating the main CQL editor component to include this history, and creating a custom hook to manage the query history state.

New Feature: Query History

Updates to CQL Editor

  • src/app/(main)/query-runner/_components/cql-editor.tsx:
    • Imported the new CqlEditorHistory component and the useCqlQueryHistory hook. [1] [2] [3]
    • Integrated the query history functionality by adding queries to the history when they are executed and displaying the history in the UI. [1] [2] [3] [4] [5] [6]

Custom Hook for Query History

  • src/hooks/use-cql-query-history.ts: Created a custom hook useCqlQueryHistory to manage the state of the query history, including adding new queries to the history and sorting them by date.

Utility Function

  • src/utils/index.tsx: Added a utility function formatDate to format dates for display in the query history.

ESLint Configuration

  • .eslintrc.json: Updated ESLint configuration to include new rules for unicorn plugin.
image

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.

2 participants