-
Notifications
You must be signed in to change notification settings - Fork 2
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
Release v1.0.4 #28
Release v1.0.4 #28
Conversation
devonpis
commented
Apr 13, 2022
- update FormioLoader callback
- improve story code snippets to be more meaningful
- improve folder structure
<script> | ||
${indent( | ||
SimpleWizard.toString().replaceAll( | ||
"_helpers_FormioLoader__WEBPACK_IMPORTED_MODULE_0__", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code will show in the code snippet of the story, provides a functional example if the user copy and paste the code to a html page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the function has alredy transpiled by webpack, and webpack has replaced FormioLoader
with _helpers_FormioLoader__WEBPACK_IMPORTED_MODULE_0__
, so i have to convert it back...
export const singleSignOnCode = ` | ||
<head> | ||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | ||
<script src="https://static.qgov.net.au/formio-qld/v1/v1.x.x-latest/formio-script.prod.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there 'prod' in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formio-script.prod.min.js will load the scripts defined in src/helpers/FormioScript/index.prod.js
formio-script.dev.min.js will load the scripts defined in src/helpers/FormioScript/index.dev.js
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the prod one can be renamed to formio-script.min.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you can, that would be great.
@@ -4,9 +4,16 @@ import { Meta } from "@storybook/addon-docs"; | |||
|
|||
# FormioScript | |||
|
|||
FormioScript provide shorthand implementation that helps loading the necessary scripts that need to load a Formio form in your application. | |||
FormioScript provide shorthand implementation to lazy load the necessary libraries and scripts that need to initiate a Formio form in your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grammar here could use more work. Perhaps:
"FormioScript provides a shorthand implementation to lazy-load the necessary libraries and scripts to initiate a Formio form in your application."
**Benefits** | ||
|
||
- One script and for all, reduce the chance of missing dependency. | ||
- Enforce the script are loading in certain order, wrong order will break the application, which is prone to error if insert manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"script" should be "scripts"