Skip to content

fix(editor): a filling code editor starts its text at the top - #1447

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/sql-editor-top-aligned
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/sql-editor-top-aligned

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Found while driving a build of `dev` (UI consistency review): in the SQL editor the placeholder and the first line of text sat in the vertical middle of the pane.

Cause

`QueryaCodeEditor` did not pass `textAlignVertical` to the shadcn field, and the field centres the text of one that expands. The material variant had the same default.

Change

A filling editor (`expands: true`) aligns its text to the top unless `textAlignVertical` is given; both variants use the same getter.

Tests

`querya_code_editor_alignment_test`: the caret of an empty editor is near the top for the shadcn and material variants, and an explicit `TextAlignVertical.center` still centres.

Not run locally; CI is the check.

QueryaCodeEditor did not pass textAlignVertical to the shadcn field, and the
field centres the text of one that expands, so the placeholder and the first
line of the SQL editor sat in the middle of the pane. A filling editor now
aligns to the top unless textAlignVertical says otherwise; tests check the
caret position for both variants and an explicit alignment.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 63731a1 into dev Oct 11, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the fix/sql-editor-top-aligned branch October 11, 2026 15:02
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.

1 participant