diff --git a/assets/agenda/components/AgendaApp.tsx b/assets/agenda/components/AgendaApp.tsx index 17862b4ea..efa92d681 100644 --- a/assets/agenda/components/AgendaApp.tsx +++ b/assets/agenda/components/AgendaApp.tsx @@ -57,7 +57,6 @@ import BookmarkTabs from 'components/BookmarkTabs'; import {setActiveDate, setAgendaDropdownFilter} from 'local-store'; import {previewConfigSelector, detailsConfigSelector} from 'ui/selectors'; import {SearchResultsBar} from 'search/components/SearchResultsBar'; -import NewItemsIcon from 'search/components/NewItemsIcon'; const modals = { shareItem: ShareItemModal, @@ -268,17 +267,9 @@ class AgendaApp extends SearchBase { toggleFeaturedFilter={this.props.toggleFeaturedFilter} featuredFilter={this.props.featuredOnly} hasAgendaFeaturedItems={this.props.hasAgendaFeaturedItems} + newItems={this.props.newItems} + fetchItems={this.props.fetchItems} /> - {!(this.props.newItems || []).length ? null : ( -
-
- -
-
- )} -
+
+ {!(newItems || []).length ? null : ( +
+ +
+ )} +
{!hideFeaturedToggle && hasAgendaFeaturedItems && DISPLAY_AGENDA_FEATURED_STORIES_ONLY && } @@ -26,6 +34,8 @@ AgendaListViewControls.propTypes = { hideFeaturedToggle: PropTypes.bool, featuredFilter: PropTypes.bool, hasAgendaFeaturedItems: PropTypes.bool, + newItems: PropTypes.array, + fetchItems: PropTypes.func, }; export default AgendaListViewControls; diff --git a/assets/search/components/NewItemsIcon.tsx b/assets/search/components/NewItemsIcon.tsx index 49ffeddad..8cdea420d 100644 --- a/assets/search/components/NewItemsIcon.tsx +++ b/assets/search/components/NewItemsIcon.tsx @@ -56,7 +56,7 @@ class NewItemsIcon extends React.Component { ref={(elem: any) => this.dom.tooltip = elem} title={gettext('refresh')} aria-label={gettext('refresh')} - className="button__reset-styles d-flex align-items-center ms-3" + className="button__reset-styles d-flex align-items-center" onClick={this.props.refresh} > diff --git a/assets/styles/navbar.scss b/assets/styles/navbar.scss index 509da2018..a1dd2d2b0 100644 --- a/assets/styles/navbar.scss +++ b/assets/styles/navbar.scss @@ -574,4 +574,12 @@ nav.search { display: none; } } -} \ No newline at end of file +} + +.navbar--list-controls:has(.navbar__inner--icon) { + display: flex; + + .navbar__inner--buttons { + display: none; + } +} diff --git a/assets/wire/components/ListViewControls.tsx b/assets/wire/components/ListViewControls.tsx index 8e70ec3e4..55ab95ed4 100644 --- a/assets/wire/components/ListViewControls.tsx +++ b/assets/wire/components/ListViewControls.tsx @@ -7,6 +7,7 @@ import NewsOnlyControl from './NewsOnlyControl'; import SearchAllVersionsControl from './SearchAllVersionsControl'; import ListViewOptions from '../../components/ListViewOptions'; import {ListSearchOptions} from './ListSearchOptions'; +import NewItemsIcon from 'search/components/NewItemsIcon'; function ListViewControls({ activeView, @@ -18,10 +19,20 @@ function ListViewControls({ hideSearchAllVersions, searchAllVersions, toggleSearchAllVersions, + newItems, + fetchItems, }: any) { return(
-
+ {!(newItems || []).length ? null : ( +
+ +
+ )} +
{hideSearchAllVersions ? null : ( { hideSearchAllVersions={!(this.props.context === 'wire' && DISPLAY_ALL_VERSIONS_TOGGLE)} searchAllVersions={this.props.searchAllVersions} toggleSearchAllVersions={this.props.toggleSearchAllVersions} + newItems={this.props.newItems} + fetchItems={this.props.fetchItems} /> - {!(this.props.newItems || []).length ? null : ( -
-
- -
-
- )}