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

fix: convert MiradorImageTools to functional component to fix no image bug #52

Open
wants to merge 3 commits into
base: mirador4-compat-clean
Choose a base branch
from

Conversation

fstoe
Copy link

@fstoe fstoe commented Nov 25, 2024

I converted the MiradorImageTools class component to a functional one, due the usage of hooks inside the mirador withSize HOC.

For usage i had to install a prepublish build as described by lutzhelm here.

@lutzhelm
Copy link

Good catch!
I think we should wait for a fresh mirador alpha build before we resolve #51 or #38. We discussed having one this week.

@lutzhelm
Copy link

@fstoe alpha4 is ready, could you include it in this branch?

@fstoe
Copy link
Author

fstoe commented Nov 28, 2024

@lutzhelm sure :) i just updated to alpha 4

@lutzhelm
Copy link

Currently the tests are failing; you will also need to remove the react-sizeme leftovers from setupJest.js and provide the MiradorImageTools component in MiradorImageTools.test.jswith asize` prop, e.g.

size={{
  width: 100,
  height: 200,
}}

@fstoe
Copy link
Author

fstoe commented Nov 28, 2024

oh...:/ now the tests are working again

updateViewport,
updateWindow,
t,
innerRef,
Copy link

Choose a reason for hiding this comment

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

Sorry, there is just one last thing: could you order the props alphabetically?

innerRef: PropTypes.oneOfType([
PropTypes.func,
PropTypes.any,
]).isRequired,
Copy link

Choose a reason for hiding this comment

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

... same here: could you move innerRef up to have an alphabetical order?

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.

2 participants