-
Notifications
You must be signed in to change notification settings - Fork 817
feat: Add missing configurations in app builder #6922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ames with other components
Deploying windmill with
|
| Latest commit: |
6757825
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7144ff50.windmill.pages.dev |
| Branch Preview URL: | https://tl-app-builder.windmill.pages.dev |
|
Claude finished @tristantr's task —— View job PR Review CompleteI've completed a comprehensive review of PR #6922: "feat: Add missing configurations in app builder" 📊 SummaryThis PR adds tooltip functionality to Tab components and Modal buttons in the app builder, aligning configuration names across components. The implementation follows the existing patterns in the codebase and adds a consistent tooltip feature across multiple component types. Changed Files: 8 files ✅ Positive Aspects
🐛 Issues Found & RecommendationsCritical Issues:1. Accessibility Problem in Tab.svelte (frontend/src/lib/components/common/tabs/Tab.svelte:63-66)
High Priority:2. Code Duplication in AppTabs.svelte
3. Inconsistent Tooltip Application in AppModal.svelte
Medium Priority:4. Uninitialized State Array
5. Empty String Default
🔍 Code Quality ObservationsSvelte 5 Best Practices:
Performance:
Type Safety:
🔒 Security ImplicationsNo security concerns identified. The tooltip content is:
⚡ Performance ConsiderationsNo significant performance concerns. The implementation:
🧪 Testing RecommendationsTo verify this implementation works correctly, test:
📝 Reproduction Instructions for TestersTo test the changes added in this PR, navigate to the Windmill app builder and create or edit an app. Add a Tabs component to your app canvas. In the component settings panel on the right side, you'll see a new "Tooltips" configuration option for each tab alongside the existing "Disabled" and "Hidden" toggles. Enter tooltip text for one or more tabs, then preview the app - when you hover over the tab headers, the configured tooltips should appear. Similarly, add a Modal component to your app, and you'll find a new tooltip configuration field in its settings. Set a tooltip value and preview the app to verify that hovering over the modal's trigger button displays the tooltip. Test both static text and dynamic/eval-based tooltip values to ensure the feature works with all input types. 🎯 Final RecommendationApprove with minor changes recommended. This is a solid implementation that adds useful functionality. The main issues are:
These can be addressed in follow-up commits or accepted as-is with a follow-up issue created. Review completed by Claude Code |
| render: boolean | ||
| disabledTabs: RichConfiguration[] | ||
| hiddenTabs: RichConfiguration[] | ||
| tooltipTabs: RichConfiguration[] | undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type Annotation Missing: The tooltipTabs prop should have a more specific type annotation. Consider using RichConfiguration[] | undefined consistently with other similar props like disabledTabs and hiddenTabs for better type safety.
| label={res} | ||
| tooltip={resolvedTooltipTabs[index] && String(resolvedTooltipTabs[index]).length > 0 | ||
| ? String(resolvedTooltipTabs[index]) | ||
| : undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Duplication: This tooltip rendering logic is duplicated in three places (lines 238-240, 258-260, 298-300). Consider extracting this into a helper function or derived variable to follow DRY principles:
{#snippet tooltipRenderer(index)}
{resolvedTooltipTabs[index] && String(resolvedTooltipTabs[index]).length > 0
? String(resolvedTooltipTabs[index])
: undefined}
{/snippet}Then use: title={@render tooltipRenderer(index)}
| let resolvedDisabledTabs: boolean[] = $state([]) | ||
| let resolvedHiddenTabs: boolean[] = $state([]) | ||
| let resolvedTooltipTabs: string[] = $state([]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential Performance Issue: This state variable resolvedTooltipTabs is initialized as an empty array but is populated via InputValue components. Consider initializing it with proper default values based on tooltipTabs length to avoid potential index access issues during initial render.
| class="inline-flex" | ||
| title={resolvedConfig.tooltip && String(resolvedConfig.tooltip).length > 0 | ||
| ? String(resolvedConfig.tooltip) | ||
| : undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent Pattern: The tooltip logic here differs from the Tab component. In AppModal, the tooltip is on a wrapper div, but the button is inside. This creates an extra wrapper element. Consider applying the title attribute directly to the Button component (if it supports it) for consistency and to avoid unnecessary DOM nesting.
| <div | ||
| title={tooltip} | ||
| class="inline-block" | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility Concern: Wrapping the button in a separate div just for the tooltip breaks some accessibility patterns. The title attribute should be on the interactive element (the button) itself, not on a wrapper div. This ensures screen readers and keyboard navigation work correctly.
Suggested fix:
<button
use:triggerableByAI={{...}}
...
>Remove the outer <div>.
| disabledTabs = [...(disabledTabs ?? []), { type: 'static', value: false, fieldType: 'boolean' }] | ||
| hiddenTabs = [...(hiddenTabs ?? []), { type: 'static', value: false, fieldType: 'boolean' }] | ||
| tooltipTabs = [...(tooltipTabs ?? []), { type: 'static', value: '', fieldType: 'text' }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialization Issue: When adding a new tab, the tooltip is initialized with an empty string ''. Consider using a more descriptive default or undefined to be consistent with other optional configurations. An empty string could cause unnecessary rendering of empty tooltip attributes.
…ames with other components