Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/2.1.0 #42

Merged
merged 55 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
cbd478d
added modal and aria descriptions to flipping pages
DynieM Sep 1, 2023
1003556
audiocontrol changes, install.yaml, keyboard instructions, and screan…
DynieM Sep 5, 2023
3fa8449
dialog/modal instructions and screen reader for switching pages
DynieM Sep 5, 2023
bb8a955
aria live alerts/notifications & keyboard function for moving between…
DynieM Sep 5, 2023
a6e1753
made page navigation arrows into buttons
DynieM Sep 6, 2023
3d6b377
fixed finish button and edited screenreader feature for switching pages
DynieM Sep 8, 2023
670eda5
Update config
cayb0rg Sep 13, 2023
89744e0
fixed page buttons and instructions dialog
DynieM Sep 20, 2023
518d02b
Update bootstrap order
cayb0rg Oct 10, 2023
55b073e
Upgrade package version
cayb0rg Oct 25, 2023
36051f4
Update release-build.yml
cayb0rg Oct 31, 2023
5addb96
Update test.yml
cayb0rg Oct 31, 2023
a386117
Update test.yml
cayb0rg Oct 31, 2023
f5dea3f
Update release-build.yml
cayb0rg Oct 31, 2023
4dee8de
Update tests
cayb0rg Oct 31, 2023
5f19fbf
fixed tabindex issues
DynieM Nov 8, 2023
f4e9a8e
added back assistiveAlert
DynieM Nov 21, 2023
91d61d6
screenreader says how many matches are left after a match is made
DynieM Dec 6, 2023
6ac6a61
Implemented question bank and added styling
dmols Jan 2, 2024
41af181
added on-hover CSS and element centering + watch function for questio…
dmols Jan 4, 2024
2100782
fixed undefined bug and added alert of how many matches are made afte…
DynieM Jan 8, 2024
4e870e8
removed comments made for debugging
DynieM Jan 8, 2024
3a0fc77
Added more css for dialog and replaced questionBankVal listener with …
dmols Jan 9, 2024
4a9e119
Updated test snapshots
dmols Jan 9, 2024
66a807d
Added edge case protection for qb shuffle, test coverage, and lowered…
dmols Jan 9, 2024
59a8dec
Changed dialog button styling to fit the theme better
dmols Jan 12, 2024
b07a4e6
Fixed color reference names
dmols Jan 26, 2024
b5642ee
Swapped css selector names to snake-case and added extra condition to…
dmols Jan 26, 2024
b28c08a
Added placeholder for questionBankVal, input validation, and fixed ht…
dmols Jan 26, 2024
0d5bfbf
Added small updates to functionality and all requested style updates
dmols Jan 29, 2024
7f9e639
Reverted changes to shuffle function name and testing
dmols Jan 29, 2024
7cb142d
Added test coverage for enableQuestionBank case
dmols Feb 6, 2024
0130582
cleaned up commented out css code
dmols Feb 6, 2024
267c663
very minor css change for disabled qb button
dmols Feb 6, 2024
8fb1fcf
Added style changes to qb button and dialog close button
dmols Feb 8, 2024
e7be004
disabled gray-out when no word pairs exist
dmols Feb 8, 2024
2409284
Simplified questionBankVal validation and added test coverage for fun…
dmols Feb 9, 2024
5e17a2d
Minor styling changes
dmols Feb 13, 2024
a4bc69b
Added safeguarding for older qsets
dmols Feb 28, 2024
6b64b52
fixed duplication error and added instructions for keyboard
DynieM Mar 7, 2024
edd4cbf
ignored launch.json
DynieM Mar 7, 2024
0122769
fixed whitespace and indentation
DynieM Mar 7, 2024
8d87e86
deleted .vscode/launch.json
DynieM Mar 14, 2024
6f5011e
Merge pull request #41 from dmols/questionBank_functionality
clpetersonucf Apr 16, 2024
b7d568c
Resolves yarn.lock merge conflict
clpetersonucf Apr 17, 2024
feddd9f
Renews lockfile; updates release-build to use correct version of acti…
clpetersonucf Apr 17, 2024
0764715
Resolves merge conflicts with dev/2.1.0
clpetersonucf Apr 17, 2024
bff5801
Merge pull request #39 from cayb0rg/issue/mwdk-upgrade
clpetersonucf Apr 17, 2024
72a0a44
Merge conflict resolution with dev/2.1.0 part 1
clpetersonucf Apr 17, 2024
986b40a
changed insert code to set and remove attribute, also added checks fo…
DynieM May 9, 2024
aa42133
player.html fixed
DynieM May 9, 2024
d207875
fixed last inert issue
DynieM May 14, 2024
0ce4715
Fix indentation of accessibility metadata in install.yaml
clpetersonucf May 14, 2024
49a3189
Adjusts test coverage thresholds in package json
clpetersonucf Jun 11, 2024
a53750a
Merge pull request #40 from DynieM/accessibility-edits
clpetersonucf Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
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
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.3.1, 12.x]
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
- run: yarn build
- run: yarn build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
bower_components
*build
coverage
.vscode/
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
},
"version": "2.0.5",
"dependencies": {
"materia-widget-development-kit": "2.5.2"
"materia-widget-development-kit": "~3.0.0"
},
"devDependencies": {
"angular": "1.6.9",
"angular-mocks": "~1.5.0",
"jest": "^23.6.0",
"jest-coffee-preprocessor": "^1.0.0"
},
"scripts": {
"start": "webpack-dev-server",
"build": "webpack -p",
"build-dev": "webpack",
"start": "mwdk-start",
"build": "mwdk-build-prod",
"build-dev": "mwdk-build-dev",
"test": "TZ='America/New_York' jest --verbose",
"test-ci": "TZ='America/New_York' CI=true jest --ci --useStderr --coverage --coverageReporters text-summary cobertura"
},
Expand All @@ -37,10 +38,10 @@
],
"coverageThreshold": {
"global": {
"statements": 91,
"statements": 84,
"branches": 60,
"functions": 80,
"lines": 90
"functions": 78,
"lines": 86
}
}
},
Expand Down
8 changes: 5 additions & 3 deletions src/audioControls.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div class='audio-controls'>
<span class='play-btn'
<button class='play-btn'
aria-label="Play audio clue."
ng-class="{'paused' : audio.paused}"
ng-click='$event.stopPropagation(); play()'>
</span>
ng-click='$event.stopPropagation(); play()'
ng-keypress="$event.stopPropagation()">
</button>
<span class='time'>
<span class='seek-bar'>
<input type='range'
Expand Down
10 changes: 10 additions & 0 deletions src/controllers/__snapshots__/creator.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ Object {
"name": "null",
},
],
"options": Object {
"caseSensitive": null,
"enableQuestionBank": false,
"questionBankVal": 1,
},
}
`;

Expand Down Expand Up @@ -119,6 +124,11 @@ Object {
"name": "null",
},
],
"options": Object {
"caseSensitive": null,
"enableQuestionBank": false,
"questionBankVal": 1,
},
}
`;

Expand Down
24 changes: 19 additions & 5 deletions src/controllers/creator.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Matching = angular.module 'matching', ['ngAnimate']

Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->
angular.module 'matching', ['ngAnimate']
.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->
_qset = {}
materiaCallbacks = {}
# Stores data to be gathered on save.
Expand All @@ -11,6 +10,10 @@ Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->

$scope.acceptedMediaTypes = ['mp3']
audioRef = []
$scope.questionBankDialog = false
$scope.enableQuestionBank = false
$scope.questionBankValTemp = 1
$scope.questionBankVal = 1

# Adds and removes a pair of textareas for users to input a word pair.
$scope.addWordPair = (q=null, a=null, media=[0,0], id='') ->
Expand All @@ -28,6 +31,11 @@ Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->
materiaCallbacks.initExistingWidget = (title, widget, qset, version, baseUrl) ->
_items = qset.items[0].items

if qset.options
$scope.enableQuestionBank = if qset.options.enableQuestionBank then qset.options.enableQuestionBank else false
$scope.questionBankVal = if qset.options.questionBankVal then qset.options.questionBankVal else 1
$scope.questionBankValTemp = if qset.options.questionBankVal then qset.options.questionBankVal else 1

$scope.$apply ->
$scope.widget.title = title
$scope.widget.wordPairs = []
Expand Down Expand Up @@ -77,7 +85,12 @@ Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->
$scope.hideCover()

$scope.hideCover = ->
$scope.showTitleDialog = $scope.showIntroDialog = $scope.showErrorDialog = false
$scope.showTitleDialog = $scope.showIntroDialog = $scope.showErrorDialog = $scope.questionBankDialog = false
$scope.questionBankValTemp = $scope.questionBankVal

$scope.validateQuestionBankVal = ->
if ($scope.questionBankValTemp >= 1 && $scope.questionBankValTemp <= $scope.widget.wordPairs.length)
$scope.questionBankVal = $scope.questionBankValTemp

$scope.autoSize = (pair, audio) ->
question = pair.question or ''
Expand Down Expand Up @@ -116,6 +129,7 @@ Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->

_buildSaveData = ->
_qset.items = []
_qset.options = {caseSensitive: null, enableQuestionBank: $scope.enableQuestionBank, questionBankVal: $scope.questionBankVal}
_qset.items[0] =
name: "null"
items: []
Expand Down Expand Up @@ -175,4 +189,4 @@ Matching.controller 'matchingCreatorCtrl', ['$scope', '$sce', ($scope, $sce) ->
assets: [questionMediaId, answerMediaId, answerAudioId]

Materia.CreatorCore.start materiaCallbacks
]
]
20 changes: 20 additions & 0 deletions src/controllers/creator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,26 @@ describe('Matching Creator Controller', function(){
expect(successReport.qset).toMatchSnapshot()
});

it('should update questionBankVal if questionBankValTemp is valid within the range', function () {

qset.data.options = {enableQuestionBank: true, questionBankVal: 6};
materiaCallbacks.initExistingWidget('matcher', widgetInfo, qset.data);

// set initial values where questionBankValTemp is invalid
$scope.questionBankValTemp = 11;
$scope.validateQuestionBankVal();

// expect questionBankVal to change to wordPairs value
expect($scope.questionBankVal).toBe(6);

// this time questionBankValTemp is valid
$scope.questionBankValTemp = 8;
$scope.validateQuestionBankVal();

// expect questionBankVal to be updated to questionBankValTemp
expect($scope.questionBankVal).toBe(8);

});

it('should properly remove word pair', function(){
materiaCallbacks.initNewWidget('matcher');
Expand Down
Loading
Loading