-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Biz/dj 2837 show label and keep selected remote option dropdown enabled #15438
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Biz/dj 2837 show label and keep selected remote option dropdown enabled #15438
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request introduces version Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/connect-react/src/hooks/form-context.tsx (1)
257-261
: Consider memoizing _configuredProps to prevent unnecessary updates.While the new effect correctly fixes the remote option reloading issue, frequent updates to _configuredProps could trigger unnecessary recalculations of queryDisabledIdx.
Consider using useMemo to optimize the dependency:
+ const memoizedConfiguredProps = useMemo(() => _configuredProps, [JSON.stringify(_configuredProps)]); useEffect(() => { - updateConfiguredPropsQueryDisabledIdx(_configuredProps) + updateConfiguredPropsQueryDisabledIdx(memoizedConfiguredProps) }, [ - _configuredProps, + memoizedConfiguredProps, ]);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/connect-react/CHANGELOG.md
(1 hunks)packages/connect-react/package.json
(1 hunks)packages/connect-react/src/components/ControlSelect.tsx
(1 hunks)packages/connect-react/src/hooks/form-context.tsx
(1 hunks)packages/connect-react/src/utils/component.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/connect-react/package.json
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
🔇 Additional comments (3)
packages/connect-react/src/components/ControlSelect.tsx (1)
178-183
: LGTM! The changes improve the handling of selected options.The simplified logic correctly preserves label information for both single and multi-select cases, which aligns with the changelog entry about showing prop labels instead of values.
packages/connect-react/src/utils/component.ts (1)
43-45
: LGTM! The new condition handles labeled values correctly.The added check properly extracts values from objects with the
__lv
property, complementing the changes in ControlSelect.tsx for consistent handling of labeled values.packages/connect-react/CHANGELOG.md (1)
4-8
: LGTM! Changelog entries accurately reflect the code changes.The entries clearly document both the UI improvement (showing prop labels) and the bug fix (remote option reloading), which align with the code changes in ControlSelect.tsx and form-context.tsx.
const vs = []; | ||
for (const _o of o) { | ||
if (prop.withLabel) { | ||
vs.push(_o); | ||
} else { | ||
vs.push(_o.value); | ||
} | ||
} | ||
onChange(vs); | ||
} else { | ||
onChange(o); | ||
} | ||
} else if (typeof o === "object" && "value" in o) { | ||
if (prop.withLabel) { |
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.
We should not be handling withLabel
here. It's handled here All configured props should have { __lv: { label: "", value: "" } } shape.
WHY
Summary by CodeRabbit
Release Notes for @pipedream/connect-react v1.0.0-preview.25
New Features
Bug Fixes
Performance