-
Notifications
You must be signed in to change notification settings - Fork 689
new select component #5839
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?
new select component #5839
Conversation
Deploying windmill with
|
Latest commit: |
dff1f24
|
Status: | ✅ Deploy successful! |
Preview URL: | https://b60613d4.windmill.pages.dev |
Branch Preview URL: | https://di-new-select-component.windmill.pages.dev |
bind:value={ | ||
() => scriptPath ?? initialPath, | ||
(path) => { | ||
scriptPath = path | ||
dispatch('select', { path, itemKind }) | ||
} | ||
}} | ||
bind:justValue={scriptPath} | ||
} | ||
class="grow shrink max-w-full" | ||
{items} |
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.
The disablePortal
property should be added to maintain the same behavior as the previous implementation. The old code used portal={false}
, and the new Select
component needs the equivalent disablePortal
property to ensure consistent rendering behavior.
bind:value={
() => scriptPath ?? initialPath,
(path) => {
scriptPath = path
dispatch('select', { path, itemKind })
}
}
class="grow shrink max-w-full"
disablePortal
{items}
bind:value={ | |
() => scriptPath ?? initialPath, | |
(path) => { | |
scriptPath = path | |
dispatch('select', { path, itemKind }) | |
} | |
}} | |
bind:justValue={scriptPath} | |
} | |
class="grow shrink max-w-full" | |
{items} | |
bind:value={ | |
() => scriptPath ?? initialPath, | |
(path) => { | |
scriptPath = path | |
dispatch('select', { path, itemKind }) | |
} | |
} | |
class="grow shrink max-w-full" | |
disablePortal | |
{items} |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
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.
Caution
Changes requested ❌
Reviewed everything up to dff1f24 in 3 minutes and 4 seconds. Click for details.
- Reviewed
1868
lines of code in26
files - Skipped
0
files when reviewing. - Skipped posting
18
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/utils.ts:628
- Draft comment:
There's an extra closing brace in the custom plural case of pluralize. It returns${quantity} ${customPlural}}
- consider removing the extra '}'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. frontend/src/lib/components/Select.svelte:178
- Draft comment:
The binding on the input value uses a lambda getter/setter:bind:value={() => filterText, (v) => (filterText = v)}
. Verify that this syntax works with your custom reactive helpers; it might be simpler and clearer to use a direct binding if possible. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The code uses custom reactive primitives throughout ($state, $effect, etc). The binding syntax looks unusual but may be intentionally using this pattern to work with these custom primitives. Looking at lines 55-60, there's complex two-way binding logic with _filterTextBind that suggests this component needs fine control over its bindings. The author likely had a specific reason for using this syntax. I could be wrong about the custom reactive system requiring this syntax - maybe a simpler binding would work just as well. The author could have overcomplicated it. Given the consistent use of custom reactive primitives and the complex binding requirements shown elsewhere in the code, this syntax is more likely intentional than accidental. The comment should be deleted as it questions working code without strong evidence that the simpler syntax would actually work with these custom reactive primitives.
3. frontend/src/lib/components/DynSelect.svelte:5
- Draft comment:
Switching to using SelectLegacy for dynamic selects appears intentional; ensure that any legacy behavior still required is maintained. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to ensure that legacy behavior is maintained, which violates the rule against asking the author to ensure behavior is intended or tested. It doesn't provide a specific suggestion or point out a specific issue.
4. frontend/src/lib/components/DBTableEditor.svelte:156
- Draft comment:
Binding the Select for column types now uses a getter/setter lambda. Verify that updates tocolumn.datatype
properly trigger downstream reactivity. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify that updates tocolumn.datatype
properly trigger downstream reactivity. This falls under the category of asking the author to ensure behavior is intended or to double-check things, which is against the rules.
5. frontend/src/lib/components/TeamSelector.svelte:72
- Draft comment:
TeamSelector now binds the selected team via a lambda that finds the team by id. Confirm that it gracefully handles cases when no team matches. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the author to confirm that a specific behavior is handled correctly. It is not making a specific code suggestion or pointing out a specific issue. It violates the rule against asking the author to confirm their intention or ensure behavior.
6. frontend/src/lib/components/LightweightResourcePicker.svelte:167
- Draft comment:
Check that the new binding for the resource select correctly maps to the value and updates valueSelect. The use ofportal
(or its omission) appears intentional. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to check if the new binding for the resource select is correctly mapping to the value and updatingvalueSelect
. It is essentially asking the author to double-check their work, which violates the rule against asking the author to confirm or ensure behavior. Therefore, this comment should be removed.
7. frontend/src/lib/components/ScriptPicker.svelte:97
- Draft comment:
The binding on value for ScriptPicker uses a lambda getter/setter. Ensure that dispatching the 'select' event along with updatingscriptPath
meets your requirements. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to ensure that the behavior is intended, which violates the rules. It does not provide a specific suggestion or ask for a specific test to be written. Therefore, it should be removed.
8. frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte:144
- Draft comment:
Select is now bound with a lambda to topic_id and triggers loading of subscriptions afterward. Confirm that the topic change reliably triggers the subscriptions refresh. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to confirm that a change reliably triggers a specific behavior. This falls under the rule of not asking the author to confirm or ensure behavior, which is not allowed.
9. frontend/src/lib/components/triggers/postgres/PublicationPicker.svelte:99
- Draft comment:
Bindings and mapping items to objects for the new Select component look correct. Verify that clearable and disablePortal props work as expected. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to verify the behavior of certain props, which violates the rule against asking for confirmation or verification of intended behavior. It does not provide a specific suggestion or point out a specific issue.
10. frontend/src/lib/components/triggers/postgres/SlotPicker.svelte:75
- Draft comment:
The integration with the new Select for slot picking appears smooth. Double-check that the filtering and deletion logic works correctly. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to double-check the logic, which violates the rule against asking for confirmation or verification of behavior.
11. frontend/src/lib/components/wizards/AppPicker.svelte:47
- Draft comment:
AppPicker now uses SelectLegacy – ensure that legacy behavior is preserved for app selection. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to ensure that legacy behavior is preserved, which violates the rule against asking the author to ensure behavior is intended or tested. It does not provide a specific suggestion or point out a specific issue.
12. frontend/src/lib/components/common/CloseButton.svelte:25
- Draft comment:
The CloseButton component now merges classes using twMerge and looks clean. No issues noted. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply praises the change without offering any constructive criticism or questions.
13. frontend/src/lib/components/raw_apps/RawAppEditor.svelte:38
- Draft comment:
The version export is now const; confirm that making version immutable matches your intended design. - Reason this comment was not posted:
Comment looked like it was already resolved.
14. frontend/src/lib/components/triggers/postgres/PublicationPicker.svelte:30
- Draft comment:
PublicationPicker now maps publications to objects with {value} format; ensure that any downstream usage interprets these correctly. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
15. frontend/src/lib/components/triggers/postgres/SlotPicker.svelte:78
- Draft comment:
The slot picker now uses new Select with clearable and disablePortal props. Verify that the replication slot deletion logic triggers the expected UI updates. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify that the replication slot deletion logic triggers the expected UI updates. This falls under asking the author to ensure behavior is intended or tested, which is against the rules.
16. frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte:143
- Draft comment:
The GCP trigger editor now uses the new Select component for topic selection. Confirm that loading states (loadingTopic / loadingSubscription) are correctly toggled. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to confirm that the loading states are correctly toggled, which violates the rule against asking the author to confirm their intention or ensure behavior. It does not provide a specific suggestion or point out a specific issue.
17. frontend/src/lib/utils.ts:1150
- Draft comment:
In the pluralize function, consider also checking for pluralizing rules beyond appending an 's' if needed. (This is more a suggestion than a bug.) - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
18. frontend/src/lib/components/DBTableEditor.svelte:274
- Draft comment:
Typo noticed in the comment: 'from x-overflowing' might be unintended. Consider revising it to 'from overflowing' or clarifying if it meant 'horizontally overflowing'. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The "x-" prefix appears to be an intentional way to specify horizontal overflow, similar to how "x-axis" is commonly used. The comment is suggesting a change to something that isn't actually wrong. Additionally, comments about documentation/comments are generally not critical enough to warrant review comments unless they are severely misleading. Could the "x-" prefix be confusing to other developers? Is there a more standard way to indicate horizontal overflow in comments? While there might be other ways to phrase it, the current comment is clear enough and the "x-" prefix is a commonly understood shorthand. This doesn't rise to the level of needing a review comment. Delete this comment. It's suggesting a change to something that isn't wrong, and comments about documentation rarely warrant review comments unless they are severely misleading.
Workflow ID: wflow_xpVHVoW9J09GRelr
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
/> | ||
</div> | ||
|
||
{#if showRefreshButton} | ||
<button | ||
on:click={loadTeams} | ||
onclick={loadTeams} |
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.
Typographical issue: The attribute onclick
is used on the <button>
element. In Svelte, event bindings should use on:click
instead of onclick
to ensure proper event handling. Please update this accordingly.
onclick={loadTeams} | |
on:click={loadTeams} |
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.
not related to my pr
Replace old Select component which was a copy of svelte-select (and previously responsible for infinite loops after svelte 5 migration) with a much simpler one
Important
Replaces old
Select
component with a new, simpler version across the codebase, improving performance and avoiding previous issues.Select
component with a new, simpler version inSelect.svelte
.svelte-select
component.ChannelSelector.svelte
,ConnectionSection.svelte
,CronInput.svelte
to use newSelect
.Select
withSelectLegacy
inDynSelect.svelte
,AppPicker.svelte
for legacy support.DarkModeObserver
from components likeDBTableEditor.svelte
,LightweightResourcePicker.svelte
.clickOutside
utility inutils.ts
to support newSelect
behavior.CloseButton.svelte
to align with newSelect
component design.This description was created by
for dff1f24. You can customize this summary. It will automatically update as commits are pushed.