fix(ui): restore defaults and add term boosts for search ranking settings (#20442)

* fix: restore defaults and add term boosts

* fixed glossary term reject button hover effect
This commit is contained in:
Pranita Fulsundar 2025-03-26 23:06:04 +05:30 committed by GitHub
parent a9961302df
commit 17e0b126e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 5 deletions

View File

@ -436,13 +436,18 @@ const EntitySearchSettings = () => {
const updatedSearchConfig = data as SearchSettings;
const updatedAssetSearchSettings =
updatedSearchConfig.assetTypeConfigurations?.find(
(config) => config.assetType === entityType
);
setAppPreferences({
...appPreferences,
searchConfig: updatedSearchConfig,
});
setSearchSettings({
...updatedSearchConfig,
...updatedAssetSearchSettings,
isUpdated: false,
});

View File

@ -45,7 +45,7 @@
background-color: @blue-17;
color: @white;
border: 1px solid @blue-18;
width: 100px;
width: 90px;
padding: 4px 12px;
&.icon-only {
@ -84,7 +84,7 @@
}
&.show-text {
width: 80px;
width: 90px;
padding: 4px 12px;
.btn-text {

View File

@ -168,7 +168,8 @@ const SearchSettingsPage = () => {
};
// Term Boost
const handleAddNewTermBoost = () => {
const handleAddNewTermBoost = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
setShowNewTermBoost(true);
};
@ -236,7 +237,8 @@ const SearchSettingsPage = () => {
// Field Value Boost
const handleAddFieldValueBoost = () => {
const handleAddFieldValueBoost = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
setSelectedFieldValueBoost(undefined);
setShowFieldValueBoostModal(true);
};
@ -383,6 +385,7 @@ const SearchSettingsPage = () => {
<Button
className="term-boost-add-btn"
data-testid="term-boost-add-btn"
disabled={isUpdating || showNewTermBoost}
icon={
<Icon className="text-sm" component={PlusOutlined} />
}
@ -421,6 +424,7 @@ const SearchSettingsPage = () => {
<Button
className="field-value-boost-add-btn"
data-testid="add-field-value-boost-btn"
disabled={isUpdating || showFieldValueBoostModal}
icon={
<Icon className="text-sm" component={PlusOutlined} />
}

View File

@ -79,6 +79,9 @@
}
}
}
.ant-collapse-borderless > .ant-collapse-item > .ant-collapse-content {
background-color: @grey-10;
}
}
.field-value-boost-add-btn,