Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultTemplate FullScreen button with no size after upgrade to next 15 #1341

Open
IOIO72 opened this issue Nov 12, 2024 · 2 comments
Open

Comments

@IOIO72
Copy link

IOIO72 commented Nov 12, 2024

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>
);
@VikashChoudhary001
Copy link

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

@IOIO72
Copy link
Author

IOIO72 commented Nov 29, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants