Skip to content

Commit

Permalink
Added keyword rule icon (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsjen authored Apr 2, 2019
1 parent a502cb5 commit 20f4887
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/app/components/App/fontello-codes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.icon-seriousness:before { content: '\e815'; } /* '' */
.icon-plus:before { content: '\e816'; } /* '' */
.icon-tick:before { content: '\e817'; } /* '' */
.icon-keyword-rule:before { content: '\e818'; }
.icon-twitter:before { content: '\f099'; } /* '' */
.icon-facebook:before { content: '\f09a'; } /* '' */
.icon-sort:before { content: '\f0dc'; } /* '' */
Expand Down
2 changes: 1 addition & 1 deletion client/app/utils/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export function getFilterReasonIcon(reasonType) {
const reasons = {
corporate: 'icon-corporate',
keyword: 'icon-seriousness', // TODO: this needs a real logo
keyword: 'icon-keyword-rule', // TODO: this needs a real logo
rudeness: 'icon-toxicity',
seriousness: 'icon-seriousness',
virality: 'icon-virality',
Expand Down
4 changes: 2 additions & 2 deletions client/app/utils/filtering.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ describe('filtering', () => {
} = getFilteredPosts(POSTS.posts, settings, []);
expect(keptPosts.length).toBe(1);
expect(filteredPosts.length).toBe(2);
expect(filterReasons).toEqual({ 4521474: [{ label: 'Keyword', type: 'keyword', icon: 'icon-seriousness' }], 4521515: [{ label: 'Keyword', type: 'keyword', icon: 'icon-seriousness' }], 4521559: [] });
expect(filterReasons).toEqual({ 4521474: [{ label: 'Keyword', type: 'keyword', icon: 'icon-keyword-rule' }], 4521515: [{ label: 'Keyword', type: 'keyword', icon: 'icon-keyword-rule' }], 4521559: [] });
});

it('filters by keyword by OR', () => {
Expand All @@ -505,7 +505,7 @@ describe('filtering', () => {
} = getFilteredPosts(POSTS.posts, settings, []);
expect(keptPosts.length).toBe(1);
expect(filteredPosts.length).toBe(2);
expect(filterReasons).toEqual({ 4521474: [{ label: 'Keyword', type: 'keyword', icon: 'icon-seriousness' }], 4521515: [], 4521559: [{ label: 'Keyword', type: 'keyword', icon: 'icon-seriousness' }] });
expect(filterReasons).toEqual({ 4521474: [{ label: 'Keyword', type: 'keyword', icon: 'icon-keyword-rule' }], 4521515: [], 4521559: [{ label: 'Keyword', type: 'keyword', icon: 'icon-keyword-rule' }] });
});
});
});
Binary file modified client/static/custom-icons/fontello.eot
Binary file not shown.
4 changes: 3 additions & 1 deletion client/static/custom-icons/fontello.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/static/custom-icons/fontello.ttf
Binary file not shown.
Binary file modified client/static/custom-icons/fontello.woff
Binary file not shown.
Binary file modified client/static/custom-icons/fontello.woff2
Binary file not shown.
32 changes: 32 additions & 0 deletions client/static/icons/rule.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20f4887

Please sign in to comment.