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

docs: add zoom functionality on images #2403

Merged
merged 4 commits into from
Nov 1, 2022

Conversation

aniketh-varma
Copy link
Contributor

@aniketh-varma aniketh-varma commented Oct 10, 2022

Closes #2393

Added zoom functionality on images in the documentation page using the docusaurus-plugin-image-zoom plugin.

The changes will install the docusaurus-plugin-image-zoom plugin and configure the same.

I have tested the changes locally and did not encounter anything breaking.

Please feel free to suggest any changes. Thanks!

@aniketh-varma aniketh-varma requested a review from a team as a code owner October 10, 2022 19:36
@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2022

⚠️ No Changeset found

Latest commit: 9a0bc12

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@shahednasser shahednasser left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! In addition to the comments I added below, can you change the z-index of .medium-zoom-overlay and .medium-zoom-image--opened to z-index: var(--ifm-z-index-overlay);? You should be able to add it in src/css/custom.css. That way the sidebar doesn't appear when the pic is zoomed.

www/docs/docusaurus.config.js Outdated Show resolved Hide resolved
Comment on lines 65 to 68
container: {
left: 250,
right: 40
}
Copy link
Member

Choose a reason for hiding this comment

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

Why is this necessary? I removed it and nothing changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had done this to zoom in the image inside the text container and not overflow over the sidebar, but I will make the appropriate changes in the z-index

@aniketh-varma
Copy link
Contributor Author

Thanks for your contribution! In addition to the comments I added below, can you change the z-index of .medium-zoom-overlay and .medium-zoom-image--opened to z-index: var(--ifm-z-index-overlay);? You should be able to add it in src/css/custom.css. That way the sidebar doesn't appear when the pic is zoomed.

Sure! I will make the changes

@aniketh-varma
Copy link
Contributor Author

Hi @shahednasser, I have done the suggested changes. Please have a look.

@shahednasser
Copy link
Member

@aniketh-varma there seems to be an issue with yarn.lock. Can you try removing node_modules in www/docs, running yarn install, and pushing any changes?

@aniketh-varma
Copy link
Contributor Author

@aniketh-varma there seems to be an issue with yarn.lock. Can you try removing node_modules in www/docs, running yarn install, and pushing any changes?

Sure! I will do the same.

@shahednasser shahednasser merged commit 096425f into medusajs:master Nov 1, 2022
@shahednasser
Copy link
Member

Awesome thanks a lot! 🙏🏻 @aniketh-varma

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.

Docs: Add Zoom functionality on images using docusaurus-plugin-image-zoom plugin
2 participants