Skip to content

Commit adae46d

Browse files
feixuanlimergify[bot]
authored andcommitted
feat(classification): remove classify from breadcrumbs (#1549)
1 parent e7f953e commit adae46d

File tree

11 files changed

+5
-108
lines changed

11 files changed

+5
-108
lines changed

i18n/en-US.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,6 @@ boxui.breadcrumb.breadcrumbLabel = Breadcrumb
596596
boxui.checkboxTooltip.iconInfoText = Info
597597
# Button to add classification on an item
598598
boxui.classification.add = Add
599-
# Button to add classification on an item
600-
boxui.classification.addClassification = CLASSIFY
601599
# Header for classification section in sidebar
602600
boxui.classification.classification = Classification
603601
# Button to edit classification on an item

src/features/classification/AddClassificationBadge.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/features/classification/AddClassificationBadge.scss

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/features/classification/Classification.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as React from 'react';
33
import { FormattedMessage } from 'react-intl';
44

55
import ClassifiedBadge from './ClassifiedBadge';
6-
import AddClassificationBadge from './AddClassificationBadge';
76
import messages from './messages';
87
import './Classification.scss';
98

@@ -24,8 +23,6 @@ const Classification = ({ advisoryMessage, className = '', messageStyle, name }:
2423
const isTooltipMessageEnabled = isClassified && hasMessage && messageStyle === STYLE_TOOLTIP;
2524
const isInlineMessageEnabled = isClassified && hasMessage && messageStyle === STYLE_INLINE;
2625

27-
// Either the add classification badge should be visible or the "not classified" text or neither
28-
const isAddClassificationBadgeVisible = !isClassified && !messageStyle;
2926
const isNotClassifiedMessageVisible = !isClassified && messageStyle === STYLE_INLINE;
3027

3128
return (
@@ -36,7 +33,6 @@ const Classification = ({ advisoryMessage, className = '', messageStyle, name }:
3633
tooltipText={isTooltipMessageEnabled ? advisoryMessage : undefined}
3734
/>
3835
)}
39-
{isAddClassificationBadgeVisible && <AddClassificationBadge />}
4036
{isInlineMessageEnabled && <p className="bdl-Classification-advisoryMessage">{advisoryMessage}</p>}
4137
{isNotClassifiedMessageVisible && (
4238
<span className="bdl-Classification-missingMessage">

src/features/classification/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ Renders a classification badge and advisory message.
2121
/>
2222
```
2323

24-
**Not Classified Badge to add classification**
25-
```jsx
26-
<Classification />
27-
```
28-
2924
**Not Classified Text**
3025
```jsx
3126
<Classification messageStyle="inline" />

src/features/classification/__tests__/AddClassificationBadge-test.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/features/classification/__tests__/Classification-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22

33
import Classification from '../Classification';
4+
import ClassifiedBadge from '../ClassifiedBadge';
45

56
describe('features/classification/Classification', () => {
67
const getWrapper = (props = {}) => shallow(<Classification {...props} />);
@@ -12,9 +13,11 @@ describe('features/classification/Classification', () => {
1213
expect(wrapper).toMatchSnapshot();
1314
});
1415

15-
test('should render add classification badge', () => {
16+
test('should render empty when classification does not exist but is editable', () => {
1617
const wrapper = getWrapper();
17-
expect(wrapper).toMatchSnapshot();
18+
expect(wrapper.find(ClassifiedBadge).length).toBe(0);
19+
expect(wrapper.find('.bdl-Classification-advisoryMessage').length).toBe(0);
20+
expect(wrapper.find('.bdl-Classification-missingMessage').length).toBe(0);
1821
});
1922

2023
test('should render not classified message', () => {

src/features/classification/__tests__/__snapshots__/AddClassificationBadge-test.js.snap

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/features/classification/__tests__/__snapshots__/Classification-test.js.snap

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ exports[`features/classification/Classification should render a classified badge
3636
</article>
3737
`;
3838

39-
exports[`features/classification/Classification should render add classification badge 1`] = `
40-
<article
41-
className="bdl-Classification "
42-
>
43-
<AddClassificationBadge />
44-
</article>
45-
`;
46-
4739
exports[`features/classification/Classification should render not classified message 1`] = `
4840
<article
4941
className="bdl-Classification "
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @flow
22

33
export { default } from './Classification';
4-
export { default as AddClassificationBadge } from './AddClassificationBadge';
54
export { default as ClassifiedBadge } from './ClassifiedBadge';
65
export { default as classificationMessages } from './messages';
76
export { default as EditClassificationButton } from './EditClassificationButton';

0 commit comments

Comments
 (0)