Skip to content

Conversation

@yyassi-heartex
Copy link
Contributor

This pull request introduces improvements to the FilterDropdown and VariantSelect components in the web/libs/datamanager library. The changes enhance rendering flexibility, optimize performance using useMemo, and include a debugging log statement.

image

Enhancements to FilterDropdown:

  • Updated the optionRender fallback logic to provide a default rendering function for items when optionRender is not supplied. This ensures graceful handling of undefined or missing renderers. ([web/libs/datamanager/src/components/Filters/FilterDropdown.jsxL22-R24](https://github.com/HumanSignal/label-studio/pull/7477/files#diff-a4ff42c4402833e0664a026f4723495c29586c13b13260007626af77b054f4b6L22-R24))
  • Added a console.log statement to log the computed options for debugging purposes. ([web/libs/datamanager/src/components/Filters/FilterDropdown.jsxR44](https://github.com/HumanSignal/label-studio/pull/7477/files#diff-a4ff42c4402833e0664a026f4723495c29586c13b13260007626af77b054f4b6R44))

Optimizations in VariantSelect:

  • Replaced the immediate function for calculating selectedValue with a useMemo hook to improve performance by memoizing the computed value based on dependencies. ([web/libs/datamanager/src/components/Filters/types/List.jsxL13-R19](https://github.com/HumanSignal/label-studio/pull/7477/files#diff-a0ca81dca8c1f711a923db92ff91f83a7a6ddf736feeeaa5eaac67b2c651e9f8L13-R19))

Other changes:

  • Imported useMemo in List.jsx to support the new memoization logic. ([web/libs/datamanager/src/components/Filters/types/List.jsxR3](https://github.com/HumanSignal/label-studio/pull/7477/files#diff-a0ca81dca8c1f711a923db92ff91f83a7a6ddf736feeeaa5eaac67b2c651e9f8R3))

@yyassi-heartex yyassi-heartex requested a review from a team May 6, 2025 16:35
@netlify
Copy link

netlify bot commented May 6, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 6651e23
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-storybook/deploys/681a3adf3f1cf30008f19a99
😎 Deploy Preview https://deploy-preview-7477--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the fix label May 6, 2025
@netlify
Copy link

netlify bot commented May 6, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 6651e23
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/681a3adf8746b700082c3999

@netlify
Copy link

netlify bot commented May 6, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 6651e23
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/681a3adfa6d0d100089841bd

@yyassi-heartex yyassi-heartex merged commit e840faf into develop May 6, 2025
38 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-optic-2153/list-filter branch May 6, 2025 17:40
jombooth pushed a commit that referenced this pull request May 12, 2025
…d Model Version in Label Studio Projects (#7477)

Co-authored-by: bmartel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants