Remove “New!” badge from Curations UI (#130499)

This commit is contained in:
Scotty Bollinger 2022-04-19 05:20:59 -05:00 committed by GitHub
parent e8f59a5888
commit 7d20ffb32d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 32 deletions

View file

@ -98,26 +98,6 @@ describe('Curations', () => {
expect(tabs.length).toBe(2);
});
it('renders a New! badge when suggestions are not active', () => {
setMockValues(set('engine.adaptive_relevance_suggestions_active', false, values));
const wrapper = shallow(<Curations />);
expect(getPageTitle(wrapper)).toEqual('Curated results');
const tabs = getPageHeaderTabs(wrapper).find(EuiTab);
expect(tabs.at(1).prop('append')).not.toBeUndefined();
});
it('hides the badge when suggestions are active', () => {
setMockValues(set('engine.adaptive_relevance_suggestions_active', true, values));
const wrapper = shallow(<Curations />);
expect(getPageTitle(wrapper)).toEqual('Curated results');
const tabs = getPageHeaderTabs(wrapper).find(EuiTab);
expect(tabs.at(2).prop('append')).toBeUndefined();
});
it('renders an overview view', () => {
setMockValues({ ...values, selectedPageTab: 'overview' });
const wrapper = shallow(<Curations />);

View file

@ -9,7 +9,6 @@ import React, { useEffect } from 'react';
import { useValues, useActions } from 'kea';
import { EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { EuiButtonTo } from '../../../../shared/react_router_helpers';
@ -33,8 +32,6 @@ export const Curations: React.FC = () => {
engine: { adaptive_relevance_suggestions_active: adaptiveRelevanceSuggestionsActive },
} = useValues(EngineLogic);
const suggestionsEnabled = adaptiveRelevanceSuggestionsActive;
const OVERVIEW_TAB = {
label: i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.curations.overviewPageTabLabel',
@ -63,13 +60,6 @@ export const Curations: React.FC = () => {
),
isSelected: selectedPageTab === 'settings',
onClick: () => onSelectPageTab('settings'),
append: suggestionsEnabled ? undefined : (
<EuiBadge color="success">
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.curations.newBadgeLabel', {
defaultMessage: 'New!',
})}
</EuiBadge>
),
};
const pageTabs = adaptiveRelevanceSuggestionsActive

View file

@ -10241,7 +10241,6 @@
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryButtonLabel": "クエリを管理",
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryDescription": "このキュレーションのクエリを編集、追加、削除します。",
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryTitle": "クエリを管理",
"xpack.enterpriseSearch.appSearch.engine.curations.newBadgeLabel": "新機能!",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.description": "表示するオーガニック結果はありません。{manualDescription}",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.manualDescription": "上記のアクティブなクエリを追加または変更します。",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.title": "\"{currentQuery}\"の上位のオーガニックドキュメント",

View file

@ -10260,7 +10260,6 @@
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryButtonLabel": "管理查询",
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryDescription": "编辑、添加或移除此策展的查询。",
"xpack.enterpriseSearch.appSearch.engine.curations.manageQueryTitle": "管理查询",
"xpack.enterpriseSearch.appSearch.engine.curations.newBadgeLabel": "新!",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.description": "没有要显示的有机结果。{manualDescription}",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.manualDescription": "在上面添加或更改活动查询。",
"xpack.enterpriseSearch.appSearch.engine.curations.organicDocuments.title": "“{currentQuery}”的排名靠前有机文档",