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

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

Closed
chrismclarke opened this issue Feb 22, 2024 · 1 comment · Fixed by #253
Closed

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

chrismclarke opened this issue Feb 22, 2024 · 1 comment · Fixed by #253
Assignees

Comments

@chrismclarke
Copy link
Collaborator

chrismclarke commented Feb 22, 2024

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

  • Add a button with share icon and text that converts the options tool
  • Add relevant html markup to indicate what should and should not be shared in the export
  • Convert to image using existing methods for sharing

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 chrismclarke moved this to Next Priority in PICSA Apps Development Feb 23, 2024
@chrismclarke chrismclarke moved this from Next Priority to In Progress in PICSA Apps Development Mar 11, 2024
@chrismclarke chrismclarke linked a pull request Mar 29, 2024 that will close this issue
@chrismclarke
Copy link
Collaborator Author

Closed with #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants