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

feat(preview): allow changing the preview placement #330

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

MPeloquin
Copy link
Contributor

Allow moving the preview to different anchor points.

Added the following points:

  • center
  • top
  • top-start
  • top-end
  • bottom
  • bottom-start
  • bottom-end
  • left
  • right

Also added a way to add padding to the position. (for our case, our designer wanted to have the preview slightly under the top)

Non-breaking changes, all defaults values are the same as the current behavior and all options are optional.

Added tests & updated the example app

See video:

CleanShot.2024-12-10.at.16.19.25.mp4

@coveralls
Copy link

Coverage Status

coverage: 98.63% (+0.1%) from 98.498%
when pulling 45e38e9 on MPeloquin:feature/preview-placement
into 6cc2783 on LouisBrunner:main.

Copy link
Owner

@LouisBrunner LouisBrunner left a comment

Choose a reason for hiding this comment

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

Looks great!

It seems to me like the padding should be handled with custom styling by the user. However it doesn't hurt to have it here. (especially in such a nice PR!)

@LouisBrunner LouisBrunner merged commit 2c8140a into LouisBrunner:main Dec 12, 2024
9 checks passed
@LouisBrunner
Copy link
Owner

@MPeloquin I had to fight with a few things but your change is now released as v8.1.0 😄

@MPeloquin MPeloquin deleted the feature/preview-placement branch December 12, 2024 20:52
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.

4 participants