Download page: show gzipped size#6067
Open
patmmccann wants to merge 7 commits into
Open
Conversation
✅ Deploy Preview for prebid-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
@patmmccann can codex also resolve merge conflicts? |
Collaborator
Author
|
Yeah |
muuki88
requested changes
Sep 3, 2025
Comment on lines
+85
to
+93
| function triggerDownload(blob, filename) { | ||
| var link = document.createElement("a"); | ||
| link.href = window.URL.createObjectURL(blob); | ||
| link.download = filename; | ||
| document.body.appendChild(link); | ||
| link.click(); | ||
| document.body.removeChild(link); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Suggested change
| function triggerDownload(blob, filename) { | |
| var link = document.createElement("a"); | |
| link.href = window.URL.createObjectURL(blob); | |
| link.download = filename; | |
| document.body.appendChild(link); | |
| link.click(); | |
| document.body.removeChild(link); | |
| } |
This function already exists and just got copy and pasted to the top
Comment on lines
+122
to
+130
| if (window.pako) { | ||
| try { | ||
| var gz = pako.gzip(data); | ||
| var kb = (gz.length / 1024).toFixed(1); | ||
| document.getElementById('package-size').innerText = 'Estimated gzipped size: ' + kb + ' kB'; | ||
| } catch(e) { | ||
| console.log('pako gzip failed', e); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Doing this after the download has a weird UX. I understand that in order to calculate the gzipped size, we first need to have the file itself. Still it's so tiny at the bottom, I could hardly find it.
We can add this, but not sure of the value it adds 😁
Member
|
In addition to gzipped size, could we also expose the fingerprinting score per adapter to the docs site in a table? or in professor prebid? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #5402 but scoped down a bit to total package size. User will be able to see the effct of removing a package on total though, and this should solve for imports and the like by just showing the effect on the total.