Skip to content

Commit

Permalink
Merge branch 'main' into mailchimp-tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Felienne authored Nov 7, 2024
2 parents 08664f8 + 523e6b8 commit b5af767
Show file tree
Hide file tree
Showing 720 changed files with 72,623 additions and 436,588 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy-to-alpha-manually.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Manually deploy to Alpha
on:
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: hedy-alpha
heroku_email: [email protected]
1 change: 1 addition & 0 deletions .github/workflows/deploy-to-alpha.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Automatically deploy to Alpha
on:

# Run this AFTER the unit test job finishes
workflow_run:
# Must be the same as in unittests.yml, cypresstests.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ jobs:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: hedy-beta
heroku_email: [email protected]
- name: "Send message on Discord"
if: success()
uses: discord-actions/message@v2
with:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
message: "Deployed to hedy.org"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@ file_logger.json
# We submitted a PR to the package, but it's still wating to be approved
# Until then, we can include it in .gitignore
# More info in #4540
foo.txt
foo.txt

# Generated schema json files
*.generated.schema.json
7 changes: 6 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ queue_rules:
commit_message_template: |-
{{ title }} (#{{number}})
{{ body }}
{# Add co-author information at the end of the squash merge commit message #}
{% for co_author in co_authors | unique -%}
Co-Authored-By: {{ co_author.name }} <{{ co_author.email }}>
{% endfor -%}
{# `Co-Authored-By` lines must the be last ones for GitHub to recognize them #}
pull_request_rules:
- name: Automatic squash merge on approval
Expand All @@ -21,4 +26,4 @@ pull_request_rules:
comment:
message: Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
queue:
name: default_queue
name: default_queue
354 changes: 345 additions & 9 deletions app.py

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions build-tools/github/validate-yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,26 @@ echo "------> Validating YAML"
# 'npx pajv validate' just hangs. Running the 'pajv' binary directly without the use of
# 'npx' does work... so we're just going to ¯\_(ツ)_/¯ and do that.

all_schemas=$(find content -name \*.schema.json)
schemas=$(find content -name \*.schema.json)

failures=false

for schema in $all_schemas; do
for schema in $schemas; do
dir=$(dirname $schema)
echo "------> Validating $(basename $dir)"

# The non-generated schema files that have required fields. They should be
# used for 'en.yaml' files. The generated schema files allow all fields to be
# optional, so they should be used to validate the rest of the yaml files.
if [[ $schema == *".generated."* ]]; then
files="*";
echo "------> Validating with optional fields $(basename $dir)/*.yaml"
else
files="en";
echo "------> Validating with required fields $(basename $dir)/en.yaml"
fi

# Run the validator.
if ! check-jsonschema -o text --schemafile $schema $dir/*.yaml > validate.txt; then
if ! check-jsonschema -o text --schemafile $schema $dir/$files.yaml > validate.txt; then
cat validate.txt || true
failures=true
fi
Expand Down
116 changes: 115 additions & 1 deletion build-tools/heroku/tailwind/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,27 @@ strong {
display: inline-block;
}

.btn-shape-new {
@apply font-slab leading-6 font-normal tracking-wide;
@apply pt-2 pb-1 px-4 border rounded-md no-underline;
display: inline-block;
}

.green-btn {
@apply btn-shape;
@apply bg-green-500 text-white border-green-700;
}

.green-btn-new {
@apply btn-shape-new;
@apply bg-green-500 text-white border-green-500;
}

.green-btn:disabled, .green-btn[disabled] {
@apply bg-gray-500 border-gray-700;
}


.green-btn:disabled, .green-btn[disabled] {
@apply bg-gray-500 border-gray-700;
}
Expand All @@ -111,6 +127,10 @@ strong {
@apply bg-white text-blue-500 border-blue-400;
}

.white-btn-new {
@apply btn-shape-new;
@apply bg-gray-100 text-blue-900 border-gray-100;
}

.stripe-colored {
@apply bg-yellow-400 border-yellow-500 border-b-4;
Expand Down Expand Up @@ -174,26 +194,58 @@ a.green-btn:hover {
@apply active:bg-green-700 active:border-green-700;
}

.green-btn-new:hover:enabled,
a.green-btn-new:hover {
@apply bg-green-400 border-green-500;
@apply active:bg-green-700 active:border-green-700 transition-all ease-in duration-200;
}

.red-btn {
@apply btn-shape;
@apply bg-red-500 text-white border-red-700;
}

.red-btn-new {
@apply btn-shape-new;
@apply bg-red-500 text-white border-red-500 transition-all ease-in duration-200;
}

.red-btn:hover {
@apply bg-red-400 border-red-500;
@apply active:bg-red-700 active:border-red-700;
}


.red-btn-new:hover {
@apply bg-red-400 border-red-400;
@apply active:bg-red-700 active:border-red-700;
}

.yellow-btn {
@apply btn-shape;
@apply bg-yellow-500 text-black border-yellow-700;
}

.yellow-btn-new {
@apply btn-shape-new;
@apply bg-yellow-500 text-black border-yellow-700 transition-all ease-in duration-200;
}

.yellow-btn:hover {
@apply bg-yellow-400 border-yellow-500;
@apply active:bg-yellow-700 active:border-yellow-700;
}

.yellow-btn-new:hover {
@apply bg-yellow-400 border-yellow-500;
@apply active:bg-yellow-700 active:border-yellow-700;
}

.pink-btn-new {
@apply btn-shape-new;
@apply text-white bg-pink-400 border-pink-500 transition-all ease-in duration-200;
}

.pink-btn {
@apply btn-shape;
@apply text-white bg-pink-400 border-pink-500;
Expand All @@ -204,16 +256,32 @@ a.green-btn:hover {
@apply active:bg-pink-700 active:border-pink-500;
}

.pink-btn-new:hover {
@apply bg-pink-300 border-pink-400;
@apply active:bg-pink-700 active:border-pink-500;
}

.blue-btn {
@apply btn-shape;
@apply bg-blue-500 text-white border-blue-700;
}


.blue-btn-new {
@apply btn-shape-new;
@apply bg-gray-200 text-blue-800 border-gray-200 transition-all ease-in duration-200;
}

.blue-btn:hover {
@apply bg-blue-400 border-blue-500;
@apply active:bg-blue-700 active:border-blue-700;
}

.blue-btn-new:hover {
@apply bg-blue-300 border-blue-400;
@apply active:bg-blue-400 active:border-blue-500;
}

.gray-btn-shape {
@apply font-slab leading-6 font-normal tracking-wide;
@apply pt-2 pb-1 px-4 rounded no-underline;
Expand Down Expand Up @@ -261,6 +329,11 @@ a.green-btn:hover {
}

h2 {
@apply font-slab font-medium text-blue-800;
@apply leading-tight text-2xl mb-2 mt-10;
}

.h2-new {
@apply font-slab font-medium text-blue-500;
@apply leading-tight text-2xl mb-2 mt-10;
}
Expand Down Expand Up @@ -334,6 +407,12 @@ code {
@apply active:bg-blue-700 active:border-blue-700
}

.menubar-item-new {
@apply cursor-pointer block border-b-4 tracking-wide;
/* Colors */
@apply border-gray-100;
}

.menubar-item {
@apply cursor-pointer block border-b-4 tracking-wide;
/* Colors */
Expand All @@ -350,12 +429,23 @@ code {
@apply border-blue-600 !important;
}

.menubar-item-new.active {
/* Colors */
@apply border-blue-700 !important;
}

.menubar-text {
@apply items-center text-base lg:text-xl no-underline font-slab p-1;
/* Colors */
@apply text-blue-600;
}

.menubar-text-new {
@apply items-center text-base lg:text-xl no-underline font-slab p-1;
/* Colors */
@apply text-blue-800;
}

.cust-adv-tab {
@apply cursor-pointer block border-b-4 tracking-wide;
/* Colors */
Expand Down Expand Up @@ -387,6 +477,10 @@ code {
@apply border-blue-500 border-2 bg-gray-100;
}

.dropdown-blue-new {
@apply border-blue-700 border-2 bg-gray-100;
}

.dropdown-green {
@apply bg-gray-100 border-2 border-green-500;
}
Expand Down Expand Up @@ -553,6 +647,13 @@ body[dir='rtl'] .right-hand-shadow {
box-shadow: none !important;
}

.adv-selected {
@apply ltr:border-l-4 rtl:border-r-4 bg-blue-100 ltr:rounded-r-lg rtl:rounded-l-lg;
}

.not-selected-adv {
@apply ltr:border-l-2 rtl:border-r-2;
}
/* EDITOR WARNINGS & ERRORS */

div#errorbox, div#warningbox {
Expand Down Expand Up @@ -900,4 +1001,17 @@ div[class^="ace_incorrect_hedy_code"] {
.fixed-editor-height .cm-scroller { @apply overflow-x-auto };

/* Remove the margin between the scroll bar and the side of the container */
.cm-editor { margin-right: 0px !important; }
.cm-editor { margin-right: 0px !important; }

/* Hyperscript doesn't like when we use [] inside of classes */
.max-h-550px {
@apply max-h-[550px]
}

.sliding-content-closed {
grid-template-rows: 0fr;
}

.sliding-content-open {
grid-template-rows: 1fr;
}
9 changes: 1 addition & 8 deletions content/adventures/adventures.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Short title of the adventure"
},
"subtitle": {
"type": "string",
"description": "Slightly longer introductory description of the adventure"
},
"adventures": {
"type": "object",
"description": "Individual adventures, key/value map",
"additionalProperties": { "$ref": "#/definitions/Adventure" }
}
},
"required": ["adventures"],
"definitions": {
"Adventure": {
"type": "object",
Expand Down
Loading

0 comments on commit b5af767

Please sign in to comment.