Skip to content

fix: adds add button visibility condition on ListSelectionComponent#8646

Merged
lucaseduoli merged 1 commit into
mainfrom
fix/plus_on_selector
Jun 20, 2025
Merged

fix: adds add button visibility condition on ListSelectionComponent#8646
lucaseduoli merged 1 commit into
mainfrom
fix/plus_on_selector

Conversation

@lucaseduoli
Copy link
Copy Markdown
Collaborator

@lucaseduoli lucaseduoli commented Jun 20, 2025

Ensure the add button only appears when the onAddButtonClick function is defined, improving the component's usability.

Summary by CodeRabbit

  • Style

    • Adjusted vertical spacing in the scrollable list by removing bottom padding.
  • Bug Fixes

    • The "Add" button in the dialog footer is now only shown when available, preventing it from appearing without functionality.

@lucaseduoli lucaseduoli self-assigned this Jun 20, 2025
@lucaseduoli lucaseduoli enabled auto-merge June 20, 2025 13:50
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 20, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

Walkthrough

The update modifies the scrollable list container by removing its bottom padding and changes the rendering logic for the "Add" button, ensuring it only appears when an onAddButtonClick prop is provided. No changes were made to exported or public entity declarations.

Changes

File Change Summary
src/frontend/src/CustomNodes/GenericNode/components/ListSelectionComponent/index.tsx Removed bottom padding from list container; "Add" button now conditionally rendered by prop presence

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ListSelectionComponent

    User->>ListSelectionComponent: Open dialog
    alt onAddButtonClick prop is provided
        ListSelectionComponent-->>User: Render "Add" button
        User->>ListSelectionComponent: Click "Add"
        ListSelectionComponent->>ListSelectionComponent: Call onAddButtonClick handler
    else onAddButtonClick prop is not provided
        ListSelectionComponent-->>User: Do not render "Add" button
    end
Loading

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1c57d9 and 06a0fe3.

📒 Files selected for processing (1)
  • src/frontend/src/CustomNodes/GenericNode/components/ListSelectionComponent/index.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: autofix
🔇 Additional comments (2)
src/frontend/src/CustomNodes/GenericNode/components/ListSelectionComponent/index.tsx (2)

215-215: LGTM! Improved spacing consistency.

Removing the bottom padding from the list container makes sense as the DialogFooter now handles the spacing below the list, creating better visual consistency.


252-261: Perfect implementation of conditional button visibility.

The conditional rendering logic correctly prevents the Add button from appearing when no click handler is provided, which improves the component's usability and aligns perfectly with the PR objectives.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch fix/plus_on_selector

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @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.

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.

@dosubot dosubot Bot added the bug Something isn't working label Jun 20, 2025
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 20, 2025
Copy link
Copy Markdown
Member

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 20, 2025
@lucaseduoli lucaseduoli added this pull request to the merge queue Jun 20, 2025
Merged via the queue into main with commit 0ea3a50 Jun 20, 2025
70 of 72 checks passed
@lucaseduoli lucaseduoli deleted the fix/plus_on_selector branch June 20, 2025 15:24
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants