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