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

documenthandler - printing layout is destroyed #1107

Closed
lina-sbk-gbg opened this issue Jun 16, 2022 · 11 comments
Closed

documenthandler - printing layout is destroyed #1107

lina-sbk-gbg opened this issue Jun 16, 2022 · 11 comments
Labels
bug difficulty:complex Functionality is considered complex to port plugin:documenthandler
Milestone

Comments

@lina-sbk-gbg
Copy link

I tested printing documents in 3.10 RC1 now and unfortunately the layout is completely wrong there. Do not know if it has to do with upgrading MUI or React. See comparison with attachments.

version_3_9.pdf
master_2022-06-15.pdf

@Hallbergs
Copy link
Member

I think we've located the issue. Fix coming up!

@lina-sbk-gbg
Copy link
Author

🙌

@Hallbergs
Copy link
Member

We found some other issues, so we'll have to re-open

@Hallbergs Hallbergs reopened this Jun 16, 2022
@Hallbergs
Copy link
Member

Hopefully it will be fixed this time... Commit incoming

@jacobwod jacobwod reopened this Jun 17, 2022
jacobwod added a commit that referenced this issue Jun 20, 2022
jacobwod added a commit that referenced this issue Jun 21, 2022
jacobwod added a commit that referenced this issue Jun 21, 2022
@jacobwod
Copy link
Member

To sum up findings that @Hallbergs and I made yesterday:

  • The fact that it works in localhost but fails in production indicates that something happens in the build stage
  • It seems like the timing of resolving our promises is right (at least as of 553c1c7, where the callback seems to fire after mounting due to useEffect)
    - In some mysterious way, all styling (both <style> and <link> elements) are empty in production, even though we clone all of them into the <head> of the print page

This seems to have something to do with our transition to MUI 5 #871 rather React 18 #1054.

@jacobwod jacobwod added bug difficulty:complex Functionality is considered complex to port plugin:documenthandler labels Jun 22, 2022
@jacobwod jacobwod added this to the 3.x milestone Jun 22, 2022
jacobwod added a commit that referenced this issue Jun 22, 2022
@Hallbergs
Copy link
Member

I think i've managed to solve this really annoying issue this evening. Will make sure to test it thoroughly tomorrow. Releasing before the summer vacation might not be impossible after all! 🥳

@Hallbergs Hallbergs reopened this Jun 22, 2022
@lina-sbk-gbg
Copy link
Author

🤞

@jacobwod jacobwod modified the milestones: 3.x, 3.10 Jun 23, 2022
@jacobwod
Copy link
Member

Good job @Hallbergs, closing it for the sake of consistency. We'll reopen, should problems arise.

@lina-sbk-gbg
Copy link
Author

Started testing 3.10 and I can see that basically everything is solved regarding the printing. However, I notice that the indents in the table of contents have disappeared. Is it possible to get these back?
Dokumentutskrift 3 9 vs 3 10

@jacobwod
Copy link
Member

I can confirm that one…

The indentation is lacking in the underlying rendered HTML document.

Skärmavbild 2022-08-22 kl  08 27 18

@jacobwod
Copy link
Member

It's fixed @lina-sbk-gbg!

If you really need to get this into production, see if someone can deploy a build from develop for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty:complex Functionality is considered complex to port plugin:documenthandler
Projects
None yet
Development

No branches or pull requests

3 participants