Various minor fixes to embed and re-enabling tests.
Addresses:
- Video Embeds: Re-enable tests and production mode
- Video Embeds: external links should open in new tab
- Video Embeds: bulb icon missing and errors in the console
Also:
- Docs update to serve embeds against prod docs!74 (merged)
Summary
- Fixes issue with tests not working because of some issues with sentry provider, also enabled production mode
- Fixes external links not opening in a new tab (clicking avatar for example on an embed)
- 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:
-
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.
-
Go to http://0.0.0.0:4300/embed/1165349487103004672 - Check when clicking the avatar and title open links in a new tab.
-
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">
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