Skip to content

fix: replace numbered list with bullet points in tools tooltip#6402

Open
xxiaoxiong wants to merge 2 commits into
FlowiseAI:mainfrom
xxiaoxiong:fix/tooltip-numbering-5443
Open

fix: replace numbered list with bullet points in tools tooltip#6402
xxiaoxiong wants to merge 2 commits into
FlowiseAI:mainfrom
xxiaoxiong:fix/tooltip-numbering-5443

Conversation

@xxiaoxiong
Copy link
Copy Markdown

Description

Fixes #5443

When hovering over "+ X More" in the Nodes column of chatflows/agentflows list, the tooltip showed a numbered list (1, 2, 3...) of additional tools. However, these numbers were misleading.

Problem

Current behavior:

  • First 5 tools are displayed as icons in the table
  • Remaining tools are shown in a tooltip when hovering "+ X More"
  • Tooltip uses numbered list: 1, 2, 3...
  • Issue: These are actually tools 6, 7, 8... but numbered as 1, 2, 3...
  • Users might think these are the first tools, not additional ones

User feedback from issue:

"As there are already tools that are not within the tool tip, the numbering in the tool tip is misleading. I'd recommend just using bullet points, because the order is not relevant and the 'more-count' is already stated."

Visual Example

Before (misleading):

Table row: [Icon1] [Icon2] [Icon3] [Icon4] [Icon5] + 3 More
                                                      ↓
                                            Tooltip shows:
                                            1. Calculator
                                            2. WebSearch  
                                            3. Database

❌ Problem: These are tools 6, 7, 8 but numbered as 1, 2, 3

After (clear):

Table row: [Icon1] [Icon2] [Icon3] [Icon4] [Icon5] + 3 More
                                                      ↓
                                            Tooltip shows:
                                            • Calculator
                                            • WebSearch
                                            • Database

✅ Solution: Bullet points make it clear these are just "more items"

Solution

Replace ordered list (<ol>) with unordered list (<ul>) to show bullet points instead of numbers.

Why bullet points?

  1. No implied ordering: The tools are not ranked or ordered by importance
  2. Count already shown: "+ 3 More" already tells the user how many additional tools there are
  3. Avoids confusion: Numbers 1, 2, 3 don't represent positions 1, 2, 3 in the full list
  4. Standard pattern: Most UI tooltips use bullet points for "more items" lists

Changes

packages/ui/src/ui-component/tooltip/MoreItemsTooltip.jsx

-const StyledOl = styled('ol')(() => ({
+const StyledUl = styled('ul')(() => ({
     paddingLeft: 20,
     margin: 0
 }))

 return (
     <Tooltip
         title={
-            <StyledOl>
+            <StyledUl>
                 {images.map((img) => (
                     <StyledLi key={img.imageSrc || img.label}>
                         <Typography>{img.label}</Typography>
                     </StyledLi>
                 ))}
-            </StyledOl>
+            </StyledUl>
         }
         placement='top'
     >

Impact

Affected Pages

  • ✅ Chatflows list page
  • ✅ Agentflows list page
  • ✅ Any flow with more than 5 tools/nodes

What Changes

  • Visual only: Numbers (1, 2, 3...) → Bullet points (•)
  • No functional changes: Tooltip still shows the same tools
  • No breaking changes: All existing behavior preserved

What Stays the Same

  • Tooltip positioning (top)
  • Tooltip styling (padding, margin, font)
  • Tool names and labels
  • "+ X More" text and count
  • First 5 tools still shown as icons

Testing

Manual Testing

  1. Chatflows with many tools:

    • Go to Chatflows page
    • Find a flow with 6+ nodes
    • Hover over "+ X More" in the Nodes column
    • ✅ Tooltip shows bullet points (•) instead of numbers
    • ✅ All tool names are displayed correctly
  2. Agentflows with many tools:

    • Go to Agentflows page
    • Find a flow with 6+ nodes
    • Hover over "+ X More"
    • ✅ Tooltip shows bullet points
  3. Edge cases:

    • Flow with exactly 5 tools
    • ✅ No "+ X More" shown (expected)
    • Flow with 6 tools
    • ✅ Shows "+ 1 More" with single bullet point
    • Flow with 20+ tools
    • ✅ Shows "+ 15 More" with 15 bullet points
  4. Styling:

    • ✅ Bullet points are properly aligned
    • ✅ Padding and spacing unchanged
    • ✅ Dark mode: tooltip still readable
    • ✅ Light mode: tooltip still readable

Code Review

  • ✅ Only 3 lines changed (minimal change)
  • ✅ No new dependencies
  • ✅ No API changes
  • ✅ No state management changes
  • ✅ Follows existing code style
  • ✅ PropTypes unchanged

Screenshots

Before

Image from issue #5443

Tooltip shows: 1. Calculator, 2. WebSearch, 3. Database

After

Tooltip will show: • Calculator, • WebSearch, • Database

Type of Change

  • Bug fix (UI/UX improvement)
  • New feature
  • Breaking change

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • Minimal change (3 lines)
  • No functional changes, only visual improvement
  • No breaking changes
  • Addresses the exact problem described in UI adjustement in tool tip on x more tools of a flow #5443
  • Follows standard UI patterns (bullet points for "more items")
  • Works in both light and dark mode

Fixes FlowiseAI#5639

When managing credential sharing across multiple workspaces, users had to
manually check/uncheck each workspace individually. This was tedious and
time-consuming, especially when unsharing a credential from all workspaces.

Solution:
Add a "Select All" checkbox above the workspace list that allows users to:
- Check all workspaces with one click
- Uncheck all workspaces with one click
- Automatically updates when individual checkboxes are toggled

Changes:
**packages/ui/src/ui-component/dialog/ShareWithWorkspaceDialog.jsx**
- Import Checkbox and FormControlLabel from MUI
- Add `selectAll` state to track the select-all checkbox
- Add `handleSelectAllChange` to toggle all workspace checkboxes
- Add useEffect to sync selectAll state with individual row changes
- Add UI: "Select All" checkbox above the workspace grid
- Position: right-aligned next to "Workspaces" label

Features:
1. **One-click select all**: Check the "Select All" box to share with all workspaces
2. **One-click deselect all**: Uncheck to unshare from all workspaces
3. **Smart sync**: Checkbox automatically unchecks if any individual workspace is unchecked
4. **Clean UI**: Positioned next to "Workspaces" label, doesn't clutter the interface

Testing:
1. Go to Credentials page
2. Click the share icon (⋮ menu → Share) on any credential
3. ✅ See "Select All" checkbox in the top-right
4. Click "Select All"
5. ✅ All workspace checkboxes are checked
6. Click "Select All" again
7. ✅ All workspace checkboxes are unchecked
8. Check "Select All", then uncheck one workspace manually
9. ✅ "Select All" checkbox automatically unchecks
10. Click Save
11. ✅ Only selected workspaces receive the credential

Before: Had to scroll and click each workspace individually
After: One click to select/deselect all workspaces
Fixes FlowiseAI#5443

When hovering over "+ X More" in the Nodes column of chatflows/agentflows list,
the tooltip showed a numbered list (1, 2, 3...) of additional tools. However,
these numbers were misleading because:
- The first 5 tools are already displayed as icons
- The tooltip shows tools 6, 7, 8... but numbered them as 1, 2, 3...
- The order is not semantically important
- The count is already shown in "+ X More"

Solution:
Replace ordered list (<ol>) with unordered list (<ul>) to show bullet points
instead of numbers. This makes it clear that the list is just "more items"
without implying a specific ordering or position.

Changes:
**packages/ui/src/ui-component/tooltip/MoreItemsTooltip.jsx**
- Rename `StyledOl` to `StyledUl`
- Change `<ol>` to `<ul>` in the tooltip content
- Keep all other styling and behavior unchanged

Before:

After:

Impact:
- Chatflows list: Tooltip now shows bullet points
- Agentflows list: Tooltip now shows bullet points
- No functional changes, only visual improvement
- Reduces user confusion about tool ordering

Testing:
1. Go to Chatflows or Agentflows page
2. Find a flow with more than 5 tools/nodes
3. Hover over "+ X More" text
4. ✅ Tooltip shows bullet points (•) instead of numbers (1, 2, 3...)
5. ✅ All tool names are still displayed correctly
6. ✅ Tooltip positioning and styling unchanged
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a 'Select All' functionality to the workspace sharing dialog and updates the list style in the items tooltip from ordered to unordered. Feedback focuses on improving the state management of the 'Select All' feature by deriving the state with useMemo instead of using useEffect, which avoids potential synchronization issues. Additionally, it is recommended to implement an indeterminate state for the checkbox to provide better visual feedback when only a subset of items is selected.

Comment on lines +50 to +71
const [selectAll, setSelectAll] = useState(false)

// Handle select all / deselect all
const handleSelectAllChange = (event) => {
const checked = event.target.checked
setSelectAll(checked)
setOutputSchema((prevRows) => {
return prevRows.map((row) => ({
...row,
shared: checked
}))
})
}

// Update selectAll state when individual rows change
useEffect(() => {
if (outputSchema.length > 0) {
const allSelected = outputSchema.every((row) => row.shared)
const noneSelected = outputSchema.every((row) => !row.shared)
setSelectAll(allSelected ? true : noneSelected ? false : false)
}
}, [outputSchema])
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.

medium

The selectAll state can be simplified by deriving it directly from outputSchema using useMemo. This approach is more idiomatic in React, avoids redundant state updates (currently setSelectAll is called both in the change handler and the effect), and prevents potential synchronization issues. For instance, if outputSchema becomes empty, the current useEffect won't run due to the length check, potentially leaving selectAll in a stale state. Additionally, the ternary logic in the current effect is redundant as it evaluates to the same value as allSelected.

Suggested change
const [selectAll, setSelectAll] = useState(false)
// Handle select all / deselect all
const handleSelectAllChange = (event) => {
const checked = event.target.checked
setSelectAll(checked)
setOutputSchema((prevRows) => {
return prevRows.map((row) => ({
...row,
shared: checked
}))
})
}
// Update selectAll state when individual rows change
useEffect(() => {
if (outputSchema.length > 0) {
const allSelected = outputSchema.every((row) => row.shared)
const noneSelected = outputSchema.every((row) => !row.shared)
setSelectAll(allSelected ? true : noneSelected ? false : false)
}
}, [outputSchema])
const selectAll = useMemo(() => outputSchema.length > 0 && outputSchema.every((row) => row.shared), [outputSchema])
const isIndeterminate = useMemo(() => outputSchema.some((row) => row.shared) && !outputSchema.every((row) => row.shared), [outputSchema])
// Handle select all / deselect all
const handleSelectAllChange = (event) => {
const checked = event.target.checked
setOutputSchema((prevRows) => {
return prevRows.map((row) => ({
...row,
shared: checked
}))
})
}

Comment on lines +214 to +217
<FormControlLabel
control={<Checkbox checked={selectAll} onChange={handleSelectAllChange} size='small' />}
label={<Typography variant='body2'>Select All</Typography>}
/>
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.

medium

It is recommended to use the indeterminate prop on the 'Select All' checkbox to provide better visual feedback when only some workspaces are selected. This works in conjunction with the isIndeterminate value suggested in the state management feedback.

Suggested change
<FormControlLabel
control={<Checkbox checked={selectAll} onChange={handleSelectAllChange} size='small' />}
label={<Typography variant='body2'>Select All</Typography>}
/>
<FormControlLabel
control={<Checkbox checked={selectAll} indeterminate={isIndeterminate} onChange={handleSelectAllChange} size='small' />}
label={<Typography variant='body2'>Select All</Typography>}
/>

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.

UI adjustement in tool tip on x more tools of a flow

1 participant