Skip to content

Implement PDF Generation side sheet. - #12619

Merged
aaemnnosttv merged 18 commits into
developfrom
enhancement/12507-pdf-generation-button-and-sidesheet
May 13, 2026
Merged

Implement PDF Generation side sheet.#12619
aaemnnosttv merged 18 commits into
developfrom
enhancement/12507-pdf-generation-button-and-sidesheet

Conversation

@benbowler

Copy link
Copy Markdown
Collaborator

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

🤖 This comment is automatically updated by CI workflows. Each section is managed independently.

📚 Storybook for d07d692:

  • Storybook has been deleted.

📦 Build files for d07d692:

  • Build files have been deleted.

🎭 Playwright reports for d07d692:

  • Reports have been deleted.

@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

Size Change: +1.4 kB (+0.06%)

Total Size: 2.3 MB

📦 View Changed
Filename Size Change
dist/assets/js/googlesitekit-main-dashboard-********************.js 159 kB +1.4 kB (+0.89%)
ℹ️ View Unchanged
Filename Size Change
dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.css 124 B 0 B
dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.js 0 B 0 B 🆕
dist/assets/blocks/reader-revenue-manager/block-editor-plugin/index.js 42.7 kB 0 B
dist/assets/blocks/reader-revenue-manager/common/editor-styles.css 307 B 0 B
dist/assets/blocks/reader-revenue-manager/common/editor-styles.js 0 B 0 B 🆕
dist/assets/blocks/reader-revenue-manager/contribute-with-google/index.js 5.81 kB 0 B
dist/assets/blocks/reader-revenue-manager/contribute-with-google/non-site-kit-user.js 5 kB 0 B
dist/assets/blocks/reader-revenue-manager/subscribe-with-google/index.js 5.81 kB 0 B
dist/assets/blocks/reader-revenue-manager/subscribe-with-google/non-site-kit-user.js 5 kB 0 B
dist/assets/blocks/sign-in-with-google/editor-styles.css 84 B 0 B
dist/assets/blocks/sign-in-with-google/editor-styles.js 0 B 0 B 🆕
dist/assets/blocks/sign-in-with-google/index.js 18.5 kB 0 B
dist/assets/css/googlesitekit-admin-css-********************.min.css 68.9 kB +132 B (+0.19%)
dist/assets/css/googlesitekit-adminbar-css-********************.min.css 12.3 kB 0 B
dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 851 B 0 B
dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.88 kB 0 B
dist/assets/js/146-********************.js 960 B 0 B
dist/assets/js/201-********************.js 2.85 kB 0 B
dist/assets/js/314-********************.js 100 kB 0 B
dist/assets/js/315-********************.js 3.08 kB 0 B
dist/assets/js/379-********************.js 3.7 kB 0 B
dist/assets/js/590-********************.js 1.88 kB 0 B
dist/assets/js/640-********************.js 2.35 kB 0 B
dist/assets/js/909-********************.js 1.01 kB 0 B
dist/assets/js/analytics-advanced-tracking-********************.js 404 B 0 B
dist/assets/js/googlesitekit-activation-********************.js 24.9 kB 0 B
dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 60.3 kB 0 B
dist/assets/js/googlesitekit-admin-pointers-tracking-********************.js 5.36 kB 0 B
dist/assets/js/googlesitekit-adminbar-********************.js 36 kB 0 B
dist/assets/js/googlesitekit-api-********************.js 8.04 kB 0 B
dist/assets/js/googlesitekit-block-tracking-********************.js 5.56 kB 0 B
dist/assets/js/googlesitekit-components-********************.js 5.63 kB 0 B
dist/assets/js/googlesitekit-consent-mode-********************.js 25.5 kB 0 B
dist/assets/js/googlesitekit-data-********************.js 1.76 kB 0 B
dist/assets/js/googlesitekit-datastore-forms-********************.js 7.21 kB 0 B
dist/assets/js/googlesitekit-datastore-location-********************.js 1.52 kB 0 B
dist/assets/js/googlesitekit-datastore-site-********************.js 18.7 kB 0 B
dist/assets/js/googlesitekit-datastore-ui-********************.js 7.37 kB 0 B
dist/assets/js/googlesitekit-datastore-user-********************.js 23.1 kB 0 B
dist/assets/js/googlesitekit-entity-dashboard-********************.js 73.6 kB 0 B
dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 1.23 kB 0 B
dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 629 B 0 B
dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 1.22 kB 0 B
dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 1.22 kB 0 B
dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 1.25 kB 0 B
dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 1.29 kB 0 B
dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 918 B 0 B
dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 1.25 kB 0 B
dist/assets/js/googlesitekit-i18n-********************.js 6.1 kB 0 B
dist/assets/js/googlesitekit-key-metrics-setup-********************.js 53.7 kB 0 B
dist/assets/js/googlesitekit-metric-selection-********************.js 59.5 kB 0 B
dist/assets/js/googlesitekit-modules-********************.js 26 kB 0 B
dist/assets/js/googlesitekit-modules-ads-********************.js 47.9 kB 0 B
dist/assets/js/googlesitekit-modules-adsense-********************.js 137 kB 0 B
dist/assets/js/googlesitekit-modules-analytics-4-********************.js 188 kB 0 B
dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 23.3 kB 0 B
dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 52.6 kB 0 B
dist/assets/js/googlesitekit-modules-search-console-********************.js 65.3 kB 0 B
dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 33.8 kB 0 B
dist/assets/js/googlesitekit-modules-tagmanager-********************.js 30.2 kB 0 B
dist/assets/js/googlesitekit-notifications-********************.js 66.7 kB 0 B
dist/assets/js/googlesitekit-polyfills-********************.js 228 B 0 B
dist/assets/js/googlesitekit-settings-********************.js 135 kB 0 B
dist/assets/js/googlesitekit-splash-********************.js 79.4 kB 0 B
dist/assets/js/googlesitekit-user-input-********************.js 51.9 kB 0 B
dist/assets/js/googlesitekit-vendor-********************.js 315 kB 0 B
dist/assets/js/googlesitekit-widgets-********************.js 104 kB 0 B
dist/assets/js/googlesitekit-wp-dashboard-********************.js 61 kB 0 B
dist/assets/js/runtime-********************.js 1.86 kB 0 B

compressed-size-action

@eugene-manuilov eugene-manuilov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @benbowler. Left some feedback for you. Please, take a look.

Comment thread assets/js/components/pdf-generation/PDFDownloadButton/index.js Outdated
Comment thread assets/js/components/pdf-generation/PDFDownloadButton/index.stories.js Outdated
Comment thread assets/js/components/pdf-generation/PDFDownloadButton/index.stories.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/Header.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.tsx Outdated

@aaemnnosttv aaemnnosttv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @benbowler ,

I've left a few additional comments of my own here while being pulled in on the review.

One additional important point which hasn't been raised is that all new files and components should be authored in TypeScript (unless there is a good reason we can't), but everything here has been added in JS.

Comment thread assets/js/components/pdf-generation/PDFDownloadButton/index.test.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.stories.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.test.js Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.test.js Outdated
Comment thread assets/js/components/pdf-generation/constants.js Outdated
Comment thread assets/sass/components/pdf-generation/_googlesitekit-pdf-download-panel.scss Outdated
Comment thread assets/sass/components/pdf-generation/_googlesitekit-pdf-download-panel.scss Outdated
Comment thread assets/svg/icons/download.svg
Comment thread assets/js/components/pdf-generation/PDFDownloadButton/index.stories.tsx Outdated
Comment thread assets/js/components/pdf-generation/PDFDownloadButton.tsx
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.tsx Outdated
Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.stories.tsx Outdated
@benbowler

Copy link
Copy Markdown
Collaborator Author

@eugene-manuilov

Yep, we keep spreading bad practice, adding it to more and more features.

The key lines in the code you copied are:

		// Temporary stub: toggle the "generating" flag so the notice renders.
		// To be replaced by the real orchestrator handoff in #12537.

This PR is a stub that doesn't require the implementation of the datastore. The core forms will be replaced with the correct PDF generation state within #12537 and beyond.

@eugene-manuilov

Copy link
Copy Markdown
Collaborator

Yep, we keep spreading bad practice, adding it to more and more features.

The key lines in the code you copied are:

		// Temporary stub: toggle the "generating" flag so the notice renders.
		// To be replaced by the real orchestrator handoff in #12537.

This PR is a stub that doesn't require the implementation of the datastore.

If #12537 is a dependency for this ticket, we should start with that task first, or not?

The core forms will be replaced with the correct PDF generation state within #12537 and beyond.

#12537 only says to extend the existing widgets infrastructure to support PDF variants. I don't see it mentioning creating a PDF-specific datastore to handle the PDF generation state.

Comment thread assets/js/components/pdf-generation/PDFSectionsSelectionPanel/index.tsx Outdated
@benbowler

Copy link
Copy Markdown
Collaborator Author

@eugene-manuilov I've created the missing datastore ticket (let's prioritise reviewing this and getting it into the next sprint) and addressed the code review comments.

@eugene-manuilov eugene-manuilov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @benbowler. There are VRT issues. Could you please take a look? Once fixed, please, assign to @aaemnnosttv for review as well. I have nothing else to add 👍.

@benbowler

Copy link
Copy Markdown
Collaborator Author

Remaining VRT failure and E2E failures are unrelated to this work.

@aaemnnosttv
aaemnnosttv dismissed eugene-manuilov’s stale review May 13, 2026 21:23

Changes addressed.

@aaemnnosttv aaemnnosttv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks all! I pushed a few extra fixes to get this over the line

  • DashboardMainApp had a complexity over the limit. There is a lot of room for improvement in this component but I made the smallest change necessary; we can address further improvements in a new issue.
  • Test failures related to focus trap – seems related to an odd nuance about our tabbable mock not being applied in all instances
  • Refactored the use of form state to use the new useFormValue hook for consistency (also a bit cleaner) + fixed one instance of this which was broken by the update

@aaemnnosttv
aaemnnosttv merged commit 97688a3 into develop May 13, 2026
31 checks passed
@aaemnnosttv
aaemnnosttv deleted the enhancement/12507-pdf-generation-button-and-sidesheet branch May 13, 2026 21:50
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.

3 participants