-
Notifications
You must be signed in to change notification settings - Fork 255
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
Add index.js files to src directories #3991
Conversation
One thing I noticed is that there is just a single default export in the index.js. As a result, this export always need to be imported entirely. Is that intentional? E.g. instead of importing just the necessary items with a named import like this:
... the items of interest now always have to be taken from the default import.
It works fine, but I'm not sure if this can become cumbersome. (I might also overlook an easier way to handle this.) |
Thanks, that wasn't my intent. I guess I should have been more suspicious of the existing code. |
Redux state related things like I also stumbled upon some imports in the plugins that still need to be imported with the entire |
I've tweaked the state/index.js re-exports so maybe it's better now. There's some subtlety (maybe with default exports?) I'm not fully grasping. ... and I've added those two as exports. 🤷♂️ |
I gave this branch a try with @gerdesque's branch of the mirador-textoverlay plugin. I noticed two things:
(Sorry that for all these individual comments instead of a single review.) |
cc00a42
to
a20cf4c
Compare
Ok, try this? Our mess of default and non-default exports make this pretty confusing. |
64c15e9
to
e1df7e7
Compare
I have to update my findings for today:
I was indeed not aware of the OSD changes, e.g. #4014; it could be that the plugins just have to be adapted to those changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine now; got all three plugins to work that I tested before.
Pushing most of the classes up to the top level should make downstream imports more robust (vs the current file-based
mirador/dist/es/*
imports).