e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
5 stars 1 forks source link

feat(options-tool): Export as image #238

Closed chrismclarke closed 3 months ago

chrismclarke commented 4 months ago

Is your feature request related to a problem? Please describe. Users are currently able to convert their budgets to images for sharing, however are unable to do so for data captured in the options tool. It would be good to provide some means for a user to convert their options matrix to an image for sharing

Describe the solution you'd like

Additional context You can see how budget sharing works by going into the budget tool, creating a budget and clicking the share button. The budget provides two different sharing options (image and app link), I think for the options tool we probably don't need to provide the options popup and instead just export as an image on click

The main part of the code that handles converting web page elements to an image can be found in: libs\shared\src\services\native\print.ts Hopefully the same method can be used with the options tool (although might need some minor improvements if not working as expected)

It would be good to also extract the name of the option to include in the export, and maybe also the image of the crop included if possible to do.

You can access the options tool directly from the home screen. See below an example of generated options matrix

Example options - image generated from screenshot localhost_4200_resources_search(PICSA-Tablet)

Ideally the in-app button should export a similar image but hiding the header and + option button. Possibly worth reviewing how the budget hides that information when it produces export like the image below

Example budget - image generated from app Maize production

chrismclarke commented 3 months ago

Closed with #253