fix(charts): add X Axis Number Format control for numeric X-axis columns (#38809)

Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
Enzo Martellucci
2026-03-31 12:38:07 +02:00
committed by GitHub
parent 2c9cf0bd55
commit e0a0a22542
16 changed files with 865 additions and 106 deletions

View File

@@ -16,10 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import {
configureStore,
createListenerMiddleware,
} from '@reduxjs/toolkit';
import { configureStore, createListenerMiddleware } from '@reduxjs/toolkit';
import type { QueryEditor } from 'src/SqlLab/types';
import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import {
@@ -369,7 +366,10 @@ test('onDidCloseTab fires with Tab on REMOVE_QUERY_EDITOR', async () => {
test('onDidChangeActiveTab fires with Tab on SET_ACTIVE_QUERY_EDITOR', () => {
// Add a second editor so switching back is a real change
mockStore.dispatch({ type: ADD_QUERY_EDITOR, queryEditor: makeSecondEditor() });
mockStore.dispatch({
type: ADD_QUERY_EDITOR,
queryEditor: makeSecondEditor(),
});
const listener = jest.fn();
const disposable = sqlLab.onDidChangeActiveTab(listener);
@@ -418,7 +418,10 @@ test('onDidCreateTab fires with Tab on ADD_QUERY_EDITOR', () => {
test('editor-scoped listener does not fire for a different editor', () => {
// Add a second editor (ADD_QUERY_EDITOR makes it active)
mockStore.dispatch({ type: ADD_QUERY_EDITOR, queryEditor: makeSecondEditor() });
mockStore.dispatch({
type: ADD_QUERY_EDITOR,
queryEditor: makeSecondEditor(),
});
// Switch back to editor-1 so the predicate captures immutable-1
mockStore.dispatch({
@@ -444,7 +447,10 @@ test('editor-scoped listener does not fire for a different editor', () => {
test('editor-scoped predicate filters tab events via queryEditor lookup', () => {
// Add a second editor and switch back to editor-1
mockStore.dispatch({ type: ADD_QUERY_EDITOR, queryEditor: makeSecondEditor() });
mockStore.dispatch({
type: ADD_QUERY_EDITOR,
queryEditor: makeSecondEditor(),
});
mockStore.dispatch({
type: SET_ACTIVE_QUERY_EDITOR,
queryEditor: { id: EDITOR_ID },
@@ -468,7 +474,10 @@ test('editor-scoped predicate filters tab events via queryEditor lookup', () =>
test('globalPredicate listener fires for a non-active tab', () => {
// Add editor-2 and switch to it
mockStore.dispatch({ type: ADD_QUERY_EDITOR, queryEditor: makeSecondEditor() });
mockStore.dispatch({
type: ADD_QUERY_EDITOR,
queryEditor: makeSecondEditor(),
});
mockStore.dispatch({
type: SET_ACTIVE_QUERY_EDITOR,
queryEditor: { id: 'editor-2' },