diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fea34dd04b..4f9a1f32fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,7 +115,7 @@ At a minimum, most pages should have `html`, `parent` and `blurb` fields (plus t | `skip_spell_checker` | Boolean | Use `true` to make the Dactyl's style checker skip spell-checking this page. | | `filters` | Array of Strings | A list of additional filters to use on this page. [Filters](https://github.com/ripple/dactyl/blob/master/README.md#filters) are Python scripts that provide additional pre- or post-processing of page contents. | | `canonical_url` | String | Provides the canonical URL for a page that takes query parameters. Search engines and other tools may use this when linking to the page. | -| `embed_ripple_lib` | Boolean | Use `true` to have the latest version of ripple-lib and its dependencies loaded on the page. | +| `embed_xrpl_js` | Boolean | Use `true` to have the latest version of [xrpl.js](https://js.xrpl.org) loaded on the page. | ### Conventions diff --git a/assets/js/tutorials/enable-no-freeze.js b/assets/js/tutorials/enable-no-freeze.js index 6f1ef401d0..3a2d775e5e 100644 --- a/assets/js/tutorials/enable-no-freeze.js +++ b/assets/js/tutorials/enable-no-freeze.js @@ -47,10 +47,10 @@ $(document).ready(() => {
${pretty_print(flags)}`)
if (flags.lsfNoFreeze) {
block.find(".output-area").append(`- No Freeze is enabled.
`) + No Freeze flag is enabled.`) } else { block.find(".output-area").append(`- No Freeze Tag is DISABLED.
`) + No Freeze flag is DISABLED.`) } complete_step("Confirm Settings") diff --git a/assets/js/tutorials/enact-global-freeze.js b/assets/js/tutorials/enact-global-freeze.js index 099a4d4e53..dff23fc108 100644 --- a/assets/js/tutorials/enact-global-freeze.js +++ b/assets/js/tutorials/enact-global-freeze.js @@ -3,8 +3,8 @@ // The code for these steps is handled by interactive-tutorial.js $(document).ready(() => { - // 3. Send AccountSet -------------------------------------------------------- - // also 6. Send AccountSet to end the freeze. + // 3. Send AccountSet to Start the Freeze ------------------------------------ + // also 6. Send AccountSet to End the Freeze. $(".send-accountset").click( async (event) => { const block = $(event.target).closest(".interactive-block") const address = get_address(event) @@ -17,10 +17,10 @@ $(document).ready(() => { let step_name if ($(event.target).data("action") === "start_freeze") { astx["SetFlag"] = xrpl.AccountSetAsfFlags.asfGlobalFreeze - step_name = "Send AccountSet" + step_name = "Send AccountSet (Start Freeze)" } else if ($(event.target).data("action") === "end_freeze") { astx["ClearFlag"] = xrpl.AccountSetAsfFlags.asfGlobalFreeze - step_name = "End Freeze" + step_name = "Send AccountSet (End Freeze)" } else { show_error(block, "There was an error with this tutorial: the button clicked must have data-action defined.") } @@ -60,10 +60,10 @@ $(document).ready(() => {${pretty_print(flags)}`)
if (flags.lsfGlobalFreeze) {
block.find(".output-area").append(`- Global Freeze is enabled.
`) + Global Freeze flag is enabled.`) } else { block.find(".output-area").append(`- Global Freeze Tag is DISABLED.
`) + Global Freeze flag is DISABLED.`) } complete_step("Confirm Settings") @@ -73,7 +73,7 @@ $(document).ready(() => { // 7. Wait for Validation: handled by generic full send as before. - // 8. Confirm Account Settings (freeze ended) + // 8. Confirm Account Settings (Freeze Ended) $("#confirm-settings-end").click( async (event) => { const block = $(event.target).closest(".interactive-block") const address = get_address(event) diff --git a/assets/js/tutorials/freeze-individual-line.js b/assets/js/tutorials/freeze-individual-line.js index c0cb8419d1..9e1c2d04e5 100644 --- a/assets/js/tutorials/freeze-individual-line.js +++ b/assets/js/tutorials/freeze-individual-line.js @@ -89,8 +89,8 @@ $(document).ready(() => { complete_step("Choose Trust Line") }) - // 4. Send TrustSet to freeze ------------------------------------------------ - // also 7. Send TrustSet to end the freeze + // 4. Send TrustSet to Freeze ------------------------------------------------ + // also 7. Send TrustSet to End the Freeze $(".send-trustset").click( async (event) => { const block = $(event.target).closest(".interactive-block") const address = get_address(event) @@ -128,7 +128,8 @@ $(document).ready(() => { } }) - // 5. Wait for Validation is handled by the snippet + // 5. Wait for Validation: handled by interactive-tutorial.js and by the + // generic full send in the previous step. ----------------------------------- // 6. Check Trust Line Freeze Status $("#confirm-settings").click( async (event) => { @@ -171,6 +172,6 @@ $(document).ready(() => { show_error(block, `Couldn't find a ${CURRENCY_TO_FREEZE} line between ${address} and ${peer.address}`) }) - // 7. Send TrustSet to End the Freeze is covered by the shared handler above + // 7. Send TrustSet to End the Freeze: same handler as step 4 }) diff --git a/content/_code-samples/freeze/js/check-global-freeze.js b/content/_code-samples/freeze/js/check-global-freeze.js index fc0f39c818..a05c317317 100644 --- a/content/_code-samples/freeze/js/check-global-freeze.js +++ b/content/_code-samples/freeze/js/check-global-freeze.js @@ -1,7 +1,7 @@ // Dependencies for Node.js. // In browsers, use -{% if currentpage.embed_ripple_lib %} +{% if currentpage.embed_xrpl_js %} {{currentpage.ripple_lib_tag}} {% endif %} diff --git a/tool/INTERACTIVE_TUTORIALS_README.md b/tool/INTERACTIVE_TUTORIALS_README.md index 3bd5b507f8..58ea53d9d3 100644 --- a/tool/INTERACTIVE_TUTORIALS_README.md +++ b/tool/INTERACTIVE_TUTORIALS_README.md @@ -51,12 +51,12 @@ For privacy reasons, the memo does not and MUST NOT include personally identifyi An interactive tutorial is a page, so you add it to the `dactyl-config.yml` page like any other page. However, you need to add the following pieces to make the interactive stuff work: -1. Set page properties, either in the config file or the page's frontmatter. The `interactive_steps` Dactyl filter gives you access to the functions you use to demarcate the interactive bits in your markdown file. The `include_code` filter is optional, but can be useful for pulling code samples out of another file. Most of the time, you'll also want to include xrpl.js and its dependencies as well; you can have the templates handle that for you by setting the field `embed_ripple_lib: true`. For example: +1. Set page properties, either in the config file or the page's frontmatter. The `interactive_steps` Dactyl filter gives you access to the functions you use to demarcate the interactive bits in your markdown file. The `include_code` filter is optional, but can be useful for pulling code samples out of another file. Most of the time, you'll also want to include xrpl.js and its dependencies as well; you can have the templates handle that for you by setting the field `embed_xrpl_js: true`. For example: html: use-tickets.html parent: manage-account-settings.html blurb: Use Tickets to send a transaction outside of normal Sequence order. - embed_ripple_lib: true + embed_xrpl_js: true filters: - interactive_steps - include_code