Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat[Multimedia]: render svg using webview #17035

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

criticalAY
Copy link
Contributor

@criticalAY criticalAY commented Sep 7, 2024

Purpose / Description

Render SVG instead of showing a warning text.

Blocked by

Fixes

Approach

Use a webview to render an SVG in it

How Has This Been Tested?

Tested on OnePlus Nord CE:
image

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Contributor

github-actions bot commented Sep 7, 2024

Message to maintainers, this PR contains strings changes.

  1. Before merging this PR, it is best to run the "Sync Translations" GitHub action, then make and merge a PR from the i18n_sync branch to get translations cleaned out.
  2. Then merge this PR, and immediately do another translation PR so the huge change made by this PR's key changes are all by themselves.

Read more about updating strings on the wiki,

@criticalAY criticalAY added Blocked by dependency Currently blocked by some other dependent / related change Strings and removed Strings labels Sep 7, 2024
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks GREAT to me

@BrayanDSO BrayanDSO added the Needs Second Approval Has one approval, one more approval to merge label Sep 8, 2024
@BrayanDSO
Copy link
Member

Question: does this work for other formats?

Because animated PNGs are static in the ImageView, but animated when the card is opened

@criticalAY
Copy link
Contributor Author

Question: does this work for other formats?

No this method would require workarounds for different images, we can directly use webview to preview images

@BrayanDSO
Copy link
Member

we can directly use webview to preview images

So, is it possible to use the WebView instead of an ImageView to preview all the images?

That should handle all the images that can be rendered in a flashcard

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Blocked by dependency Currently blocked by some other dependent / related change Needs Second Approval Has one approval, one more approval to merge Strings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display SVGs in the image import preview
2 participants