spectacle icon indicating copy to clipboard operation
spectacle copied to clipboard

DefaultTemplate FullScreen button with no size after upgrade to next 15

Open IOIO72 opened this issue 1 year ago • 2 comments

Describe Your Environment

What version of Spectacle are you using? 10.1.8

What version of React are you using? 18.3.1

What browser are you using? MS Edge

What platform are you on? macOS

NextJS version 15.0.3

Describe the Problem

By using the DefaultTemplate after upgrading NextJS to v15, the FullScreen button overlays the whole slide with a width of the whole page.

Expected behavior:

FullScreen button remains on default size of 24px

Actual behavior:

FullScreen button is of size of the page

Additional Information

Fixed it in my project by copying the DefaultTemplate and modified it, to make it work.

type Props = {
  color?: string;
  iconSize?: number;
};

export const DefaultTemplate = ({ color = '#fff', iconSize = 24 }: Props) => (
  <FlexBox justifyContent="space-between" position="absolute" bottom={0} width={1}>
    <Box padding="0 1em">
      <FullScreen color={color} size={iconSize} />
    </Box>
    <Box padding="1em">
      <AnimatedProgress color={color} />
    </Box>
  </FlexBox>
);

IOIO72 avatar Nov 12 '24 10:11 IOIO72

@IOIO72, could you please share a screenshot of the issue? It will help us better understand and resolve it.

VikashChoudhary001 avatar Nov 12 '24 17:11 VikashChoudhary001

@IOIO72, could you please share a screenshot of the issue? It will help us better understand and resolve it.

I don't have access to the code right now. I'll provide a screenshot in the week after the next one.

I think, the main reason, why the DefaultTemplate doesn't work anymore, is the fact, that the "defaultProps" in the Fullscreen component is used but deprecated in NextJS: https://www.tempmail.us.com/en/pagination/resolving-livewire-3-s-javascript-event-listeners-breaking-on-pagination-links

IOIO72 avatar Nov 29 '24 23:11 IOIO72