diff --git a/src/client/components/App.js b/src/client/components/App.js index 600109f8fb0669dd29867e6813cb6d096641c88c..690a5341a91dfafe8020dfedefffce6932631ddf 100644 --- a/src/client/components/App.js +++ b/src/client/components/App.js @@ -69,7 +69,7 @@ const theme = createTheme({ MuiAccordion: { styleOverrides: { root: { - '&.MuiAccordion-root.Mui-expanded': { + '&.Mui-expanded': { marginTop: 8, marginBottom: 8 } @@ -81,36 +81,33 @@ const theme = createTheme({ root: { paddingLeft: 8, paddingRight: 8, - '&.MuiAccordionSummary-root.Mui-expanded': { - minHeight: 48 - } + minHeight: 40 }, content: { - marginTop: 8, - marginBottom: 8, - '&.MuiAccordionSummary-content.Mui-expanded': { + marginTop: 4, + marginBottom: 4, + '&.Mui-expanded': { marginTop: 0, marginBottom: 0 } } - // expandIcon: { - // '&$expanded': { - // marginTop: -16 - // } - // } + } + }, + MuiButton: { + styleOverrides: { + endIcon: { + marginLeft: 0 + } + } + }, + MuiTableCell: { + styleOverrides: { + sizeSmall: { + paddingTop: 0, + paddingBottom: 0 + } } } - // MuiButton: { - // endIcon: { - // marginLeft: 0 - // } - // }, - // MuiTableCell: { - // sizeSmall: { - // paddingTop: 0, - // paddingBottom: 0 - // } - // } } }) diff --git a/src/client/components/facet_results/FacetedSearchPerspective.js b/src/client/components/facet_results/FacetedSearchPerspective.js index 80352ddee6a623268889c08cb84c4235d83ac09a..086a8fccb60dd5b24f14d92c9673af394db49fbb 100644 --- a/src/client/components/facet_results/FacetedSearchPerspective.js +++ b/src/client/components/facet_results/FacetedSearchPerspective.js @@ -71,7 +71,7 @@ const FacetedSearchPerspective = props => { [theme.breakpoints.up(layoutConfig.hundredPercentHeightBreakPoint)]: { height: '100%' }, - [theme.breakpoints.down('sm')]: { + [theme.breakpoints.down('md')]: { paddingRight: '0px !important' }, overflow: 'auto', @@ -121,7 +121,7 @@ const FacetedSearchPerspective = props => { paddingBottom: '0px !important', paddingLeft: '4px !important', paddingRight: '0px !important', - [theme.breakpoints.down('sm')]: { + [theme.breakpoints.down('md')]: { paddingLeft: '0px !important', marginBottom: theme.spacing(1), marginTop: theme.spacing(0.5) diff --git a/src/client/components/facet_results/ReactVirtualizedTable.js b/src/client/components/facet_results/ReactVirtualizedTable.js index 519298f8fedd6a79ff64bddb660f3a8236e64c22..2593116627baafc754a3a335ddecc0be2e763f63 100644 --- a/src/client/components/facet_results/ReactVirtualizedTable.js +++ b/src/client/components/facet_results/ReactVirtualizedTable.js @@ -81,6 +81,7 @@ class MuiVirtualizedTable extends React.PureComponent { container='div' expanded={false} collapsedMaxWords={collapsedMaxWords} + shortenLabel={false} /> ) }; @@ -104,7 +105,9 @@ class MuiVirtualizedTable extends React.PureComponent { > <TableSortLabel active={sortBy === dataKey} - direction={sortDirection} + direction={typeof sortDirection === 'string' + ? sortDirection + : 'asc'} hideSortIcon onClick={this.onSortBy(dataKey)} > @@ -118,7 +121,7 @@ class MuiVirtualizedTable extends React.PureComponent { onSortBy = sortBy => () => { this.props.sortFullTextResults({ - resultClass: 'fullText', + resultClass: this.props.resultClass, sortBy }) } @@ -223,6 +226,7 @@ const ReactVirtualizedTable = props => { sortBy={sortBy} sortDirection={sortDirection} sortFullTextResults={props.sortFullTextResults} + resultClass={props.resultClass} /> </div> )} diff --git a/src/client/components/facet_results/ResultTable.js b/src/client/components/facet_results/ResultTable.js index 4922aedc70de8edf999069ad0891a5073874ad59..5ba30fdf2a5ca2ba225dee0e07c16ad0edfaac4f 100644 --- a/src/client/components/facet_results/ResultTable.js +++ b/src/client/components/facet_results/ResultTable.js @@ -35,9 +35,9 @@ const styles = theme => ({ // borderTop: '1px solid rgba(224, 224, 224, 1);', // alignItems: 'center' // }, - paginationCaption: { - minWidth: 110 - }, + // paginationCaption: { + // minWidth: 110 + // }, // paginationToolbar: props => ({ // '& p': { fontSize: '0.75rem' }, // minHeight: props.layoutConfig.paginationToolbarHeight, @@ -55,9 +55,7 @@ const styles = theme => ({ justifyContent: 'center' }, expandCell: { - paddingRight: 0, - paddingTop: 0, - paddingBottom: 0 + paddingRight: '0px !important' }, expand: { transform: 'rotate(0deg)', @@ -291,7 +289,7 @@ class ResultTable extends React.Component { labelDisplayedRows={resultCount == null ? () => '-' : ({ from, to, count }) => `${from}-${to} of ${count}`} - rowsPerPage={pagesize} + rowsPerPage={parseInt(pagesize)} labelRowsPerPage={intl.get('table.rowsPerPage')} rowsPerPageOptions={[5, 10, 15, 20, 25, 30, 50, 100]} page={page === -1 || resultCount === 0 ? 0 : page} @@ -308,7 +306,11 @@ class ResultTable extends React.Component { borderTop: '1px solid rgba(224, 224, 224, 1);', alignItems: 'center', '& .MuiTablePagination-toolbar': { - '& p': { fontSize: '0.75rem' }, + '& p': { + fontSize: '0.75rem', + marginTop: 0, + marginBottom: 0 + }, minHeight: this.props.layoutConfig.paginationToolbarHeight, [theme.breakpoints.down('sm')]: { display: 'flex', diff --git a/src/client/components/main_layout/FullTextSearch.js b/src/client/components/main_layout/FullTextSearch.js index f3f129eeb9f5f38ead85d299382dbd48ca323be8..937b62bb7319866f84444a89a9e6a3efb479a4ea 100644 --- a/src/client/components/main_layout/FullTextSearch.js +++ b/src/client/components/main_layout/FullTextSearch.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Route, Redirect } from 'react-router-dom' -import makeStyles from '@mui/styles/makeStyles'; +import makeStyles from '@mui/styles/makeStyles' import PerspectiveTabs from './PerspectiveTabs' import ReactVirtualizedTable from '../facet_results/ReactVirtualizedTable' import CalendarViewDayIcon from '@mui/icons-material/CalendarViewDay' @@ -43,6 +43,7 @@ const FullTextSearch = props => { return ( <ReactVirtualizedTable fullTextSearch={props.fullTextSearch} + resultClass={props.resultClass} sortFullTextResults={props.sortFullTextResults} layoutConfig={props.layoutConfig} /> diff --git a/src/client/containers/SemanticPortal.js b/src/client/containers/SemanticPortal.js index 1d7c46771a32ad0c7280a98e5cd39c37d3e62acf..ebaa937d8285b01f52cd51387c5e3c8a3ad69fbc 100644 --- a/src/client/containers/SemanticPortal.js +++ b/src/client/containers/SemanticPortal.js @@ -218,6 +218,7 @@ const SemanticPortal = props => { render={routeProps => <FullTextSearch fullTextSearch={props.fullTextSearch} + resultClass='fullTextSearch' sortFullTextResults={props.sortFullTextResults} routeProps={routeProps} screenSize={screenSize}