Skip to content

fix(settings): even out spacing around the settings separator - #1225

Draft
makhnatkin wants to merge 1 commit into
mainfrom
fix/settings-preview-button-spacing
Draft

fix(settings): even out spacing around the settings separator#1225
makhnatkin wants to merge 1 commit into
mainfrom
fix/settings-preview-button-spacing

Conversation

@makhnatkin

@makhnatkin makhnatkin commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

The divider between the preview button and the settings button is off-center: 6px on one side, 4px on the other.

The cause is a margin: 0 2px on the preview button, left over from the old settings block layout that also had a mode button next to it (#207). The mode button was moved into the popup in #933, the margin stayed. Removing it makes the divider symmetric.

Also fixes a divider that could hang on its own: it was rendered on a truthy settingsVisible, while the settings button itself uses areSettingsVisible. With settingsVisible={[]} that meant a divider with no button after it.

Draft: toolbar screenshots shift by a few pixels and still need to be regenerated (playwright:docker:update --grep 'Toolbar'). The settings panel snapshots capture the popup only and are unaffected.

🤖 Generated with Claude Code

Summary by Sourcery

Fix settings toolbar divider alignment and visibility.

Bug Fixes:

  • Align the settings divider spacing by removing the obsolete preview-button margin.
  • Render the settings divider only when the settings button is visible, preventing an orphaned divider.

The `margin: 0 2px` on the preview button is left over from the layout
that also had a mode button (#207); after the mode button was dropped
(#933) it only made the separator sit 6px from the preview button and
4px from the settings button.

The separator was also rendered on a truthy `settingsVisible`, so an
empty `settingsVisible={[]}` produced a divider with no settings button
next to it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR fixes settings-toolbar alignment by removing a leftover preview-button margin and prevents an orphaned divider by using the same visibility condition as the settings button. Toolbar screenshots will need regeneration; settings-panel snapshots are unaffected.

File-Level Changes

Change Details Files
Remove the obsolete preview-button margin so the toolbar divider has symmetric spacing.
  • Delete the 2px horizontal margin override from the preview button styles.
packages/editor/src/bundle/settings/index.scss
Align divider rendering with the condition that controls the settings button.
  • Render the separator using areSettingsVisible instead of the truthiness of settingsVisible.
packages/editor/src/bundle/settings/index.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gravity-ui

gravity-ui Bot commented Sep 10, 2026

Copy link
Copy Markdown

Storybook Deployed

@gravity-ui

gravity-ui Bot commented Sep 10, 2026

Copy link
Copy Markdown

🎭 Playwright Report

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