Skip to content

Conversation

@kiraarghy
Copy link
Contributor

@kiraarghy kiraarghy commented Oct 31, 2019

This ticket implements the export and print functionality that was in original Spectacle.

When a user uses the exportMode flag, when they print it will output each slide as a single page.
exportmode

When a user uses the printMode flag, it will apply a print theme and a white background, saving on printing.

The printTheme has alright contrast at the moment, though am more than happy to take input on it @alex-saunders you're pretty good at this kinda thing.

I have also added a lightTheme for the codepane when in printMode.

greyexport

1. Default printTheme to overwrite the colors for a more suitable printing experience (needs to be changed later)

1. Add logic to src/theme/index.js to check whether there is a print query and if so apply the printTheme to the mergedTheme.

1. Add logic to slide to remove background color and change it to white for printing when print query.
1. Added exportMode to useDeck.
1. Changed layout of slides depending on `?exportMode=true` using print-deck.
1. Added @print media query to fullscreen and progress components.
@kiraarghy kiraarghy force-pushed the kara/printAndExport branch from 2f50eeb to 422135b Compare October 31, 2019 16:15
: {
transform: `scale(${ratio})`,
transformOrigin: `${origin.x} ${origin.y}`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is starting to get a little big, perhaps time to move to a React.useMemo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure can do!

transformOrigin: `${origin.x} ${origin.y}`
}}
backgroundColor={
window.location.search.includes('print') ? '#ffffff' : backgroundColor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get this from the useUrlRouting hook?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this, will get this done!

return merged;
}, deepCopy(defaultTheme));

export const mergeTheme = theme => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiraarghy and I slack chatted a minor refactor here.

Copy link
Member

@ryan-roemer ryan-roemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks absolutely fantastic!

kiraarghy and others added 2 commits October 31, 2019 17:15
@kiraarghy kiraarghy merged commit d6d4cba into task/rewrite Nov 1, 2019
@kale-stew kale-stew deleted the kara/printAndExport branch January 7, 2020 02:55
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

Successfully merging this pull request may close these issues.

3 participants