Chore(UI): Allow decimal values in the search settings boost values#27410
Chore(UI): Allow decimal values in the search settings boost values#27410aniketkatkar97 merged 7 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}
/>
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 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (3)
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldConfiguration/FieldConfiguration.tsx:185
- With
step={0.1},fieldWeightcan now be a decimal. The UI currently renders the value directly (and also pads values < 10 with a leading0in the header), which can lead to awkward formatting for decimals and potential floating-point artifacts. Consider rounding/formatting consistently (e.g., to 1 decimal) in all places this weight is displayed.
<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},factorcan now be a decimal. The modal displaysfactordirectly, which can show long floating-point representations (and is inconsistent with other search-setting sliders that format to a fixed precision). Consider rounding/formatting the displayed value (and the saved value, if needed) to a consistent precision (e.g., 1 decimal).
<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.boostcan now be a decimal. The value is rendered directly, which can produce inconsistent/ugly formatting (and possible floating-point artifacts). Consider rounding/formatting the displayed boost to a consistent precision (e.g., 1 decimal).
<Slider
max={100}
min={0}
step={0.1}
tooltip={{ open: false }}
value={termBoostData.boost}
onChange={handleBoostChange}
/>
|
🟡 Playwright Results — all passed (18 flaky)✅ 3692 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 89 skipped
🟡 18 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Failed to cherry-pick changes to the 1.12.6 branch. |
…27410) * Allow floating values for boost value sliders * Fix the checkstyle * Fix test flakiness * Fix checkstyle



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