Chore(UI): Allow decimal values in the search settings boost values#27410
Chore(UI): Allow decimal values in the search settings boost values#27410aniketkatkar97 wants to merge 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves Search Settings UI precision by allowing decimal slider values for boost/weight controls, and expands Playwright coverage for Search Settings updates (including field value boost add/remove), while refactoring test authentication utilities.
Changes:
- Updated several Ant Design
Slidercontrols to usestep={0.1}for decimal precision. - Refactored
SearchSettings.spec.tsto use an admin page fixture andperformAdminLoginfor admin actions. - Updated Playwright slider manipulation utility to compute dimensions using
.ant-slider-stepand added E2E flow for field value boosts.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/TermBoost/TermBoost.tsx | Enables decimal term boost slider steps. |
| openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldValueBoostModal/FieldValueBoostModal.tsx | Enables decimal factor slider steps for field value boosts. |
| openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldConfiguration/FieldConfiguration.tsx | Enables decimal field weight slider steps. |
| openmetadata-ui/src/main/resources/ui/playwright/utils/searchSettingUtils.ts | Adjusts slider dimension targeting for more reliable test interactions. |
| openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchSettings.spec.ts | Refactors admin authentication flow and adds E2E coverage for field value boost add/remove. |
Comments suppressed due to low confidence (4)
openmetadata-ui/src/main/resources/ui/playwright/utils/searchSettingUtils.ts:100
- The locator was changed to
.ant-slider-step, but the thrown error still says “Slider track not found”. Updating the message to reflect the actual element being located will make failures much easier to debug.
const sliderHandle = page.getByTestId(testId).locator('.ant-slider-handle');
const sliderTrack = page.getByTestId(testId).locator('.ant-slider-step');
// Get slider track dimensions
const box = await sliderTrack.boundingBox();
if (!box) {
throw new Error('Slider track not found');
}
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldConfiguration/FieldConfiguration.tsx:185
- With
step={0.1}, slideronChangevalues can suffer from JS floating-point artifacts (e.g.25.600000000000001) and the UI currently rendersfieldWeightdirectly. Consider normalizing the value inhandleWeightChange(e.g., round to 1 decimal) and/or formatting the displayed value so users don’t see long float representations.
<Slider
max={100}
min={0}
step={0.1}
tooltip={{ open: false }}
value={fieldWeight}
onChange={handleWeightChange}
/>
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldValueBoostModal/FieldValueBoostModal.tsx:164
- With
step={0.1},factormay pick up floating-point artifacts and it’s rendered directly in the modal header. Consider rounding/normalizing the slider value inhandleFactorChange(e.g., to 1 decimal) and/or formatting the displayed value to avoid showing long float representations.
<Slider
max={100}
min={0}
step={0.1}
tooltip={{ open: false }}
value={factor}
onChange={handleFactorChange}
/>
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/TermBoost/TermBoost.tsx:169
- With
step={0.1},termBoostData.boostmay end up with floating-point artifacts and it’s rendered directly in the UI. Consider rounding/normalizing the slider value inhandleBoostChange(e.g., to 1 decimal) and/or formatting the displayed value to avoid long float representations.
<Slider
max={100}
min={0}
step={0.1}
tooltip={{ open: false }}
value={termBoostData.boost}
onChange={handleBoostChange}
/>
🔴 Playwright Results — 1 failure(s), 33 flaky✅ 3603 passed · ❌ 1 failed · 🟡 33 flaky · ⏭️ 111 skipped
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ ApprovedUpdates search settings to accept decimal values for boost factors, allowing for more granular ranking control. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



This pull request enhances the search settings test suite and improves the precision and reliability of field value boost and slider controls in the UI. The main changes include updating the Playwright test setup to better handle admin authentication, adding comprehensive tests for field value boost functionality, and increasing slider precision in several UI components.
Test Improvements and Admin Authentication:
SearchSettings.spec.tsto use a dedicated admin user fixture, ensuring more reliable authentication and isolation for tests involving toast notifications. TheperformAdminLoginutility is now used instead ofcreateNewPagefor all admin actions. [1] [2] [3]Field Value Boost E2E Coverage:
Slider Precision Improvements:
Slidercomponents inFieldConfiguration.tsx,FieldValueBoostModal.tsx, andTermBoost.tsxto support decimal steps (step={0.1}), allowing for more precise adjustments. [1] [2] [3]searchSettingUtils.tsto target.ant-slider-stepfor track dimensions, improving reliability of slider manipulation in tests.Screen.Recording.2026-04-16.at.9.59.14.AM.mov