Skip to content
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

fix(FR-5): Set accelerator value to 0 when no accelerator available #3027

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Jan 14, 2025

Resovles #2979 (FR-5)

Changes:

  • Fixed accelerator slot handling in ResourceAllocationFormItems to properly handle undefined states
  • Improved accelerator input disable logic based on available slots and image requirements
  • Added optimistic updates to ResourceGroupSelect to improve UI responsiveness during transitions
  • Added new FormItemControl component to handle form item rendering with value and setValue callbacks (This component is not used yet)

Technical Details:

  • Accelerator slots and image limits now properly handle undefined states during loading
  • Accelerator input is disabled when:
    • No accelerator slots are available
    • Selected image doesn't require accelerators and no manual environment is set
  • ResourceGroupSelect now shows optimistic updates during value transitions to prevent UI lag

Checklist:

Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the size:L 100~500 LoC label Jan 14, 2025
Copy link

github-actions bot commented Jan 14, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.95% (-0.01% 🔻)
398/8043
🔴 Branches
4.28% (+0.02% 🔼)
239/5578
🔴 Functions
2.97% (-0% 🔻)
78/2630
🔴 Lines
4.87% (-0.01% 🔻)
383/7870
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / FormItemControl.tsx
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / ResourceGroupSelect.tsx
2.7% (-0.15% 🔻)
0% 0%
2.78% (-0.16% 🔻)
🔴
... / ResourceAllocationFormItems.tsx
15.14% (-0.28% 🔻)
10.45% (+0.12% 🔼)
12.5% (-0.18% 🔻)
14.88% (-0.28% 🔻)

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 9a2ea83

@yomybaby yomybaby requested a review from ironAiken2 January 14, 2025 08:27
@yomybaby yomybaby marked this pull request as ready for review January 14, 2025 08:27
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

image.png

tooltip doesn't disappear.

@yomybaby yomybaby force-pushed the fix/accelerator-value-when-no-accelerator branch from e1c55cd to 6fb80f0 Compare January 15, 2025 08:12
Copy link
Member Author

Oh! Thank you. I jus pushed a changes.

@yomybaby yomybaby requested a review from ironAiken2 January 15, 2025 08:13
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

graphite-app bot commented Jan 15, 2025

Merge activity

…3027)

Resovles #2979 (FR-5)

**Changes:**
- Fixed accelerator slot handling in ResourceAllocationFormItems to properly handle undefined states
- Improved accelerator input disable logic based on available slots and image requirements
- Added optimistic updates to ResourceGroupSelect to improve UI responsiveness during transitions
- Added new `FormItemControl` component to handle form item rendering with value and setValue callbacks (This component is not used yet)

**Technical Details:**
- Accelerator slots and image limits now properly handle undefined states during loading
- Accelerator input is disabled when:
  - No accelerator slots are available
  - Selected image doesn't require accelerators and no manual environment is set
- ResourceGroupSelect now shows optimistic updates during value transitions to prevent UI lag

**Checklist:**
- [ ] Please follow steps to reproduce in #2979
- [ ] Verify form behavior during resource group and image transitions
- [ ] Check optimistic updates in resource group selection
@ironAiken2 ironAiken2 force-pushed the fix/accelerator-value-when-no-accelerator branch from 6fb80f0 to 9a2ea83 Compare January 15, 2025 08:34
@graphite-app graphite-app bot merged commit 9a2ea83 into main Jan 15, 2025
6 checks passed
@graphite-app graphite-app bot deleted the fix/accelerator-value-when-no-accelerator branch January 15, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants