Skip to content
Snippets Groups Projects
Unverified Commit edb3df3b authored by Chris Beer's avatar Chris Beer Committed by GitHub
Browse files

Merge pull request #1995 from ProjectMirador/1962-remove-logo

remove provider icon from window top bar fixes #1962
parents a5d4684b cb7f6108
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,6 @@ import AppBar from '@material-ui/core/AppBar';
import WindowTopMenuButton from '../../../src/containers/WindowTopMenuButton';
import WindowTopBarButtons from '../../../src/containers/WindowTopBarButtons';
import WindowIcon from '../../../src/containers/WindowIcon';
import { WindowTopBar } from '../../../src/components/WindowTopBar';
/** create wrapper */
......@@ -34,7 +33,6 @@ describe('WindowTopBar', () => {
expect(wrapper.find(Toolbar).length).toBe(1);
expect(wrapper.find(IconButton).length).toBe(2);
expect(wrapper.find(MenuIcon).length).toBe(1);
expect(wrapper.find(WindowIcon).length).toBe(1);
expect(wrapper.find(Typography).length).toBe(1);
expect(wrapper.find(WindowTopBarButtons).length).toBe(1);
expect(wrapper.find(WindowTopMenuButton).length).toBe(1);
......@@ -46,11 +44,6 @@ describe('WindowTopBar', () => {
expect(wrapper.find(IconButton).first().props().onClick).toBe(toggleWindowSideBar);
});
it('passes correct props to <WindowIcon/>', () => {
const wrapper = createWrapper();
expect(wrapper.find(WindowIcon).first().props().windowId).toBe('xyz');
});
it('passes correct props to <Typography/>', () => {
const wrapper = createWrapper();
expect(wrapper.find(Typography).first().render().text()).toBe('awesome manifest');
......
......@@ -7,7 +7,7 @@ import Typography from '@material-ui/core/Typography';
import ReactPlaceholder from 'react-placeholder';
import { TextBlock, TextRow, RectShape } from 'react-placeholder/lib/placeholders';
import ManifestListItemError from '../containers/ManifestListItemError';
import WindowIcon from './WindowIcon';
import WindowIcon from '../containers/WindowIcon';
import ns from '../config/css-ns';
import 'react-placeholder/lib/reactPlaceholder.css';
......@@ -41,7 +41,6 @@ export class ManifestListItem extends React.Component {
ready,
title,
thumbnail,
logo,
addWindow,
handleClose,
size,
......@@ -120,7 +119,7 @@ export class ManifestListItem extends React.Component {
</Grid>
<Grid item xs={4} sm={2}>
<WindowIcon className={ns('manifest-list-item-logo')} manifestLogo={logo} />
<WindowIcon className={ns('manifest-list-item-logo')} manifestId={manifestId} />
</Grid>
</Grid>
</ReactPlaceholder>
......@@ -136,7 +135,6 @@ ManifestListItem.propTypes = {
ready: PropTypes.bool,
title: PropTypes.string,
thumbnail: PropTypes.string,
logo: PropTypes.string,
size: PropTypes.number,
classes: PropTypes.object, // eslint-disable-line react/forbid-prop-types
provider: PropTypes.string,
......@@ -149,7 +147,6 @@ ManifestListItem.propTypes = {
ManifestListItem.defaultProps = {
handleClose: () => {},
ready: false,
logo: null,
thumbnail: null,
title: null,
classes: {},
......
......@@ -7,7 +7,6 @@ import CloseIcon from '@material-ui/icons/CloseSharp';
import Toolbar from '@material-ui/core/Toolbar';
import AppBar from '@material-ui/core/AppBar';
import classNames from 'classnames';
import WindowIcon from '../containers/WindowIcon';
import WindowTopMenuButton from '../containers/WindowTopMenuButton';
import WindowTopBarButtons from '../containers/WindowTopBarButtons';
import ns from '../config/css-ns';
......@@ -35,7 +34,6 @@ export class WindowTopBar extends Component {
>
<MenuIcon />
</IconButton>
<WindowIcon windowId={windowId} />
<Typography variant="h3" noWrap color="inherit" className={classes.typographyBody}>
{manifestTitle}
</Typography>
......
......@@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { withTranslation } from 'react-i18next';
import { withStyles } from '@material-ui/core';
import {
getManifestTitle, getManifestLogo, getManifestThumbnail, getManifestCanvases, getManifestProvider,
getManifestTitle, getManifestThumbnail, getManifestCanvases, getManifestProvider,
} from '../state/selectors';
import * as actions from '../state/actions';
import { ManifestListItem } from '../components/ManifestListItem';
......@@ -17,7 +17,6 @@ const mapStateToProps = (state, { manifestId }) => {
error: manifest.error,
isFetching: manifest.isFetching,
title: getManifestTitle(manifest),
logo: getManifestLogo(manifest),
thumbnail: getManifestThumbnail(manifest),
provider: getManifestProvider(manifest),
size: getManifestCanvases(manifest).length,
......
import { connect } from 'react-redux';
import { withStyles } from '@material-ui/core';
import { compose } from 'redux';
import { getWindowManifest, getManifestLogo } from '../state/selectors';
import { getManifestLogo } from '../state/selectors';
import WindowIcon from '../components/WindowIcon';
/** */
const mapStateToProps = (state, { windowId }) => ({
manifestLogo: getManifestLogo(getWindowManifest(state, windowId)),
const mapStateToProps = (state, { manifestId }) => ({
manifestLogo: getManifestLogo(state.manifests[manifestId]),
});
const styles = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment