Skip to content

Commit

Permalink
🚩 Index local news (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
padms committed Aug 18, 2022
1 parent 0a041be commit 80f0ad5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
16 changes: 15 additions & 1 deletion studio/schemas/textSnippets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { HAS_FORMS, HAS_SEARCH, HAS_NEWS, HAS_NEWSROOM, HAS_EVENT, HAS_MAGAZINE } from '../src/lib/datasetHelpers'
import {
HAS_FORMS,
HAS_SEARCH,
HAS_NEWS,
HAS_NEWSROOM,
HAS_EVENT,
HAS_MAGAZINE,
IS_TEST,
} from '../src/lib/datasetHelpers'

export const groups = {
newsroom: { title: 'Newsroom', hidden: !HAS_NEWSROOM },
Expand Down Expand Up @@ -595,6 +603,12 @@ const snippets: textSnippet = {
defaultValue: 'Country',
group: groups.newsroom,
},
newsroom_local_market_filter: {
title: 'Local market filter heading',
defaultValue: 'Local market',
group: groups.newsroom,
hidden: !IS_TEST,
},
newsroom_year_filter: {
title: 'Year filter heading',
defaultValue: 'Year',
Expand Down
11 changes: 11 additions & 0 deletions web/pageComponents/newsRoom/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import styled from 'styled-components'
import FilterHeader from '././FilterHeader'
import { RefinementList } from './RefinementList'
import UncontrolledSearchBox from './UncontrolledSearchBox'
import { isGlobalDevelopment } from '../../common/helpers/datasetHelpers'

const StyledAccordion = styled(Accordion)`
@media (min-width: 800px) {
Expand Down Expand Up @@ -65,6 +66,16 @@ const Filters = ({ hasFilters, hasSearch, ...rest }: FiltersProps) => {
<RefinementList /* sortBy={['name:asc']} */ attribute="countryTags" />
</AccordionPanel>
</AccordionItem>
{isGlobalDevelopment && (
<AccordionItem>
<FilterHeader
label={intl.formatMessage({ id: 'newsroom_local_market_filter', defaultMessage: 'Local Market' })}
/>
<AccordionPanel>
<RefinementList /* sortBy={['name:asc']} */ attribute="localNewsTag" />

This comment has been minimized.

Copy link
@fernandolucchesi

fernandolucchesi Aug 21, 2022

Contributor

you can clean up the comment /* etc */

</AccordionPanel>
</AccordionItem>
)}
<AccordionItem>
<FilterHeader
label={intl.formatMessage({ id: 'newsroom_year_filter', defaultMessage: 'Year' })}
Expand Down

0 comments on commit 80f0ad5

Please sign in to comment.