Skip to content

Delay ZetaJS loading with export modal#10

Merged
erseco merged 1 commit intomainfrom
feature/implementar-modal-de-carga-para-exportacion
Oct 13, 2025
Merged

Delay ZetaJS loading with export modal#10
erseco merged 1 commit intomainfrom
feature/implementar-modal-de-carga-para-exportacion

Conversation

@erseco
Copy link
Copy Markdown
Collaborator

@erseco erseco commented Oct 13, 2025

Summary

  • add a lazy-loaded export modal for ZetaJS conversions in the document actions metabox
  • enqueue new modal assets only in CDN mode and expose configuration to the browser
  • style and script the modal to show progress steps and keep downloads in a hidden frame

Testing

  • composer test (fails: phpunit not found in container)

https://chatgpt.com/codex/tasks/task_e_68ecd0c229c88322be53bb4131ad0f38

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +160 to +164
const activeStep = frame.dataset.resolateActiveStep;
if (!activeStep) {
return;
}
setStepState(activeStep, 'done', strings.stepDone || '');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not mark iframe exports as done without verifying success

The modal’s load handler on the hidden export <iframe> sets each step to done whenever the frame finishes loading, regardless of whether the request actually produced a file. In CDN mode the export endpoints return a redirect with an error notice when ZetaJS conversions are unavailable, but because the request now runs inside the hidden frame the notice is invisible and the step shows as completed even though no download occurred. Users will see a successful state with no output and no explanation. Consider inspecting the iframe response (e.g. by checking headers or propagating the redirected URL to the main window) and displaying an error status instead of assuming every load event is a success.

Useful? React with 👍 / 👎.

@erseco erseco merged commit c017f3c into main Oct 13, 2025
3 of 4 checks passed
@erseco erseco deleted the feature/implementar-modal-de-carga-para-exportacion branch February 26, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant