Skip to content

Andrew/dimensions checks + PDF Fix #294

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

Merged
merged 8 commits into from
Mar 25, 2025
Merged

Andrew/dimensions checks + PDF Fix #294

merged 8 commits into from
Mar 25, 2025

Conversation

ayjayt
Copy link
Collaborator

@ayjayt ayjayt commented Mar 12, 2025

Two things in this PR:

New Mocker Functions

  • in _mocker.py it adds arguments for printing out the mock w/ parameterized width/scale/height

Example

$ uv run kaleido_mocker --parameterize_opts --output . --random 5 --n 15

the parameters are hardcoded right now, but certain values can be fixed by setting --[format, scale, width, height] VALUE. Otherwise, tons and tons of output. The command above, 5 mocks, 810 output files.

Fix PDF page-size

@ayjayt ayjayt requested a review from emilykl March 12, 2025 21:16
@@ -361,7 +361,7 @@ async def _img_from_response(self, response):
"marginBottom": 0.1,
"marginLeft": 0.1,
"marginRight": 0.1,
"preferCSSPageSize": False,
"preferCSSPageSize": True,
Copy link
Collaborator Author

@ayjayt ayjayt Mar 12, 2025

Choose a reason for hiding this comment

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

👆 #289

@ayjayt ayjayt changed the title Andrew/dimensions checks Andrew/dimensions checks + PDF Fix Mar 12, 2025
@emilykl
Copy link
Collaborator

emilykl commented Mar 24, 2025

@ayjayt Are there any blockers to merging this PR? It'll be easier for me to do end-to-end testing in Plotly.py once this is merged.

@ayjayt
Copy link
Collaborator Author

ayjayt commented Mar 24, 2025

Not to my knowledge, but since today is a holiday, I can review them tomorrow morning.

I'd only be checking the CHANGELOG to make sure its accurate to the incoming version number.

@ayjayt ayjayt merged commit 2a05d20 into master Mar 25, 2025
4 checks passed
@ayjayt ayjayt deleted the andrew/dimensions_checks branch March 25, 2025 20:01
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.

bug: Wrong page size when exporting to PDF (Kaleido v1)
2 participants