Skip to content

Conversation

@jaaydenh
Copy link
Contributor

Screenshot 2025-12-13 at 18 39 30

@jaaydenh jaaydenh self-assigned this Dec 13, 2025
@jaaydenh jaaydenh requested a review from aslilac December 15, 2025 20:34
className="w-[var(--radix-popover-trigger-width)] p-0"
align="start"
>
<Command shouldFilter={controlledInputValue === undefined}>
Copy link
Member

Choose a reason for hiding this comment

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

how would this react to "" as a value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

empty string is still considered a controlled input value so shouldFilter will be false and it will be assumed the options provided by the parent component have already been filtered

* Type guard to check if the value is a Group.
* Groups have a "members" property that users don't have.
*/
export const isGroup = (
Copy link
Member

Choose a reason for hiding this comment

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

big fan of isolating this logic, but maybe modules/groups/ or something could be a better spot? I'm not a fan of adding new code to utils/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the entire groups.ts file to modules/groups.ts, if we are moving away from the utils folder, we should decide on a pattern and document it in the frontend contributing guide. Should the rule be that code that is shared across multiple sub-folders in the pages directory should live in the root of modules instead of utils?

Copy link
Member

Choose a reason for hiding this comment

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

I like to think of organizing more in terms of "what problem the code solves" rather than "what the code is". sure, it might be a utility function, but it's a utility function that is related to how our sharing implementation works for templates and workspaces.

I think documenting that is a good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like having a groups file contain all of the groups related helpers even if they are helping solve different problems. I think it would make more sense to split into separate files if for example there were 3 related helpers solving 1 specific problem.

@jaaydenh jaaydenh merged commit 5092645 into main Dec 16, 2025
31 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/autocomplete-component branch December 16, 2025 21:15
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants