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

Convert getWebsiteIconUrl util to use Brandfetch api #5712

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jan 29, 2025

Closes HA-409

Description Of Changes

Currently using DuckDuckGo’s api that gives us an image that is too small in dimension size. Switching to use Brandfetch will give us a lot more options.

Code Changes

  • Add fallback icon to the monitor list avatar
  • convert util to use Brandfetch

Steps to Confirm

Since none of our web monitors are currently returning a property value (which will include the URL) this can only be tested manually at the moment.

  1. Checkout and run the backend from Adam's branch in the fidesplus repo (asachs/HJ-295).
  2. Run turbo dev from the clients directory
  3. Visit AdminUI's "About" page and enable the new "Website Monitor" feature flag
  4. Click the "Action center" left nav item
  5. If you receive a message here saying it's disabled, contact Adam to update config.
  6. You should see a list of web monitors.
  7. Currently the globe icon is the only icon each will have. This is the fallback.

To test manually:

  • hard code a domain on line 58 of MonitorResults.tsx in place of the property property in the getWebsiteIconUrl util. For example: setIconUrl(getWebsiteIconUrl("ethyca.com"));
  • This will set the Ethyca (or whatever domain you enter) icon on all monitors, but at least you can verify that the utility itself is working.

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
  • Followup issues:
    • Followup issues created (include link)
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 5:21pm

Copy link

cypress bot commented Jan 29, 2025

fides    Run #12089

Run Properties:  status check passed Passed #12089  •  git commit f8f69cbad7 ℹ️: Merge 47634f2d41c9b25fb9a207fd54c9472ce4700bca into c4d69ccb55793e152b0e29c7288d...
Project fides
Branch Review refs/pull/5712/merge
Run status status check passed Passed #12089
Run duration 00m 47s
Commit git commit f8f69cbad7 ℹ️: Merge 47634f2d41c9b25fb9a207fd54c9472ce4700bca into c4d69ccb55793e152b0e29c7288d...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

@gilluminate gilluminate requested a review from jpople January 29, 2025 21:24
Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Tested locally-- logos look good so I'll go ahead and approve, but the copy is missing a space when property value is populated:

Screenshot 2025-01-31 at 10 47 28

@gilluminate gilluminate merged commit 50f44b8 into main Feb 3, 2025
20 checks passed
@gilluminate gilluminate deleted the gill/HA-409/convert-get-website-icon-url-util branch February 3, 2025 18:32
Copy link

cypress bot commented Feb 3, 2025

fides    Run #12093

Run Properties:  status check passed Passed #12093  •  git commit 50f44b8b38: Convert getWebsiteIconUrl util to use Brandfetch api (#5712)
Project fides
Branch Review main
Run status status check passed Passed #12093
Run duration 00m 50s
Commit git commit 50f44b8b38: Convert getWebsiteIconUrl util to use Brandfetch api (#5712)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

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

Successfully merging this pull request may close these issues.

2 participants