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

Qset standardization, preflight checks + various smaller patches #124

Open
wants to merge 16 commits into
base: dev/3.0.3
Choose a base branch
from

Conversation

fudgeu
Copy link

@fudgeu fudgeu commented Oct 2, 2024

This PR is built off of dev/3.0.3 and requires that to be merged in first

This PR includes a many fixes and patches for various things:

  • Fixes MWDK should warn users about invalid qset properties on creator save #120 - Qsets are now 'standardized' the same way that Materia Docker would standardize them. Much of the code for this standardization is heavily based off Materia Docker's code, so the behavior should be identical. Fields that are outside of what is expected in certain places (like 'options' within a question object, the issue I had) are now stripped and reported about in the console.
  • Fixes Add preflight checks to help new widget authors #43 - This builds off a lot of previous work to create preflight checks that make sure a developer's widget is structured all good.
    • Discussed with Corey to see what we should do to wrap up previous work for preflight checks. Main changes from the work previously done include:
      • Preflight checks no longer check the content of the creator/player/score JS files, and only checks that they exist.
      • Preflight checks depend on developers specifying the name of their widget files in install.yaml (files.player, files.creator, score.score_screen). Appropriately, webpack.config.js must be configured to output widget files using those same names.
      • Changed up the styling and layout of the preflight checks in the UI (see below).
      • Checking logic was slightly modified to be a bit smarter, informing the user what exact issues had occurred. Brief descriptions are given in the UI and more detailed descriptions are listed in the dev console.
      • Widgets can be downloaded/installed regardless if all preflight checks pass or not now. This should help in cases where developers want to test their widget in a local install of Materia, but may not have all screenshots set up, or what not.
  • Fixes Add a mechanism to scrape through a qset and verify that a 'question' structure is present. #26 - The demo qset is scraped to see if a question structure exists. This is a part of the preflight checks above.
  • Fixed Add an install.yaml validator #7 - install.yaml is validated as part of the preflight checks above.
  • Alert dialogs now show up again. Previously, a custom CSS rule was put in place to prevent a login timeout alert from showing up. This however prevents any alert dialog from showing up, including those sent by the widget when attempting to save. With the custom CSS removed, I don't seem to be getting any login timeouts anyway (but maybe some more testing/poking around is needed).
    • EDIT: I found out that a network timeout dialog pops up when you terminate the MWDK webpack server in the terminal. Personally, I don't think there is any case where I'd want to continue using the site when the server is terminated (since most things wouldn't load anything), but it's up for debate.
  • MWDK now checks for the presence of either webpack.config.js or webpack.config.cjs when initializing. This allows the easy use of an explicitly-defined CommonJS webpack config, saving some headaches when your project is using "type": "module" (like Pyramid Game is)

The only thing not addressed in the original issue is #21, or any of the 'qset editor' or 'install.yaml editor's mentioned in any of the other issues

Screenshot 2024-10-22 at 4 05 07 PM

FrenjaminBanklin and others added 11 commits March 25, 2019 16:31
…dancy and enable the 'Download Package' button on the splash screen, started working out backend logic for making preflight checks.
…o the output from the preflight checklist. Covered all checks so far.
- Qset will now be forced to conform to the same structure that Materia Docker enforces it to be
…ue/43

# Conflicts:
#	assets/css/mwdk-download.css
#	express.js
#	views/download.html
#	views/index.html
@fudgeu fudgeu changed the base branch from master to dev/3.0.3 October 22, 2024 20:17
@fudgeu fudgeu changed the title Qset standardization + various smaller patches Qset standardization, preflight checks + various smaller patches Oct 22, 2024
Copy link
Member

@clpetersonucf clpetersonucf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great aside from a few missing references that were hard-coded to the layout handlebar file. One other thing I've noticed: the score screen is an optional addition to the install.yaml, and the preflight check should indicate that.

If the score screen property is present in install.yaml, we should probably verify the file referenced actually exists. Potentially conversely, if a score screen html file is present, it should probably check that the property is in the install.yaml.

views/layout.hbs Outdated Show resolved Hide resolved
views/layout.hbs Outdated Show resolved Hide resolved
views/layout.hbs Outdated Show resolved Hide resolved
@fudgeu
Copy link
Author

fudgeu commented Dec 18, 2024

It looks like most of these issues come from work Brandon did 5 years ago when he initially did the pre-flight check system (looks like all from the first commit on this PR). I'll go through and remove em' since they don't seem applicable anymore, as well as add the score screen checks.

- Removed old dependencies that were a part of a commit 5 years ago
- Changed scoreScreen preflight checks to pass if the property is not present
- Additionally will now fail is a custom scoreScreen file is present but the property is not specified in the install.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MWDK should warn users about invalid qset properties on creator save
4 participants