Skip to content

Commit

Permalink
📝 Added path-ignore to pull_request and main
Browse files Browse the repository at this point in the history
  • Loading branch information
Etesam913 committed Aug 3, 2022
1 parent b1c8134 commit 37aa538
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cypress-end-to-end-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: cypress-end-to-end-tests
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches: [main]
paths-ignore:
Expand Down
2 changes: 2 additions & 0 deletions mephisto/abstractions/blueprints/static_html_task/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# `StaticHTMLBlueprint`

## Overview
The `StaticHTMLBlueprint` exists to create a simple transition stand-in to allow users of other platforms (which generally push for customization with HTML) to begin using Mephisto with minimal changes. This generally exists in the form of specifying a templated HTML file and providing assignment data that fills the templates.

Expand All @@ -9,6 +10,7 @@ An example usage case is available [here](https://github.com/facebookresearch/Me

## Implementation Details
At a high level, this is a deeper implementation of the abstract `StaticArchitect`, which contains all of the logic for deploying arbitrary tasks where the worker is given some content, and we ask for one response, as a complete `Unit`. This module adds the logic to ensure that the frontend where the worker is given content is able to render arbitrary HTML.

### `app.jsx`
The `app.jsx` file contains most of the logic to ensure we can render HTML, including being able to attach and execute the arbitrary scripts that are included or linked in the given HTML file. It creates a react application using the `mephisto-task` package, and creates an empty form with a submit button. It then populates the inner form using two primary methods:
- `handleUpdatingRemainingScripts`: This method walks through the list of scripts that are given in the attached HTML, either loading the external script and putting it into the head, or directly evaluating the content of local scripts. As the page has already loaded by the time we are loading in the remaining scripts, this all must be injected in an asynchronous manner. _Ultimately_ this isn't incredibly safe if you don't trust the attached scripts.
Expand Down

0 comments on commit 37aa538

Please sign in to comment.