mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Assigns more reasonable sizes and scaling to the change requests tabel.
This commit is contained in:
		
							parent
							
								
									527d94d0fc
								
							
						
					
					
						commit
						ce1e962128
					
				@ -45,6 +45,7 @@ const StyledPaginatedTable = styled(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    td: {
 | 
					    td: {
 | 
				
			||||||
        verticalAlign: 'top',
 | 
					        verticalAlign: 'top',
 | 
				
			||||||
 | 
					        maxWidth: '250px',
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
}));
 | 
					}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -105,7 +106,7 @@ const ChangeRequestsInner = () => {
 | 
				
			|||||||
            columnHelper.accessor('id', {
 | 
					            columnHelper.accessor('id', {
 | 
				
			||||||
                id: 'Title',
 | 
					                id: 'Title',
 | 
				
			||||||
                header: 'Title',
 | 
					                header: 'Title',
 | 
				
			||||||
                meta: { width: '300px' },
 | 
					                meta: { width: '35%' },
 | 
				
			||||||
                cell: GlobalChangeRequestTitleCell,
 | 
					                cell: GlobalChangeRequestTitleCell,
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
            columnHelper.accessor('features', {
 | 
					            columnHelper.accessor('features', {
 | 
				
			||||||
@ -134,20 +135,20 @@ const ChangeRequestsInner = () => {
 | 
				
			|||||||
            columnHelper.accessor('createdBy', {
 | 
					            columnHelper.accessor('createdBy', {
 | 
				
			||||||
                id: 'By',
 | 
					                id: 'By',
 | 
				
			||||||
                header: 'By',
 | 
					                header: 'By',
 | 
				
			||||||
                meta: { width: '180px', align: 'left' },
 | 
					                meta: { width: '10%' },
 | 
				
			||||||
                enableSorting: false,
 | 
					                enableSorting: false,
 | 
				
			||||||
                cell: ({ getValue }) => <AvatarCell value={getValue()} />,
 | 
					                cell: ({ getValue }) => <AvatarCell value={getValue()} />,
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
            columnHelper.accessor('createdAt', {
 | 
					            columnHelper.accessor('createdAt', {
 | 
				
			||||||
                id: 'Submitted',
 | 
					                id: 'Submitted',
 | 
				
			||||||
                header: 'Submitted',
 | 
					                header: 'Submitted',
 | 
				
			||||||
                meta: { width: '100px' },
 | 
					                meta: { width: '5%' },
 | 
				
			||||||
                cell: ({ getValue }) => <TimeAgoCell value={getValue()} />,
 | 
					                cell: ({ getValue }) => <TimeAgoCell value={getValue()} />,
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
            columnHelper.accessor('environment', {
 | 
					            columnHelper.accessor('environment', {
 | 
				
			||||||
                id: 'Environment',
 | 
					                id: 'Environment',
 | 
				
			||||||
                header: 'Environment',
 | 
					                header: 'Environment',
 | 
				
			||||||
                meta: { width: '100px' },
 | 
					                meta: { width: '10%' },
 | 
				
			||||||
                cell: ({ getValue }) => (
 | 
					                cell: ({ getValue }) => (
 | 
				
			||||||
                    <HighlightCell maxTitleLines={1} value={getValue()} />
 | 
					                    <HighlightCell maxTitleLines={1} value={getValue()} />
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
@ -155,7 +156,7 @@ const ChangeRequestsInner = () => {
 | 
				
			|||||||
            columnHelper.accessor('state', {
 | 
					            columnHelper.accessor('state', {
 | 
				
			||||||
                id: 'Status',
 | 
					                id: 'Status',
 | 
				
			||||||
                header: 'Status',
 | 
					                header: 'Status',
 | 
				
			||||||
                meta: { width: '170px' },
 | 
					                meta: { width: '10%' },
 | 
				
			||||||
                cell: ({ getValue, row }) => (
 | 
					                cell: ({ getValue, row }) => (
 | 
				
			||||||
                    <ChangeRequestStatusCell value={getValue()} row={row} />
 | 
					                    <ChangeRequestStatusCell value={getValue()} row={row} />
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
 | 
				
			|||||||
@ -57,7 +57,7 @@ export const GlobalChangeRequestTitleCell = ({
 | 
				
			|||||||
    const crPath = `${projectPath}/change-requests/${id}`;
 | 
					    const crPath = `${projectPath}/change-requests/${id}`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <TextCell sx={{ minWidth: '300px' }}>
 | 
					        <TextCell>
 | 
				
			||||||
            <LinkContainer>
 | 
					            <LinkContainer>
 | 
				
			||||||
                <Truncator title={projectName}>
 | 
					                <Truncator title={projectName}>
 | 
				
			||||||
                    <BaseLink to={projectPath}>{projectName}</BaseLink>
 | 
					                    <BaseLink to={projectPath}>{projectName}</BaseLink>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,16 +1,15 @@
 | 
				
			|||||||
import { Box, styled } from '@mui/material';
 | 
					import { Box, styled } from '@mui/material';
 | 
				
			||||||
import { Link } from 'react-router-dom';
 | 
					import { Link } from 'react-router-dom';
 | 
				
			||||||
import type { VFC } from 'react';
 | 
					 | 
				
			||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
 | 
					import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
 | 
				
			||||||
import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
 | 
					import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
 | 
				
			||||||
import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
 | 
					import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
 | 
				
			||||||
import { Highlighter } from 'component/common/Highlighter/Highlighter';
 | 
					import { Highlighter } from 'component/common/Highlighter/Highlighter';
 | 
				
			||||||
import { Truncator } from 'component/common/Truncator/Truncator';
 | 
					import { Truncator } from 'component/common/Truncator/Truncator';
 | 
				
			||||||
 | 
					import type { FC } from 'react';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const StyledBox = styled(Box)(({ theme }) => ({
 | 
					const StyledBox = styled(Box)(({ theme }) => ({
 | 
				
			||||||
    display: 'flex',
 | 
					    display: 'flex',
 | 
				
			||||||
    flexDirection: 'column',
 | 
					    flexDirection: 'column',
 | 
				
			||||||
    width: '300px',
 | 
					 | 
				
			||||||
    padding: theme.spacing(1, 0, 1, 2),
 | 
					    padding: theme.spacing(1, 0, 1, 2),
 | 
				
			||||||
}));
 | 
					}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -41,7 +40,7 @@ interface FeaturesCellProps {
 | 
				
			|||||||
    project: string;
 | 
					    project: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const FeaturesCell: VFC<FeaturesCellProps> = ({ value, project }) => {
 | 
					export const FeaturesCell: FC<FeaturesCellProps> = ({ value, project }) => {
 | 
				
			||||||
    const { searchQuery } = useSearchHighlightContext();
 | 
					    const { searchQuery } = useSearchHighlightContext();
 | 
				
			||||||
    const featureNames = value?.map((feature: any) => feature.name);
 | 
					    const featureNames = value?.map((feature: any) => feature.name);
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user