Skip to content

Various minor fixes to embed and re-enabling tests.

Ben requested to merge fix/embed-target-blanks-5146 into master

Addresses:

Also:

Summary

  1. Fixes issue with tests not working because of some issues with sentry provider, also enabled production mode
  2. Fixes external links not opening in a new tab (clicking avatar for example on an embed)
  3. Fixes missing bulb favicon when on full-screen embed page.

Steps to test

Can only be tested locally as embed isn't set up for sandboxes

Setting up:

In your front-dir, run:

NODE_OPTIONS=--max_old_space_size=4096 ENGINE_SECURE=1 ENGINE_HOST=www.minds.com ENGINE_PORT=443 npm run serve:embed:dev -- --deploy-url=http://localhost:4300/

For the options above:

  1. Tests are proved working by the tests passing for this MR. In production build you can tell its in production mode because you wont see a log about development mode in the console.

  2. Go to http://0.0.0.0:4300/embed/1165349487103004672 - Check when clicking the avatar and title open links in a new tab.

  3. Favicon will not work locally - you can however go to a video like http://0.0.0.0:4300/embed/1165349487103004672, and change the URL of the favicon in the <head> such that it points to

<link rel="icon" type="image/svg" href="https://www.minds.com/static/en/assets/logos/bulb.svg">

You can do the same on a production link ( https://www.minds.com/embed/1165349487103004672 ), which is how this will be deployed, but set it to (as in this MR):

<link rel="icon" type="image/svg" href="/static/en/assets/logos/bulb.svg">

image

Estimated Regression Scope

Effects externally embedded videos only.

Platforms Affected

Just the embed module of the front-end (separate server to the main front)

Developer Testing Completed

Fixed spec tests and added a new one in to check for presence of target="_blank" on hrefs.

Screenshots / Design Links

N/A

Localisation Implemented?

N/A

Dark mode / Light mode compatible?

N/A

Edited by Ben

Merge request reports