Skip to content

v68.0.0

Compare
Choose a tag to compare
@cozy-bot cozy-bot released this 24 May 09:25
· 1127 commits to master since this release

68.0.0 (2022-05-24)

Bug Fixes

Features

  • Add FooterActionButtons component (1c3efc1)
  • Refactor the viewer to let the app handle the action buttons (60084d6)

BREAKING CHANGES

  • The management of action buttons
    should now be handled on the application side
    via the FooterActionButtons component.
    The disableSharing prop has also been removed, as it is no longer needed.

Example:

<Viewer {...props}>
   <FooterActionButtons>
      <SharingButton />
      <ForwardOrDownloadButton />
   </FooterActionButtons>
</Viewer>

You can use a codemods transform-viewer.js to automatically handle this breaking change.
See the codemods documentation.
Using linter js auto-correction can be a good idea after that.
Here a common example (don't forget to change src value):

jscodeshift -t $(yarn global dir)/node_modules/@cozy/codemods/src/transforms/transform-viewer.js src --parser babel --extensions js,jsx && yarn lint:js --fix