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

Create "print" HTML page of Algorithm System Card + option to export/print is as PDF #383

Open
8 tasks
anneschuth opened this issue Nov 21, 2024 · 0 comments
Open
8 tasks

Comments

@anneschuth
Copy link
Member

anneschuth commented Nov 21, 2024

Description

Implement a feature that generates a printable HTML page for the System Card, along with an option to export or print it as a PDF.
Make a 'printer-friendly' HTML version of the system card.

  • Content: Algorithm Info tab & Algorithm Details tab
  • Optimize for A4, should not break on other sizes
  • Ensure page breaks
  • Consider printer margins
  • Support portrait
  • Remove interactive elements (e.g. edit buttons)

Design:

Image
Image

Out of scope:

  • Styling
  • Precomputation of HTML content (unless performance issues arise)
  • landscape print support

Technical Implementation

  • Print button implementation according to designs.
  • HTML generation endpoint. This endpoint is also responsible for generating the html page from the database. If this turns out to be too slow, we should revisit this decision (and maybe pre-compute).
  • ctrl + p result in the same export as pressing the download button
  • Generated page is printer friendly and consistent across devices/browsers
  • PDF export works across different browsers
  • Error handling when export or print fails (similar to Export Algorithm System Card as YAML #374)
  • File naming conventions: AlgorithmName_DateTime.pdf where the datetime is in iso8601.
  • Handle special characters in algorithm names.
    • spaces -> underscores
    • invalid systemcard characters < > : " / \ | ? * -> removed
    • normalise accented characters to their basic form ü -> u
    • trim white spaces
@anneschuth anneschuth converted this from a draft issue Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ♻ To Do
Development

No branches or pull requests

1 participant