Skip to content

Conversation

@yyassi-heartex
Copy link
Contributor

@yyassi-heartex yyassi-heartex commented Apr 23, 2025

This pull request introduces several updates across the CreateProject page and the Select component, focusing on improving functionality, user experience, and code maintainability. The most significant changes include adding a new selectFirstIfEmpty prop to the Select component, updating styles and behavior for the CreateProject page, and renaming a prop for clarity.

Updates to the Select component:

  • Added a new selectFirstIfEmpty prop to automatically select the first option if no initial value is provided. This includes updates to the logic for determining the initial value and handling state changes (web/libs/ui/src/lib/select/select.tsx). [1] [2] [3]
  • Renamed the isInProgress prop to isLoading for better clarity and consistency (web/libs/ui/src/lib/select/types.ts).
  • Removed unused CSS classes related to group headings in the Option component to simplify styles (web/libs/ui/src/lib/select/select.tsx).

Updates to the CreateProject page:

  • Adjusted the Caption element to display as a block for better layout control (web/apps/labelstudio/src/pages/CreateProject/CreateProject.scss).
  • Minor text adjustment in the Caption element to ensure proper spacing in the rendered output (web/apps/labelstudio/src/pages/CreateProject/CreateProject.jsx).

@github-actions github-actions bot added the fix label Apr 23, 2025
@netlify
Copy link

netlify bot commented Apr 23, 2025

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

Name Link
🔨 Latest commit 1164b13
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/680f508e6eb1980009e290fa

@netlify
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 1164b13
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-storybook/deploys/680f508edbf830000899a7cb

@netlify
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 1164b13
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/680f508ea4ec170008424e53

@yyassi-heartex yyassi-heartex requested review from a team, bmartel and nick-skriabin April 23, 2025 17:21
Co-authored-by: bmartel <brandonmartel@gmail.com>
@borisheartex
Copy link
Contributor

borisheartex commented Apr 24, 2025

/fm sync

Workflow run

@nass600
Copy link
Contributor

nass600 commented Apr 24, 2025

@yyassi-heartex Shouldn't selectFirstIfEmpty functionality be handled by the caller? Do we have many cases where this happens so it deserves a prop?

@yyassi-heartex
Copy link
Contributor Author

@yyassi-heartex Shouldn't selectFirstIfEmpty functionality be handled by the caller? Do we have many cases where this happens so it deserves a prop?

yeah this is needed in LSE ModelVersionSelector - there is a very specific use case where it relies on the first option being selected if no value is provided

@bmartel
Copy link
Contributor

bmartel commented Apr 24, 2025

@yyassi-heartex I was going to ask the same question as @nass600, because we really don't want to bake in a functionality that is necessitated by a bad upstream implementation, if anything we would handle that at the location site of the Select and not force Select to have domain specific implementation details.

@yyassi-heartex yyassi-heartex requested a review from bmartel April 24, 2025 16:52
@yyassi-heartex
Copy link
Contributor Author

@nass600 @bmartel take another look - i moved away from the selectFirstOption prop - leveraging defaultValue instead - let me know your thoughts

@yyassi-heartex
Copy link
Contributor Author

yyassi-heartex commented Apr 24, 2025

/git merge

Workflow run
Successfully merged: 2 files changed, 30 insertions(+), 4 deletions(-)

@borisheartex
Copy link
Contributor

borisheartex commented Apr 25, 2025

/fm sync

Workflow run

@borisheartex
Copy link
Contributor

borisheartex commented Apr 28, 2025

/fm sync

Workflow run

@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.40%. Comparing base (665f1b5) to head (1164b13).
Report is 11 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7415   +/-   ##
========================================
  Coverage    78.40%   78.40%           
========================================
  Files          193      193           
  Lines        15624    15624           
========================================
  Hits         12250    12250           
  Misses        3374     3374           
Flag Coverage Δ
pytests 78.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yyassi-heartex yyassi-heartex merged commit 1fdeabc into develop Apr 28, 2025
49 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-optic-2017/followup branch April 28, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants