Skip to content

Conversation

knollengewaechs
Copy link
Contributor

@knollengewaechs knollengewaechs commented Feb 6, 2025

URL of deployed dev instance (used for testing):

Steps to test:

  • Open an annotation, activate floodfilling mode and check that the buttons in the toolbar are all aligned nicely

Issues:

  • fixes issue described here

(Please delete unneeded items, merge only when none are left open)

@knollengewaechs knollengewaechs self-assigned this Feb 6, 2025
Copy link
Contributor

coderabbitai bot commented Feb 6, 2025

📝 Walkthrough

Walkthrough

This update modifies the FloodFillSettings component in the toolbar view by adding a button that toggles the restriction of the flood fill operation to the bounding box. The button is styled with display: "inline-block" when the restriction is active, while its functionality remains linked to the toggleRestrictFloodfillToBoundingBox method. Additionally, the changelog has been updated to reflect this new button's alignment fix.

Changes

File Change Summary
frontend/.../toolbar_view.tsx Added a button in the FloodFillSettings component to toggle bounding box restriction for flood fill (styled as inline-block when enabled).
CHANGELOG.unreleased.md Updated changelog to include a fix for the alignment of the button that restricts flood fill operations to a bounding box.

Possibly related PRs

  • Fix regression in styling of skeleton and segment tree UI #8307: The changes in the main PR regarding the FloodFillSettings component's button styling are related to the enhancements made in this PR, which also addresses button styling for operations within a bounding box.
  • Release 25.01.0 #8346: The changes in the main PR modifying the FloodFillSettings component's button styling are related to this PR's updates on the "Restrict Floodfill" mode, as both involve functionality concerning flood fill operations.
  • Improve styling of buttons in toolbar & refactor CSS #8295: The changes in the main PR modifying the FloodFillSettings component's button styling are related to this PR as both involve enhancements to button styling within the toolbar context.

Suggested labels

frontend, css

Suggested reviewers

  • philippotto

Poem

I'm a rabbit coding with delight,
A new button hops into sight.
With inline styles, it takes its place,
Bounding box limits, a new embrace.
Here’s to changes, both fun and bright,
Let’s fill the world with colors, just right!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e54c4c and 9a9b7cc.

📒 Files selected for processing (2)
  • CHANGELOG.unreleased.md (1 hunks)
  • frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.unreleased.md
  • frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (1)

1381-1386: Consider extracting the button style to a constant.

For better maintainability and consistency with other styles in the file (like NARROW_BUTTON_STYLE), consider extracting the button's style object to a constant.

+const FLOOD_FILL_BUTTON_STYLE = {
+  opacity: 0.5,
+  marginLeft: 12,
+  display: "inline-block",
+};

 <ButtonComponent
-  style={{
-    opacity: isRestrictedToBoundingBox ? 1 : 0.5,
-    marginLeft: 12,
-    display: "inline-block",
-  }}
+  style={{
+    ...FLOOD_FILL_BUTTON_STYLE,
+    opacity: isRestrictedToBoundingBox ? 1 : 0.5,
+  }}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5447c6e and 8cd02e6.

📒 Files selected for processing (1)
  • frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: circleci_build
🔇 Additional comments (1)
frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx (1)

1384-1384: LGTM! The display style fix improves button alignment.

The change to use display: "inline-block" ensures proper alignment of the "Restrict Bounding Box" button within the toolbar.

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

💯

@knollengewaechs knollengewaechs enabled auto-merge (squash) February 25, 2025 09:24
@knollengewaechs knollengewaechs merged commit c09afa9 into master Feb 25, 2025
3 checks passed
@knollengewaechs knollengewaechs deleted the align-restrict-bbox-button branch February 25, 2025 09:46
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.

2 participants