Skip to content

Fix title editors shrinking and clipping while editing - #7889

Open
TravisCossarini wants to merge 2 commits into
getredash:masterfrom
TravisCossarini:fix/query-title-edit-width
Open

TravisCossarini wants to merge 2 commits into
getredash:masterfrom
TravisCossarini:fix/query-title-edit-width

Conversation

@TravisCossarini

@TravisCossarini TravisCossarini commented Oct 24, 2026 •

Copy link
Copy Markdown

What type of PR is this?

  • Bug Fix

Description

Clicking a query or dashboard title to rename it swaps the title for an input that is much smaller than the title:

  • The field collapses. The antd <Input> sits inside .edit-in-place, an inline-block wrapper that sizes itself to its content, so the input falls back to its default ~20-character width and long titles get cut off.
  • Typing a longer title scrolls the field instead of giving it room.
  • The text shrinks to antd's 14px font. Update EditInPlace to use Antd components #4493 noted this as a side effect when the editor moved to antd.

This PR adds 18 lines of CSS to the shared .page-title styles in base.less. While a title is being edited, its .page-title takes the rest of the title row, and the input gets the full width and the title's font. There are no JavaScript changes.

  • Covers both the query and dashboard headers, since both use .page-title.
  • Uses :has(.edit-in-place.active). Browsers without :has() keep the current behavior.
  • While editing, the tags move to the right end of the title row and return afterwards. That fits Improve visibility of editable titles  #4097's direction of letting the input take over the title area in edit mode.

How is this tested?

  • Manually

Tested in Chrome against the Docker dev stack (make up), and at phone width with Playwright's iPhone 13 emulation:

  • Query title: the field opens at the full title row in the title's font. A ~105-character title fits without scrolling, the page doesn't scroll horizontally, and Escape cancels.
  • Dashboard title (layout edit mode): the field fills the row up to the owner avatar, and a long title fits.
  • Phone: the field takes the full row at the title's 18px font and stays within the screen.

I ran every CI job locally against this commit: backend and frontend lint, prettier, Jest and viz-lib tests, the production build, Cypress, the Playwright visual tests and pytest. They all pass. There are no JS changes, and the visual tests capture titles while they aren't being edited.

Related Tickets & Documents

Related to #4097 (Improve visibility of editable titles). This doesn't address discoverability, but it follows that issue's second conclusion about the input taking the title's space in edit mode. The smaller editing font comes from #4493. I couldn't find an existing issue about the input collapsing or clipping.

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Desktop: before, the field collapses and scrolls while typing:

Desktop: after, the field fills the title row in the title's font:

Mobile (iPhone 13 emulation, 390px)

Before After
query-title-edit-before query-title-edit-after
query-title-edit-mobile-before query-title-edit-mobile-after

🤖 Generated with Claude Code

Clicking a query or dashboard title swaps it for an antd Input inside an
inline-block wrapper, so the input fell back to its default ~20-character
width and 14px font (the smaller font was noted as a side effect in getredash#4493).
Long titles collapsed and scrolled, and growing a short title clipped.

While a title is being edited, let its .page-title take the rest of the
title row and give the input the full width and the title's font. Browsers
without :has() keep the current behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Updates the shared title styles so query and dashboard title editors use more space and inherit the title font.

  • Editing query and dashboard titles gives the field room and matching text.

Reviews (2) · Last reviewed commit: "Merge branch 'master' into fix/query-tit..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
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