Skip to content

Commit

Permalink
Update styles in creator and accessibility in player
Browse files Browse the repository at this point in the history
  • Loading branch information
cayb0rg committed Nov 16, 2023
2 parents bb1b25d + 89ae60b commit e00f832
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 29 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on:
# Sequence of patterns matched against refs/tags
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [18.13.0]

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Test and build with node ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -31,5 +31,5 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/_output/*
tag: ${{ github.ref }}
overwrite: false
file_glob: true
overwrite: true
file_glob: true
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@

name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.3.1]

node-version: [18.13.0]
steps:
- name: Checkout code
uses: actions/checkout@v2

uses: actions/checkout@v4
- name: Run tests with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn install
# - run: yarn test-ci # no tests....... yet
- run: yarn build
- run: yarn build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"version": "2.3.1",
"dependencies": {
"materia-widget-development-kit": "~3.0.0",
"materia-widget-development-kit": "^3.0.1",
"micromarkdown": "^0.3.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/_exports/playdata_exporters.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
$cur_csv['question_text'] = "";
foreach ($questions as $q)
{
$clean_str = str_replace(["\r","\n", ","], "", $q->questions[0]['text']);
$clean_str = is_string($q->questions[0]['text']) ? str_replace(["\r","\n", ","], "", $q->questions[0]['text']) : "";

if (strlen($clean_str) > 80)
{
Expand Down Expand Up @@ -124,7 +124,7 @@
if (array_search($r['item_id'], $cur_csv['questions']) !== FALSE)
{
$position = array_search($r['item_id'], $cur_csv['questions']);
$logs[5 + $position] = str_replace(["\r","\n", ","], "", $r['text']);
$logs[5 + $position] = is_string($r['text']) ? str_replace(["\r","\n", ","], "", $r['text']) : "";
}
}
}
Expand All @@ -136,7 +136,7 @@
// Return the csv zip.
$tempname = tempnam('/tmp', 'materia_raw_log_csv');
$zip = new \ZipArchive();
$zip->open($tempname);
$zip->open($tempname, \ZipArchive::OVERWRITE);
foreach ($csvs as $key => $csv)
{
$string = $headers . $csv['question_text'] . "\r\n" . implode("\r\n", $csv['rows']);
Expand Down
10 changes: 5 additions & 5 deletions src/assets/icomoon.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?iwicyl');
src: url('fonts/icomoon.eot?iwicyl#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?iwicyl') format('truetype'),
url('fonts/icomoon.woff?iwicyl') format('woff'),
url('fonts/icomoon.svg?iwicyl#icomoon') format('svg');
src: url('assets/fonts/icomoon.eot?iwicyl');
src: url('assets/fonts/icomoon.eot?iwicyl#iefix') format('embedded-opentype'),
url('assets/fonts/icomoon.ttf?iwicyl') format('truetype'),
url('assets/fonts/icomoon.woff?iwicyl') format('woff'),
url('assets/fonts/icomoon.svg?iwicyl#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
Expand Down
6 changes: 6 additions & 0 deletions src/creator.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ <h4>Manage Inventory</h4>
tabindex="0"></span>
</div>
</div>
<div class="inventory-introduction" ng-if="inventoryItems.length == 0">
<h3>Item Inventory</h3>
<span>Create items to enhance your Adventure! Items add additional depth to the player experience: reward them upon reaching certain destinations and gate certain decisions behind item possession.
Items can represent physical goods, currencies, or status effects like reputation or emotional states.</span>
<span>Begin by creating at least one item below. Afterwards, additional options will be present at each destination to manage item distribution and answer requirements.</span>
</div>
<ul class="list-items">
<li
ng-class="{'selected' : editingIndex == $index}"
Expand Down
2 changes: 2 additions & 0 deletions src/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ meta_data:
Build branching scenarios where your student's choices lead them down different paths.
about: >
An advanced flexible scenario-building tool.
accessibility_keyboard: Full
accessibility_reader: Full
10 changes: 10 additions & 0 deletions src/src-assets/creator-assets/creator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,16 @@ required-items-tooltip {
border-top-right-radius: 2px;
}

.inventory-introduction {
text-align: center;
color: $gray-darker;

span {
display: block;
margin-bottom: 10px;
}
}

.list-items {
padding-top: 70px;
}
Expand Down
3 changes: 2 additions & 1 deletion src/src-assets/creator-assets/directives.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ angular.module "Adventure"
)

$scope.copyMode = false
$rootScope.$broadcast "tree.nodes.changed.complete" # inform the tree-transform directive that the tree has been re-rendered
$timeout ->
$rootScope.$broadcast "tree.nodes.changed.complete" # inform the tree-transform directive that the tree has been re-rendered

# Handle resizing of the browser window
window = angular.element($window)
Expand Down
4 changes: 3 additions & 1 deletion src/src-assets/legacyQsetSrv.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ angular.module "Adventure"

item.type = "Adventure"
item.nodeId = item.options.id
item.id = item.options.id
# extreme edge-case detection to ensure a mwdk mock id isn't being passed around
# this would generally only affect a v1 qset when viewed in the context of the mwdk
item.id = if typeof(item.options.id) is "string" and item.options.id.match(/^(mwdk-mock-id-[A-Za-z0-9\-]+)$/)[0] then item.options.id = 0 else item.options.id

delete item.assets

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4546,10 +4546,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/materia-widget-dependencies/-/materia-widget-dependencies-0.2.0.tgz#ebec53a9c10991bacf8b8ea9d6dfba5cd40ed912"
integrity sha512-eqab8DdPD0tzEicJWfgc/BJko/MSZarECmXENNwt4NUr757HCQJl7M+q70eXYO84Ssk3kHySTELgOTLES/FODg==

materia-widget-development-kit@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/materia-widget-development-kit/-/materia-widget-development-kit-3.0.0.tgz#266e7f2e3d774845838e25d1d775c93cd3f418fb"
integrity sha512-sybUgRn7BGUIyiLHecTrwMumZrFUI2kW7f/2+D9v7GiNCbJDPLqNA04KL38hiy69ISNhGcEgL17TVXsYf6QD0Q==
materia-widget-development-kit@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/materia-widget-development-kit/-/materia-widget-development-kit-3.0.1.tgz#16b48010d68c52a2382f117e628b714c5a2be47d"
integrity sha512-qVd9yzFPleu+FAYvboiA+EGvbP1e2GsVvhl4IG/YIxNXCvEtP7jZcCtpqXVY9p8piUPBAmxXY5E/NAS06iXRIw==
dependencies:
"@babel/core" "^7.22.17"
"@babel/preset-env" "^7.20.2"
Expand Down

0 comments on commit e00f832

Please sign in to comment.