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: add support for base64 images #154

Merged
merged 6 commits into from
Mar 15, 2024
Merged

Conversation

catalan-adobe
Copy link
Collaborator

@catalan-adobe catalan-adobe commented May 23, 2023

Context

Contribution following code sample shared with customer to solve the issue on a specific project.

What it does

How to test

  1. Clone https://github.com/hlxsites/petplace
  2. Checkout branch issue-28
  3. From the root project, in a terminal, run hlx import to fetch latest helix-importer-ui then stop it already.
  4. From tools/importer/helix-importer-ui/:
    • in package.json modify helix-importer dependency to adobe/helix-importer#feat-support-b64-images
    • rm node_modules
    • npm install
    • npm run build:dev
  5. Re-start Helix Importer server without fetching helix-importer-ui project, hlx import --skip-ui
  6. In Helix Importer UI:
    • use test URL https://www.petplace.com/article/breed/pembroke-welsh-corgi/
    • use importer script http://localhost:3001/tools/importer/import.js
    • run import
  7. In Preview tab, confirm that you see following images in the "Care Tabs" block:
    Screenshot 2023-05-23 at 15 46 48

@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.66%. Comparing base (b691d4a) to head (4fa0937).
Report is 40 commits behind head on main.

❗ Current head 4fa0937 differs from pull request most recent head cbc326d. Consider uploading reports for the commit cbc326d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
- Coverage   97.66%   95.66%   -2.00%     
==========================================
  Files          21       14       -7     
  Lines        1800     1547     -253     
==========================================
- Hits         1758     1480     -278     
- Misses         42       67      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@catalan-adobe catalan-adobe force-pushed the feat-support-b64-images branch from aa9615c to 893d427 Compare May 23, 2023 13:29
@catalan-adobe catalan-adobe requested a review from kptdobe May 23, 2023 13:47
@catalan-adobe
Copy link
Collaborator Author

@kptdobe, should this implementation support svg+xml:base64 images? Shouldn't these be considered icons and thus, follow https://www.hlx.live/developer/block-collection/icons rather than being automatically imported as is?

@catalan-adobe catalan-adobe merged commit 10963b0 into main Mar 15, 2024
4 checks passed
@catalan-adobe catalan-adobe deleted the feat-support-b64-images branch March 15, 2024 13:43
@adobe-bot
Copy link

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants