From 5a76a76849cbaffa36d71f25dd8cf46702e34b22 Mon Sep 17 00:00:00 2001 From: Mayank Gupta Date: Tue, 13 Aug 2024 20:12:04 +0530 Subject: [PATCH 1/4] Added information about Rancher Desktop in readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index efdc5df..0fca197 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ These instructions create a new project from scratch. The add-on cannot be added Obviously, this requires a working [DDEV](https://ddev.com/) installation. ### Docker provider -This has been successfully tested with Orbstack, Colima, and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack requires one change: +This has been successfully tested with Orbstack, Colima, Rancher Desktop and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack requires one change: #### Orbstack @@ -31,6 +31,15 @@ web_environment: - DISPLAY=host.orb.internal:0 ``` +#### Rancher Desktop + +Override the default `$DISPLAY` environment variable in the container by adding the following to your `.ddev/config.yaml` file: + +```yaml +web_environment: + - DISPLAY=host.rancher-desktop.internal:0 +``` + ### XQuartz The XQuartz X Window System is required for Cypress testing on macOS. You can skip this step if you do not intend to run Cypress--if you only plan to do backend development or user testing, for example. You can return to it later if you change your mind. From 533c1e0e1dbd0b2eeb92ca45c6953683e6d66b2a Mon Sep 17 00:00:00 2001 From: Travis Carden Date: Fri, 16 Aug 2024 12:08:07 -0400 Subject: [PATCH 2/4] Make additional changes to README for Rancher Desktop. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0fca197..2078fb9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ These instructions create a new project from scratch. The add-on cannot be added Obviously, this requires a working [DDEV](https://ddev.com/) installation. ### Docker provider -This has been successfully tested with Orbstack, Colima, Rancher Desktop and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack requires one change: +This has been successfully tested with Orbstack, Colima, Rancher Desktop, and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack and Rancher Desktop each require an extra step: #### Orbstack @@ -158,7 +158,7 @@ No, not currently; and there are no plans at present to support it. See [Support If you get an error like the below when attempting to run Cypress on macOS... - Confirm that you have carefully followed _all_ the instructions under [Cypress](#cypress). -- If you're using Orbstack, take [the special steps outlined above](#orbstack). +- See if your [Docker provider](#docker-provider) above requires any special configuration. If these don't resolve the issue, see [Support & community](#support--community) above. From f929bb284f5a7f227264019622b8da1e6f377991 Mon Sep 17 00:00:00 2001 From: Travis Carden Date: Tue, 20 Aug 2024 18:31:23 -0400 Subject: [PATCH 3/4] Add an FAQ about HTTPS errors. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 2078fb9..2177918 100644 --- a/README.md +++ b/README.md @@ -182,3 +182,15 @@ Cypress Version: 13.12.0 Failed to execute command node_modules/.bin/cypress open --browser electron --project .: exit status 1 Failed to run xb-cypress-open ; error=exit status 1 ``` + +### What if I get an HTTPS error? + +If this is your first time using DDEV, you may get an error like the following when you try to visit your site. If so, you need to configure your OS and browser to trust the root certificate authority that DDEV uses. See [DDEV Installation](https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/). + +``` +This site can't be reached + +The webpage at https://example.com/ might be temporarily down or it may have moved permanently to a new web address. + +ERR_SSL_UNRECOGNIZED_NAME_ALERT +``` From 2b0b773d58e02519062ee49d2159f90c8211b015 Mon Sep 17 00:00:00 2001 From: Travis Carden Date: Tue, 20 Aug 2024 19:11:24 -0400 Subject: [PATCH 4/4] Add npm build to 'xb-npm-ci' command and rename to 'xb-npm-build'. --- README.md | 4 ++-- commands/host/.xb-command-include | 2 +- commands/host/xb-setup | 2 +- commands/web/xb-npm-build | 11 +++++++++++ commands/web/xb-npm-ci | 10 ---------- install.yaml | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) create mode 100755 commands/web/xb-npm-build delete mode 100755 commands/web/xb-npm-ci diff --git a/README.md b/README.md index 2177918..a81e79d 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,10 @@ To log into Drupal, run: ddev drush uli ``` -To clean-install the module's UI app, i.e., rebuild its front-end assets, run the following. Do this whenever you pull upstream changes to the module. +To clean-install and build the module's UI app assets, run the following. Do this whenever you pull upstream changes to the module. ```shell -ddev xb-npm-ci +ddev xb-npm-build ``` To completely reinstall Drupal and the Experience Builder module, run: diff --git a/commands/host/.xb-command-include b/commands/host/.xb-command-include index d97072f..d737234 100644 --- a/commands/host/.xb-command-include +++ b/commands/host/.xb-command-include @@ -13,7 +13,7 @@ # Exit as soon as one command returns a non-zero exit code. set -e -# TODO: Check for the presence of Cypress and instruct the user to run `ddev xb-npm-ci` and try again if not. +# TODO: Check for the presence of Cypress and instruct the user to run `ddev xb-npm-build` and try again if not. # Fails if XQuartz is not installed. function assert_xquartz_is_installed { diff --git a/commands/host/xb-setup b/commands/host/xb-setup index 141ed71..dd869cc 100755 --- a/commands/host/xb-setup +++ b/commands/host/xb-setup @@ -75,7 +75,7 @@ printf '\n# Allow test modules and themes to be installed.\n$settings["extension >> web/sites/default/settings.ddev.php # Build front-end assets. -ddev xb-npm-ci +ddev xb-npm-build # Install DDEV Selenium Standalone Chrome ddev get ddev/ddev-selenium-standalone-chrome diff --git a/commands/web/xb-npm-build b/commands/web/xb-npm-build new file mode 100755 index 0000000..223eb31 --- /dev/null +++ b/commands/web/xb-npm-build @@ -0,0 +1,11 @@ +#!/bin/bash + +## #ddev-generated +## Description: Clean-install and build Experience Builder's UI app assets. +## Example: ddev xb-npm-build +## Aliases: npm-build,npm:build + +cd "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/contrib/experience_builder/ui" || exit 1 + +npm ci +npm run build diff --git a/commands/web/xb-npm-ci b/commands/web/xb-npm-ci deleted file mode 100755 index 43fcebf..0000000 --- a/commands/web/xb-npm-ci +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -## #ddev-generated -## Description: Clean-install Experience Builder's UI app. -## Example: ddev xb-npm-ci -## Aliases: npm-ci,npm:ci - -cd "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/contrib/experience_builder/ui" || exit 1 - -npm ci diff --git a/install.yaml b/install.yaml index a9bf891..5a556fe 100644 --- a/install.yaml +++ b/install.yaml @@ -11,7 +11,7 @@ project_files: - commands/host/xb-cypress-run - commands/host/xb-setup - commands/web/xb-drush-si - - commands/web/xb-npm-ci + - commands/web/xb-npm-build - config.drupal-xb-dev.yaml post_install_actions: