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

Print #1241

Closed
42 of 54 tasks
usu opened this issue Apr 16, 2021 · 8 comments
Closed
42 of 54 tasks

Print #1241

usu opened this issue Apr 16, 2021 · 8 comments
Assignees
Labels
Projects
Milestone

Comments

@usu
Copy link
Member

usu commented Apr 16, 2021

Requirements

  • Handle page break reasonably
  • Links should be working (ToC)
  • Features in Future
  • Good UX
  • Perfomance on mobile
  • Not to many tech stacks
  • Comprehensive frameworks
  • Beautiful pdfs
  • Text should be selectable and copyable

Proposals: #2301 & #1924

Nuxt + Paged.js open issues

Tech

  • Add browserless container or browserless.io to the deployment
  • Verify if we want to use browserless container for deployment
  • Investigate the best option for fonts
  • Investigate queue behaviour on deployment: What happens when the queue is full? Can we autoscale the pod up to more instances? -> solved with nodejs
  • Use a read-only TipTap or an html parser instead of v-html for rendering rich text fields
  • Tailwind resets all HTML styles. For rendering Richtext, need to add some styles again - either manually or with typography plugin
  • Harmonize ESLint / Prettier code style in print with the ESLint style in frontend
  • Check if sentry still works (both for Nuxt & server middleware?)
  • Throttle preview loading on changing config (in case preview is going to be available in production) preview removed from production
  • nuxt print: Send config as POST-parameter #5065
  • Optional: Replace v-calendar with a self-made picasso print component, and remove vuetify from print chore(print): replace vuetify calendar #3887
  • Optional: Add tailwind as a CSS framework

Features

Bugs

React PDF open issues

Tech

  • Broken on prod, because data is supposedly missing in the store? But that exact data is present in the fetched API response...
  • Merge POC: printing with react-pdf #1924
  • Can we do better than re-implement small read-only versions of hal-json-vuex and vue-i18n?
    • If we upgrade to vue-i18n v9, I think this will be possible: It has much better separation of concerns, and we should be able to instantiate vue-i18n without adding it to a Vue instance. But vue-i18n v9 only supports Vue 3... By using only the core library, Vue is not needed. Print react improvements #2478
    • For hal-json-vuex, maybe now the time has come to re-write that from scratch in Typescript, with similarly better separation of concerns?
  • Fix the console errors about requestAnimationFrame when using the web worker in Firefox Print react improvements #2478
  • Vite does not recompile the worker file, or does not correctly invalidate cache for it. May be due to vite-plugin-worker, or maybe we just need to add a custom hot reloading handler? Client-side printing with Vue #3532
  • Vite warning during build: "Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification" - was fixed in upgrade yoga-layout to latest version  diegomura/react-pdf#2105
  • Can't import named exports in jsx files: Print react improvements #2478
     // does not work
    import { sortBy } from 'lodash'
    // works
    import lodash from 'lodash'
    const { sortBy } = lodash
  • Console log does not show up from worker (Chrome has a separate console for worker logs I think, but Firefox does not) In the Firefox JS console, at the bottom right there is a Dropdown menu saying "Top" by default, which can be used to view web worker logs
  • Sentry in web worker - apparently this just works, at least we are getting sentry issues from dev: https://sentry.io/organizations/ecamp/issues/3035369131. But further improvements in Print react improvements #2478
  • Fix sentry when errors are returned from worker
  • Contribute globalWorkerShim.js to exogee-technology/vite-plugin-shim-react-pdf Enable usage of react-pdf inside a web worker exogee-technology/vite-plugin-shim-react-pdf#3 Print react improvements #2478
  • Test performance on Android, web workers are reportedly slow to start there. Depending on the outcome, consider the following options:
    • client-print: reuse worker #5068
    • Render on the server side in a node.js service. But this would lose us many of the advantages of client-side rendering: New solutions for authentication, API access, i18n, storage, worker queues etc. would become necessary again then.
  • The vite dev server sometimes crashes with out of memory when exchanging the root react component or some other large imports?
  • Duplicate smarter API reloading for print-react

Features

Not in MVP

  • Notizpapier (ecamp2)
  • PDF upload (ecamp2)
@usu usu added the Epic label Apr 16, 2021
@manuelmeister manuelmeister added this to Print in Epics Apr 16, 2021
@manuelmeister manuelmeister added this to In progress (assigned) in Development Apr 16, 2021
@manuelmeister manuelmeister removed this from In progress (assigned) in Development Apr 16, 2021
@manuelmeister manuelmeister changed the title EPIC Print Print Apr 16, 2021
@manuelmeister
Copy link
Member

Meeting Notes

IMG_371D9A47DC75-1

@carlobeltrame
Copy link
Member

Übrigens, als Tipp beim Entwickeln der Print Preview: Die Firefox Dev Tools haben einen print simulations Modus, in dem man @media(print) simulieren kann.

@pmattmann
Copy link
Member

MVP wird ja vermutlich nur mit "Vorschau und selber PDF erstellen" sein.
Falls ein Ausbau gemacht wird, möchte ich gerne folgende Alternative geprüft haben:

Statt Worker-Queue und Print-Enginge selber betreuen, kann dies günstig eingekauft werden.
(~ 1 Cent pro PDF)

@carlobeltrame
Copy link
Member

Eine weitere Alternative die es zu bedenken gibt: PDF direkt clientseitig generieren, mit einer eingebetteten React-Komponente die das kann: #1924

@manuelmeister
Copy link
Member

manuelmeister commented Feb 8, 2022

Core Meeting Variantenentscheid

Haupt Risiken

Pagedjs #2021 (comment)

  • Umbrüche mit Mehrspaltenlayout
  • Keine Instant Previews
  • Schriftensupport?

React PDF #2023 (comment)

  • Rendern auf Client (Mobile)
  • Reduced CSS set
  • Zusätzlicher Framework Stack

Entscheidung

  • Wir gehen mit beiden Varianten parallel
  • Einschränkungen der Benutzerfunktionalität sind auch noch später möglich (zB bei Pagedjs Storyboard nicht in einem Mehrspalten-Layout)
  • Vorschlag eines sinnvollen Benutzerflows / UI

Nuxt+Pagedjs: @usu
ReactPDF: @carlobeltrame

@BacLuc
Copy link
Contributor

BacLuc commented Apr 27, 2024

Not implemented features are tracked in new issues

@BacLuc BacLuc closed this as completed Apr 27, 2024
@manuelmeister
Copy link
Member

@BacLuc which ones?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Epics
Print
Development

No branches or pull requests

5 participants