Skip to content
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

feat(Key-Value Editor): Improve accessibility and make the items re-orderable #7465

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

111 changes: 0 additions & 111 deletions packages/insomnia/src/ui/components/base/editable.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const OneLineEditor = forwardRef<OneLineEditorHandle, OneLineEditorProps>
// Clear history so we can't undo the initial set
codeMirror.current?.clearHistory();
// Setup nunjucks listeners
if (!readOnly && handleRender && !settings.nunjucksPowerUserMode) {
if (handleRender && !settings.nunjucksPowerUserMode) {
codeMirror.current?.enableNunjucksTags(
handleRender,
handleGetRenderContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DefinitionNode, DocumentNode, GraphQLNonNull, GraphQLSchema, Kind, NonN
import { buildClientSchema, getIntrospectionQuery } from 'graphql/utilities';
import { Maybe } from 'graphql-language-service';
import React, { FC, useEffect, useRef, useState } from 'react';
import { Button } from 'react-aria-components';
import { Button, Toolbar } from 'react-aria-components';
import ReactDOM from 'react-dom';
import { useLocalStorage } from 'react-use';

Expand All @@ -28,7 +28,6 @@ import { CodeEditor, CodeEditorHandle } from '../../codemirror/code-editor';
import { GraphQLExplorer } from '../../graph-ql-explorer/graph-ql-explorer';
import { ActiveReference } from '../../graph-ql-explorer/graph-ql-types';
import { HelpTooltip } from '../../help-tooltip';
import { Toolbar } from '../../key-value-editor/key-value-editor';
import { useDocBodyKeyboardShortcuts } from '../../keydown-binder';
import { TimeFromNow } from '../../time-from-now';

Expand Down Expand Up @@ -470,7 +469,7 @@ export const GraphQLEditor: FC<Props> = ({
const canShowSchema = schema && !schemaIsFetching && !schemaFetchError && schemaLastFetchTime > 0;
return (
<div className="graphql-editor">
<Toolbar>
<Toolbar className="content-box sticky top-0 z-10 bg-[var(--color-bg)] flex flex-row border-b border-[var(--hl-md)] h-[var(--line-height-sm)] text-[var(--font-size-sm)]">
<Dropdown
aria-label='Operations Dropdown'
isDisabled={!state.operations.length}
Expand Down
Loading
Loading