From eabe8cee3e3585bd2890ec18aa6daaa801c37769 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 14:56:53 +0100 Subject: [PATCH 01/29] fix vale errors and warnings --- .github/styles/Google/Headings.yml | 5 +++++ .github/styles/Google/We.yml | 7 ++++++- .github/styles/Google/WordList.yml | 1 - README.md | 4 ++-- docs/components/emails.rst | 8 ++++---- docs/components/translator.rst | 2 +- docs/form_hooks/getting_started.rst | 2 +- docs/form_hooks/response_hooks.rst | 4 ++-- docs/form_hooks/validation_hooks.rst | 2 +- docs/index.rst | 2 +- docs/plugins/config.rst | 2 +- docs/plugins/getting_started.rst | 2 +- docs/plugins/mautic_vs_symfony.rst | 6 +++--- docs/plugins/translations.rst | 2 +- docs/themes/forms.rst | 2 +- docs/themes/getting_started.rst | 4 ++-- docs/webhooks/events/email_on_send.rst | 2 +- .../webhooks/events/lead_channel_subscription_changed.rst | 2 +- docs/webhooks/events/lead_company_change.rst | 2 +- docs/webhooks/events/lead_points_change.rst | 2 +- docs/webhooks/getting_started.rst | 2 +- 21 files changed, 37 insertions(+), 28 deletions(-) diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml index 5afb968d..12134492 100644 --- a/.github/styles/Google/Headings.yml +++ b/.github/styles/Google/Headings.yml @@ -24,3 +24,8 @@ exceptions: - Visual - VS - Windows + - PHPUnit.xml + - Continuous Integration + - Legacy Builder + - GrapesJS Builder + - Node.js diff --git a/.github/styles/Google/We.yml b/.github/styles/Google/We.yml index c7ac7d36..8617ef9e 100644 --- a/.github/styles/Google/We.yml +++ b/.github/styles/Google/We.yml @@ -2,10 +2,15 @@ extends: existence message: "Try to avoid using first-person plural like '%s'." link: 'https://developers.google.com/style/pronouns#personal-pronouns' level: warning -ignorecase: true +ignorecase: false tokens: - we + - We - we'(?:ve|re) + - We'(?:ve|re) - ours? + - Ours? - us + - Us - let's + - Let's diff --git a/.github/styles/Google/WordList.yml b/.github/styles/Google/WordList.yml index 7303843f..0c094905 100644 --- a/.github/styles/Google/WordList.yml +++ b/.github/styles/Google/WordList.yml @@ -50,7 +50,6 @@ swap: ephemeral IP address: ephemeral external IP address fewer data: less data file name: filename - firewalls: firewall rules functionality: capability|feature Google account: Google Account Google accounts: Google Accounts diff --git a/README.md b/README.md index 43a710e2..a370b1c7 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you're looking for our legacy developer documentation, please go to https://d We aim to move all aspects of the developer documentation to Read the Docs (with the exception of the REST API documentation). In the video below, [@dennisameling][dennisameling GH profile] explains how the documentation is currently structured and briefly touches upon current limitations we're running into. -For more background, our end goal, and to let us know if you want to help, please check out [this issue][New docs background and goals]. Thanks in advance! +For more background, our end goal, and to let us know if you want to help, please check out [this issue][New docs background and goals]. Thanks in advance. [![Link to YouTube video with explanation of the current developer documentation structure][YouTube video image]][YouTube video URL] @@ -63,7 +63,7 @@ Before pushing, run Vale and address suggestions and errors as applicable. 2. `vale .` ### PhpStorm/PyCharm File Watcher -You can automatically build changes to rst files using a file watcher. +You can automatically build changes to `.rst` files using a file watcher. 1. Go to Preferences -> Tools -> File Watchers -> + button -> custom 2. Configure the watcher as presented in the screenshot diff --git a/docs/components/emails.rst b/docs/components/emails.rst index c1957143..17310394 100644 --- a/docs/components/emails.rst +++ b/docs/components/emails.rst @@ -518,7 +518,7 @@ Use the builder to do the following: - Complete the ``From Name`` & ``From Address``, ``BCC``, ``Reply-To``, ``Add Attachment``, ``custom headers``, and Click on ``Auto Generate`` to create a text version of the Email - Save the Email and send a sample test, you should get everything you filled -Create a Segment Email +Create a segment email ====================== Go to Channels -> Emails -> New -> Segment Email -> Select Blank Theme @@ -531,17 +531,17 @@ Use the builder to do the following: - Complete the ``From Name`` & ``From Address``, ``BCC``, ``Reply-To``, ``Add Attachment``, ``custom headers``, and Click on ``Auto Generate`` to create a text version of the Email - Save the Email and send a sample test, you should get everything you filled -Send an individual Email +Send an individual email ======================== Go to the Contacts section and select a Contact, then click Send an Email. You should be able to send an Email directly to that specific Contact's Email address. -Send a Report Email +Send a report email =================== Create a Report with any data and set it on a schedule, it should send an Email with the Report as an attachment -Other Email features +Other email features ==================== There are other places like Forget Password: they need to work as well. Please make sure you verify them. diff --git a/docs/components/translator.rst b/docs/components/translator.rst index fb048c80..9fa69e35 100644 --- a/docs/components/translator.rst +++ b/docs/components/translator.rst @@ -54,7 +54,7 @@ Translations are key/value pairs in the ``INI`` format. There is no hard and fas helloworld.form.world_select.tooltip="Note that most are visit at your own risk!" helloworld.moons.number_of_moons="{0}%world% has no moons|{1}%world% has one moon|]1,Inf[ %world% has %count% moons" -Using the Translator service +Using the translator service **************************** Plugins have access to service by passing ``translator`` as :ref:`a service dependency`. Type-hint the argument in the service's construct with ``Symfony\Component\Translation\TranslatorInterface``. diff --git a/docs/form_hooks/getting_started.rst b/docs/form_hooks/getting_started.rst index 5e41a641..06a12e93 100644 --- a/docs/form_hooks/getting_started.rst +++ b/docs/form_hooks/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with Form hooks +Getting started with form hooks ############################### You can use Mautic's support for Form hooks to enhance or customize the Form experience when embedded into your third party websites. diff --git a/docs/form_hooks/response_hooks.rst b/docs/form_hooks/response_hooks.rst index 733712c9..24fb3be0 100644 --- a/docs/form_hooks/response_hooks.rst +++ b/docs/form_hooks/response_hooks.rst @@ -47,7 +47,7 @@ Response hooks }, }; -.. Note:: This isn't called if an onResponse hook returns TRUE. +.. Note:: This isn't called if an :js:meth:`onResponse` hook returns TRUE. .. js:method:: onResponseEnd() @@ -72,4 +72,4 @@ Response hooks }, }; -.. Note:: This isn't called if an onResponse hook returns TRUE or if the page redirects. \ No newline at end of file +.. Note:: This isn't called if an :js:meth:`onResponse` hook returns TRUE or if the page redirects. \ No newline at end of file diff --git a/docs/form_hooks/validation_hooks.rst b/docs/form_hooks/validation_hooks.rst index a27b0249..628aa857 100644 --- a/docs/form_hooks/validation_hooks.rst +++ b/docs/form_hooks/validation_hooks.rst @@ -37,7 +37,7 @@ Validation hooks }, }; -.. Note:: This isn't called if an onValidate hook returns TRUE. +.. Note:: This isn't called if an :js:meth:`onValidate` hook returns TRUE. .. js:method:: onValidateEnd() diff --git a/docs/index.rst b/docs/index.rst index 27332227..03a5b399 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,7 @@ Read all about contributing to Mautic as a Developer in the :xref:`Mautic Develo Read more about Mautic's :xref:`Mautic Code Governance` and the :xref:`Mautic Project Governance` model. -Your code must follow the :xref:`Symfony coding standards`. You will find details about where Mautic deviates from these standards documented in the :doc:`/plugins/mautic_vs_symfony` section. +Your code must follow the :xref:`Symfony coding standards`. You can find details about where Mautic deviates from these standards documented in the :doc:`/plugins/mautic_vs_symfony` section. Where to get help ***************** diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index dc24308f..e65baaaf 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -558,7 +558,7 @@ Key each service with a unique name to all of Mautic, including other Plugins. * - ``tagArguments`` - no - array - - Some tags have special arguments definable through an array of tagArguments. If using ``tag``, this should be a key/value pair of the arguments specific to the given tag. For example, ``['tag' => 'tag1', 'tagArguments' => ['tag1-key' => 'tag1-value'],],``. If using ``tags``, this should be an array of arrays keyed the same as the values of ``tags``. For example, ``['tags' => [ 'tag1', 'tag2'], 'tagArguments' => [['tag1-key' => 'tag1-value'],['tag2-key' => 'tag2-value'],],],``. + - Some tags have special arguments definable through an array of ``tagArguments``. If using ``tag``, this should be a key/value pair of the arguments specific to the given tag. For example, ``['tag' => 'tag1', 'tagArguments' => ['tag1-key' => 'tag1-value'],],``. If using ``tags``, this should be an array of arrays keyed the same as the values of ``tags``. For example, ``['tags' => [ 'tag1', 'tag2'], 'tagArguments' => [['tag1-key' => 'tag1-value'],['tag2-key' => 'tag2-value'],],],``. * - ``factory`` - no - array diff --git a/docs/plugins/getting_started.rst b/docs/plugins/getting_started.rst index c6d2bfc8..e3eb0561 100644 --- a/docs/plugins/getting_started.rst +++ b/docs/plugins/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with Plugins +Getting started with plugins ############################ Plugins are Symfony bundles that can extend the capability of Mautic. They can be very simple or complex and have access to leverage nearly all that Symfony offers. Just as a reminder, this covers the basics. If you require more advanced features of Symfony, the :xref:`Symfony documentation` is a valuable resource. diff --git a/docs/plugins/mautic_vs_symfony.rst b/docs/plugins/mautic_vs_symfony.rst index 2cdf1f22..87294e8d 100644 --- a/docs/plugins/mautic_vs_symfony.rst +++ b/docs/plugins/mautic_vs_symfony.rst @@ -78,7 +78,7 @@ Support for entity annotations ****************************** By default, Mautic uses Doctrine's PHP driver instead of annotations which requires a ``public static function loadMetadata(ORM\ClassMetadata $metadata)`` method. However, Plugins can use annotations if desired but should use only annotations or only PHP ``loadMetadata``. A Plugin can't use a mix of both. See :ref:`plugins/data:Entities and schema` for more information. -Firewalls and User access management +Firewalls and user access management ************************************ ``app/config/security.php`` lists Mautic's firewalls. For the most part, Mautic uses Symfony's standard way of registering firewalls and authentication with a means for Plugins to hook into the authentication process through listeners to the ``UserEvents::USER_PRE_AUTHENTICATION`` and ``UserEvents::USER_FORM_AUTHENTICATION`` events. @@ -87,9 +87,9 @@ Mautic has its own permission system based on bitwise permissions and thus doesn Middlewares *********** -Mautic leverages middlewares before booting Symfony, see ``app/middlewares``. For example, ``\Mautic\Middleware\Dev\IpRestrictMiddleware`` restricts IPs access to ``index_dev.php``. +Mautic leverages middlewares before booting Symfony, see ``app/middlewares``. For example, ``\Mautic\Middleware\Dev\IpRestrictMiddleware`` restricts IP address access to ``index_dev.php``. -Custom Translator +Custom translator ***************** Mautic has a custom translator that extends Symfony's ``Translator`` component and enables Mautic's distributable language package model. All Plugins and bundles should contain US English language strings by default. https://github.com/mautic/language-packer integrates with Transifex to create language packs stored in https://github.com/mautic/language-packs. diff --git a/docs/plugins/translations.rst b/docs/plugins/translations.rst index fc7c891f..13f1745c 100644 --- a/docs/plugins/translations.rst +++ b/docs/plugins/translations.rst @@ -1,4 +1,4 @@ -Translating Plugins +Translating plugins ################### Plugins include their own translations in their ``Translations`` directories organized by locale. Currently, only :xref:`Core translations are supported through Transifex`. See :ref:`components/translator:Translator` for information on writing translations and using the Translator service in your Plugin. diff --git a/docs/themes/forms.rst b/docs/themes/forms.rst index 849db166..dd2d64df 100644 --- a/docs/themes/forms.rst +++ b/docs/themes/forms.rst @@ -1,4 +1,4 @@ -Customizing Forms +Customizing forms ################# To provide custom Form field templates or to manipulate the Form body, create the following directory structure:: diff --git a/docs/themes/getting_started.rst b/docs/themes/getting_started.rst index 91e7de33..f656247a 100644 --- a/docs/themes/getting_started.rst +++ b/docs/themes/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with Themes +Getting started with themes ########################### You can use Themes to create default content and layouts for Emails and Landing Pages written in the :xref:`Twig documentation`. @@ -71,7 +71,7 @@ This file is mainly used as the Landing Page for when a Contact unsubscribes or It requires echoing two variables: ``message`` and ``content``. -``message`` contains the string message such as "You have been unsubscribed..." +``message`` contains the string message such as "You have been unsubscribed." ``content`` is empty or contains the HTML of a Form associated with the Email as an unsubscribe Form. diff --git a/docs/webhooks/events/email_on_send.rst b/docs/webhooks/events/email_on_send.rst index 354cb91e..dd43ccb3 100644 --- a/docs/webhooks/events/email_on_send.rst +++ b/docs/webhooks/events/email_on_send.rst @@ -435,7 +435,7 @@ Unsubscribe Form field properties * - ``label`` - string - Label for the Form field. - * - showLabel + * - ``showLabel`` - boolean - ``TRUE`` to display the label in the Form's HTML. * - ``type`` diff --git a/docs/webhooks/events/lead_channel_subscription_changed.rst b/docs/webhooks/events/lead_channel_subscription_changed.rst index 8282b13e..2a7deb45 100644 --- a/docs/webhooks/events/lead_channel_subscription_changed.rst +++ b/docs/webhooks/events/lead_channel_subscription_changed.rst @@ -1,4 +1,4 @@ -Contact Channel subscription change event +Contact channel subscription change event ######################################### Triggered when Mautic changes a Contact's Channel subscription status. diff --git a/docs/webhooks/events/lead_company_change.rst b/docs/webhooks/events/lead_company_change.rst index 960d1bac..f1212445 100644 --- a/docs/webhooks/events/lead_company_change.rst +++ b/docs/webhooks/events/lead_company_change.rst @@ -1,4 +1,4 @@ -Contact Company subscription change event +Contact company subscription change event ######################################### Triggered when Mautic adds or removes a Contact to/from a Company. diff --git a/docs/webhooks/events/lead_points_change.rst b/docs/webhooks/events/lead_points_change.rst index 9980f468..a178c5d7 100644 --- a/docs/webhooks/events/lead_points_change.rst +++ b/docs/webhooks/events/lead_points_change.rst @@ -1,4 +1,4 @@ -Contact Points changed event +Contact points changed event ############################ Triggered when Mautic modifies a Contact's points. diff --git a/docs/webhooks/getting_started.rst b/docs/webhooks/getting_started.rst index 65a89262..68322588 100644 --- a/docs/webhooks/getting_started.rst +++ b/docs/webhooks/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with Webhooks +Getting started with webhooks ############################# Webhooks are a universal way to send data about Contacts and their activity to a third party in either real-time - as the change/activity happens - or queued - sent in batches through background Cron jobs. From c8ab64499ca4fc66c2f1fd03baead9fb5d8629ab Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 14:57:54 +0100 Subject: [PATCH 02/29] Extra warning after rebase --- docs/marketplace/allowlist_what_and_why.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/marketplace/allowlist_what_and_why.rst b/docs/marketplace/allowlist_what_and_why.rst index e44e417a..aead6139 100644 --- a/docs/marketplace/allowlist_what_and_why.rst +++ b/docs/marketplace/allowlist_what_and_why.rst @@ -22,5 +22,5 @@ Moving forward: roadmap *********************** - November 2021: release Mautic 4.1 with allowlist enabled for the Marketplace -- TBD: Switch from allowlist to blocklist - all Plugins allowed except the ones that are incompatible or have security issues +- TBD: switch from allowlist to blocklist - all Plugins allowed except the ones that are incompatible or have security issues From d602af5e8a952acd3796a58784b8ec0c3106b520 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 15:06:33 +0100 Subject: [PATCH 03/29] Update Vale version --- .github/workflows/linting.yml | 2 +- .gitpod.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3899c5be..c92833d1 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -15,7 +15,7 @@ jobs: uses: errata-ai/vale-action@reviewdog with: # Please keep version in sync with the version in .gitpod.Dockerfile for a consistent experience - version: 2.20.2 + version: 2.29.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index fcd2e0dc..e345cbca 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -2,7 +2,7 @@ FROM python:3.10 # Don't update to a higher version until this issue has been fixed: https://github.com/errata-ai/vale/issues/528 # Please keep version in sync with the version in .github/workflows/linting.yml for a consistent experience -ENV VALE_VERSION=2.20.2 +ENV VALE_VERSION=2.29.2 WORKDIR /workspace From df2a5fd289f4e02b276a7be9484bae0789aa0378 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 15:19:42 +0100 Subject: [PATCH 04/29] Equalize linting.yml workflow between this and user docs repo --- .github/workflows/linting.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index c92833d1..cd17571d 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -23,16 +23,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: '3.x' cache: 'pip' - name: Install Python dependencies run: pip3 install -r docs/requirements.txt - + - name: Build docs working-directory: docs run: make html From fabe6dbef326a76115d6650a6f4d1c6b5d4896bb Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 15:24:01 +0100 Subject: [PATCH 05/29] I think it shouldn't be ignoring cases --- .github/styles/Mautic/FeatureList.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/styles/Mautic/FeatureList.yml b/.github/styles/Mautic/FeatureList.yml index fdf383e2..381ba5c4 100644 --- a/.github/styles/Mautic/FeatureList.yml +++ b/.github/styles/Mautic/FeatureList.yml @@ -1,7 +1,7 @@ extends: substitution message: "Is this referring to a Mautic feature? If so, use '%s' instead of '%s'." level: suggestion -ignorecase: true +ignorecase: false action: name: replace swap: From 93657ab3e19795c267c4f094c5d919e9254ec1fd Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 15:28:39 +0100 Subject: [PATCH 06/29] Only show warnings and errors --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index b88c2b88..fda54427 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,5 @@ StylesPath = .github/styles Vocab = Mautic -MinAlertLevel = suggestion +MinAlertLevel = warning [*.{md,rst}] BasedOnStyles = Vale, Google, Mautic From 733616721c1214047e25d9008697892b7e453600 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 16:00:47 +0100 Subject: [PATCH 07/29] vale fixes --- .github/styles/Google/Headings.yml | 1 + .github/styles/Vocab/Mautic/accept.txt | 2 ++ README.md | 14 +++++++------- .../how_to_install_with_ddev.rst | 4 ++++ docs/plugins/installation.rst | 2 +- docs/rest_api/contacts.rst | 2 +- docs/webhooks/events/lead_post_save_update.rst | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml index 12134492..1d093b2e 100644 --- a/.github/styles/Google/Headings.yml +++ b/.github/styles/Google/Headings.yml @@ -29,3 +29,4 @@ exceptions: - Legacy Builder - GrapesJS Builder - Node.js + - PyCharm diff --git a/.github/styles/Vocab/Mautic/accept.txt b/.github/styles/Vocab/Mautic/accept.txt index 6fe5576d..61c1fb7e 100644 --- a/.github/styles/Vocab/Mautic/accept.txt +++ b/.github/styles/Vocab/Mautic/accept.txt @@ -135,3 +135,5 @@ timeframe OAuth1a OAuth2 Tooltip +Rahul +Shinde diff --git a/README.md b/README.md index a370b1c7..6287bbe8 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ This repository hosts the new developer documentation for Mautic on the [Read the Docs platform][ReadTheDocs]. Whenever a PR is merged, changes are deployed immediately to https://mautic-developer.readthedocs.io/ -If you're looking for our legacy developer documentation, please go to https://developer.mautic.org/ or the [GitHub repository][Legacy dev docs]. +If you're looking for the legacy developer documentation, please go to https://developer.mautic.org/ or the [GitHub repository][Legacy dev docs]. -## Migration of developer docs to Read the Docs +## Migration of developer docs to 'Read the Docs' -We aim to move all aspects of the developer documentation to Read the Docs (with the exception of the REST API documentation). -In the video below, [@dennisameling][dennisameling GH profile] explains how the documentation is currently structured and briefly touches upon current limitations we're running into. +The aim is to move all aspects of the developer documentation to Read the Docs (with the exception of the REST API documentation). +In the video below, [@dennisameling][dennisameling GH profile] explains how the documentation is currently structured and briefly touches upon current limitations. -For more background, our end goal, and to let us know if you want to help, please check out [this issue][New docs background and goals]. Thanks in advance. +For more background, the end goal, and if you want to help, please see [this issue][New docs background and goals]. Thanks in advance. [![Link to YouTube video with explanation of the current developer documentation structure][YouTube video image]][YouTube video URL] @@ -48,7 +48,7 @@ The following provides instructions for how to build docs locally for visualizat 3. Install sphinx-rtd-theme `pip install sphinx-rtd-theme` 4. CD into the docs directory `cd [path to this repo]/docs` 5. Run `make html` -6. This will generate HTML in docs/build/html. Setup a web server with the web root as docs/build/html or open docs/build/html/index.html in a browser. +6. This generates HTML in docs/build/html. Setup a web server with the web root as docs/build/html or open docs/build/html/index.html in a browser. ## Troubleshooting @@ -62,7 +62,7 @@ Before pushing, run Vale and address suggestions and errors as applicable. 1. Install [`vale`][Vale] 2. `vale .` -### PhpStorm/PyCharm File Watcher +### PhpStorm & PyCharm file watcher You can automatically build changes to `.rst` files using a file watcher. 1. Go to Preferences -> Tools -> File Watchers -> + button -> custom 2. Configure the watcher as presented in the screenshot diff --git a/docs/development-environment/how_to_install_with_ddev.rst b/docs/development-environment/how_to_install_with_ddev.rst index 2f22845b..5e414cda 100644 --- a/docs/development-environment/how_to_install_with_ddev.rst +++ b/docs/development-environment/how_to_install_with_ddev.rst @@ -20,11 +20,15 @@ Installing Mautic is a two-step process: 1. Install Mautic running DDEV. +.. vale off + .. code-block:: bash cd mautic ddev start +.. vale on + .. list-table:: Users and passwords :header-rows: 1 diff --git a/docs/plugins/installation.rst b/docs/plugins/installation.rst index 3a8ebe9d..16c71ab1 100644 --- a/docs/plugins/installation.rst +++ b/docs/plugins/installation.rst @@ -1,7 +1,7 @@ Installing, upgrading, and uninstalling ####################################### -Mautic informs your Plugin when it gets installed or updated through the ``ON_PLUGIN_INSTALL`` and ``ON_PLUGIN_UPDATE`` events. This can be useful in scenarios where you need to set up certain data structures or do other configuration work. Note that there is currently no hook for when your Plugin gets uninstalled. If that's of interest, please feel free to :xref:`contribute that functionality`. +Mautic informs your Plugin when it gets installed or updated through the ``ON_PLUGIN_INSTALL`` and ``ON_PLUGIN_UPDATE`` events. This can be useful in scenarios where you need to set up certain data structures or do other configuration work. Note that there is currently no hook for when your Plugin gets uninstalled. If that's of interest, please feel free to :xref:`contribute that feature`. .. note:: If your Plugin manages its own schema, Mautic recommends using :ref:`plugins/installation:database migrations` instead of the generic events mentioned earlier. diff --git a/docs/rest_api/contacts.rst b/docs/rest_api/contacts.rst index a91200b4..829a1d5a 100644 --- a/docs/rest_api/contacts.rst +++ b/docs/rest_api/contacts.rst @@ -270,7 +270,7 @@ This design allows to add multiple conditions in the same request. If you aren't using PHP, here is URL-encoded version of the example: ``GET https://[example.com]/api/contacts?where%5B0%5D%5Bcol%5D=phone&where%5B0%5D%5Bexpr%5D=in&where%5B0%5D%5Bval%5D=444444444,888888888`` -You can find a list of available expressions on :xref:`Doctrine ORM's website`. +You can find a list of available expressions on :xref:`Doctrine's ORM website`. **Response** diff --git a/docs/webhooks/events/lead_post_save_update.rst b/docs/webhooks/events/lead_post_save_update.rst index 1d26a35b..6b867b5f 100644 --- a/docs/webhooks/events/lead_post_save_update.rst +++ b/docs/webhooks/events/lead_post_save_update.rst @@ -14,4 +14,4 @@ Event type Event properties **************** -See :ref:`Lead Post Save ` event properties. \ No newline at end of file +See :ref:`Lead post save ` event properties. \ No newline at end of file From 34ce71d23965ce24ff7b3bcaa396751df2804b26 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 16:03:13 +0100 Subject: [PATCH 08/29] Add extra heading exception --- .github/styles/Google/Headings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml index 1d093b2e..41a958c7 100644 --- a/.github/styles/Google/Headings.yml +++ b/.github/styles/Google/Headings.yml @@ -30,3 +30,4 @@ exceptions: - GrapesJS Builder - Node.js - PyCharm + - PhpStorm From c8c5bc5cf0c729e5692934d5ab0e66bdc4a66ecc Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 16:08:40 +0100 Subject: [PATCH 09/29] Add Read the Docs to heading exception --- .github/styles/Google/Headings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml index 41a958c7..00df6c89 100644 --- a/.github/styles/Google/Headings.yml +++ b/.github/styles/Google/Headings.yml @@ -31,3 +31,4 @@ exceptions: - Node.js - PyCharm - PhpStorm + - Read the Docs From 914997354dba6a2e740407e91156c1a2a9140313 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 16:42:49 +0100 Subject: [PATCH 10/29] see if this fixes reviewdog write permission --- .github/workflows/linting.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index cd17571d..4959abd2 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,6 +5,9 @@ on: jobs: prose: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 From 63454eb65c86681c601d1627eb58bf739da938a9 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 16:48:42 +0100 Subject: [PATCH 11/29] nvm, it's because I'm working with a fork, in that case the token never has write perms --- .github/workflows/linting.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4959abd2..cd17571d 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,9 +5,6 @@ on: jobs: prose: runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 From 47e6cef7015550583fa046460465095bfe3e4fb3 Mon Sep 17 00:00:00 2001 From: nick-vanpraet Date: Thu, 1 Feb 2024 17:10:33 +0100 Subject: [PATCH 12/29] Apply suggestions from code review Co-authored-by: Ruth Cheesley --- docs/components/emails.rst | 2 +- docs/components/translator.rst | 2 +- docs/form_hooks/getting_started.rst | 2 +- docs/plugins/getting_started.rst | 2 +- docs/plugins/mautic_vs_symfony.rst | 4 ++-- docs/plugins/translations.rst | 2 +- docs/themes/forms.rst | 2 +- docs/themes/getting_started.rst | 2 +- docs/webhooks/events/lead_channel_subscription_changed.rst | 2 +- docs/webhooks/events/lead_company_change.rst | 2 +- docs/webhooks/events/lead_points_change.rst | 2 +- docs/webhooks/getting_started.rst | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/components/emails.rst b/docs/components/emails.rst index 17310394..8d225fb4 100644 --- a/docs/components/emails.rst +++ b/docs/components/emails.rst @@ -518,7 +518,7 @@ Use the builder to do the following: - Complete the ``From Name`` & ``From Address``, ``BCC``, ``Reply-To``, ``Add Attachment``, ``custom headers``, and Click on ``Auto Generate`` to create a text version of the Email - Save the Email and send a sample test, you should get everything you filled -Create a segment email +Create a Segment Email ====================== Go to Channels -> Emails -> New -> Segment Email -> Select Blank Theme diff --git a/docs/components/translator.rst b/docs/components/translator.rst index 9fa69e35..fb048c80 100644 --- a/docs/components/translator.rst +++ b/docs/components/translator.rst @@ -54,7 +54,7 @@ Translations are key/value pairs in the ``INI`` format. There is no hard and fas helloworld.form.world_select.tooltip="Note that most are visit at your own risk!" helloworld.moons.number_of_moons="{0}%world% has no moons|{1}%world% has one moon|]1,Inf[ %world% has %count% moons" -Using the translator service +Using the Translator service **************************** Plugins have access to service by passing ``translator`` as :ref:`a service dependency`. Type-hint the argument in the service's construct with ``Symfony\Component\Translation\TranslatorInterface``. diff --git a/docs/form_hooks/getting_started.rst b/docs/form_hooks/getting_started.rst index 06a12e93..5e41a641 100644 --- a/docs/form_hooks/getting_started.rst +++ b/docs/form_hooks/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with form hooks +Getting started with Form hooks ############################### You can use Mautic's support for Form hooks to enhance or customize the Form experience when embedded into your third party websites. diff --git a/docs/plugins/getting_started.rst b/docs/plugins/getting_started.rst index e3eb0561..c6d2bfc8 100644 --- a/docs/plugins/getting_started.rst +++ b/docs/plugins/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with plugins +Getting started with Plugins ############################ Plugins are Symfony bundles that can extend the capability of Mautic. They can be very simple or complex and have access to leverage nearly all that Symfony offers. Just as a reminder, this covers the basics. If you require more advanced features of Symfony, the :xref:`Symfony documentation` is a valuable resource. diff --git a/docs/plugins/mautic_vs_symfony.rst b/docs/plugins/mautic_vs_symfony.rst index 87294e8d..83afa831 100644 --- a/docs/plugins/mautic_vs_symfony.rst +++ b/docs/plugins/mautic_vs_symfony.rst @@ -78,7 +78,7 @@ Support for entity annotations ****************************** By default, Mautic uses Doctrine's PHP driver instead of annotations which requires a ``public static function loadMetadata(ORM\ClassMetadata $metadata)`` method. However, Plugins can use annotations if desired but should use only annotations or only PHP ``loadMetadata``. A Plugin can't use a mix of both. See :ref:`plugins/data:Entities and schema` for more information. -Firewalls and user access management +Firewalls and User access management ************************************ ``app/config/security.php`` lists Mautic's firewalls. For the most part, Mautic uses Symfony's standard way of registering firewalls and authentication with a means for Plugins to hook into the authentication process through listeners to the ``UserEvents::USER_PRE_AUTHENTICATION`` and ``UserEvents::USER_FORM_AUTHENTICATION`` events. @@ -89,7 +89,7 @@ Middlewares Mautic leverages middlewares before booting Symfony, see ``app/middlewares``. For example, ``\Mautic\Middleware\Dev\IpRestrictMiddleware`` restricts IP address access to ``index_dev.php``. -Custom translator +Custom Translator ***************** Mautic has a custom translator that extends Symfony's ``Translator`` component and enables Mautic's distributable language package model. All Plugins and bundles should contain US English language strings by default. https://github.com/mautic/language-packer integrates with Transifex to create language packs stored in https://github.com/mautic/language-packs. diff --git a/docs/plugins/translations.rst b/docs/plugins/translations.rst index 13f1745c..fc7c891f 100644 --- a/docs/plugins/translations.rst +++ b/docs/plugins/translations.rst @@ -1,4 +1,4 @@ -Translating plugins +Translating Plugins ################### Plugins include their own translations in their ``Translations`` directories organized by locale. Currently, only :xref:`Core translations are supported through Transifex`. See :ref:`components/translator:Translator` for information on writing translations and using the Translator service in your Plugin. diff --git a/docs/themes/forms.rst b/docs/themes/forms.rst index dd2d64df..849db166 100644 --- a/docs/themes/forms.rst +++ b/docs/themes/forms.rst @@ -1,4 +1,4 @@ -Customizing forms +Customizing Forms ################# To provide custom Form field templates or to manipulate the Form body, create the following directory structure:: diff --git a/docs/themes/getting_started.rst b/docs/themes/getting_started.rst index f656247a..2910ad5f 100644 --- a/docs/themes/getting_started.rst +++ b/docs/themes/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with themes +Getting started with Themes ########################### You can use Themes to create default content and layouts for Emails and Landing Pages written in the :xref:`Twig documentation`. diff --git a/docs/webhooks/events/lead_channel_subscription_changed.rst b/docs/webhooks/events/lead_channel_subscription_changed.rst index 2a7deb45..8282b13e 100644 --- a/docs/webhooks/events/lead_channel_subscription_changed.rst +++ b/docs/webhooks/events/lead_channel_subscription_changed.rst @@ -1,4 +1,4 @@ -Contact channel subscription change event +Contact Channel subscription change event ######################################### Triggered when Mautic changes a Contact's Channel subscription status. diff --git a/docs/webhooks/events/lead_company_change.rst b/docs/webhooks/events/lead_company_change.rst index f1212445..960d1bac 100644 --- a/docs/webhooks/events/lead_company_change.rst +++ b/docs/webhooks/events/lead_company_change.rst @@ -1,4 +1,4 @@ -Contact company subscription change event +Contact Company subscription change event ######################################### Triggered when Mautic adds or removes a Contact to/from a Company. diff --git a/docs/webhooks/events/lead_points_change.rst b/docs/webhooks/events/lead_points_change.rst index a178c5d7..9980f468 100644 --- a/docs/webhooks/events/lead_points_change.rst +++ b/docs/webhooks/events/lead_points_change.rst @@ -1,4 +1,4 @@ -Contact points changed event +Contact Points changed event ############################ Triggered when Mautic modifies a Contact's points. diff --git a/docs/webhooks/getting_started.rst b/docs/webhooks/getting_started.rst index 68322588..65a89262 100644 --- a/docs/webhooks/getting_started.rst +++ b/docs/webhooks/getting_started.rst @@ -1,4 +1,4 @@ -Getting started with webhooks +Getting started with Webhooks ############################# Webhooks are a universal way to send data about Contacts and their activity to a third party in either real-time - as the change/activity happens - or queued - sent in batches through background Cron jobs. From 6fc1e0250fd8cb40487fbb5048d5069c03b0ce59 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:22:23 +0100 Subject: [PATCH 13/29] Revert some changes, add to accept.txt --- .github/styles/Google/Headings.yml | 8 ---- .github/styles/Google/We.yml | 7 +-- .github/styles/Mautic/FeatureList.yml | 2 +- .github/styles/Vocab/Mautic/accept.txt | 64 +++++++++++++++++--------- docs/components/emails.rst | 2 +- docs/plugins/config.rst | 2 +- docs/plugins/mautic_vs_symfony.rst | 2 +- docs/themes/getting_started.rst | 4 +- docs/themes/legacy.rst | 2 +- 9 files changed, 51 insertions(+), 42 deletions(-) diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml index 00df6c89..5afb968d 100644 --- a/.github/styles/Google/Headings.yml +++ b/.github/styles/Google/Headings.yml @@ -24,11 +24,3 @@ exceptions: - Visual - VS - Windows - - PHPUnit.xml - - Continuous Integration - - Legacy Builder - - GrapesJS Builder - - Node.js - - PyCharm - - PhpStorm - - Read the Docs diff --git a/.github/styles/Google/We.yml b/.github/styles/Google/We.yml index 8617ef9e..c7ac7d36 100644 --- a/.github/styles/Google/We.yml +++ b/.github/styles/Google/We.yml @@ -2,15 +2,10 @@ extends: existence message: "Try to avoid using first-person plural like '%s'." link: 'https://developers.google.com/style/pronouns#personal-pronouns' level: warning -ignorecase: false +ignorecase: true tokens: - we - - We - we'(?:ve|re) - - We'(?:ve|re) - ours? - - Ours? - us - - Us - let's - - Let's diff --git a/.github/styles/Mautic/FeatureList.yml b/.github/styles/Mautic/FeatureList.yml index 381ba5c4..fdf383e2 100644 --- a/.github/styles/Mautic/FeatureList.yml +++ b/.github/styles/Mautic/FeatureList.yml @@ -1,7 +1,7 @@ extends: substitution message: "Is this referring to a Mautic feature? If so, use '%s' instead of '%s'." level: suggestion -ignorecase: false +ignorecase: true action: name: replace swap: diff --git a/.github/styles/Vocab/Mautic/accept.txt b/.github/styles/Vocab/Mautic/accept.txt index 61c1fb7e..549c82a3 100644 --- a/.github/styles/Vocab/Mautic/accept.txt +++ b/.github/styles/Vocab/Mautic/accept.txt @@ -2,14 +2,14 @@ AJAX allowlist Amazon SES Ameling -Autoloader autoloader -Autowired -autowired -Autowiring -autowiring +Autoloader autowire +autowired +Autowired autowires +autowiring +Autowiring bcc Beanstalkd Bing @@ -23,25 +23,32 @@ Citrix Clearbit CloudAMQP Codecov -config -Config Company(ies) Composer +Config +config configurator ConnectWise +Contact Points +Continuous Integration Contribution(s) CORS cron Cron CTRL DDEV -Do Not Contact DNC +Do Not Contact Dripflow Dynamic Web Content FALSE +false +Firewalls +firewalls Focus Item Focus Items +Forms +forms Froala Froogaloop gcm @@ -50,12 +57,13 @@ GitBook GitHub Gitpod GMail +GrapesJS Builder Grav Gravatar Hammerschmied href -HTML html +HTML http https HubSpot @@ -65,6 +73,7 @@ infographics ISO JavaScript Joomla +Legacy Builder Libre Licensor LinkedIn @@ -72,6 +81,7 @@ Mailjet Marketing Messages Mautic MaxMind +middleware Middlewares middlewares MJML @@ -79,27 +89,40 @@ Multiselect multiselect MVP mysqldump -namespace Namespace +namespace +Node.js noindex OAuth +OAuth1a +OAuth2 Packagist -PATCH patch +PATCH PHP +PhpStorm +PHPUnit.xml Pipedrive Piwik -POST +Plugin +Plugins post +POST PUT +PyCharm Rackspace +Rahul +Read the Docs Remarketing +Report Email Salesforce SAML Schimpf SCP +Segment Email SendGrid SES +Shinde SMS SMTP SNS @@ -109,9 +132,14 @@ sublicense SugarCRM Suhosin Symfony +themes +Themes +timeframe Todo tooltip +Tooltip Transifex +Translator TRUE true Twilio @@ -119,21 +147,15 @@ unassign unpublish Unpublish unsubscription +URIs URL URLs +US UTM Vtiger +Webhooks Webmecanik www YAML Zapier Zoho -middleware -URIs -false -timeframe -OAuth1a -OAuth2 -Tooltip -Rahul -Shinde diff --git a/docs/components/emails.rst b/docs/components/emails.rst index 8d225fb4..ec7b087f 100644 --- a/docs/components/emails.rst +++ b/docs/components/emails.rst @@ -536,7 +536,7 @@ Send an individual email Go to the Contacts section and select a Contact, then click Send an Email. You should be able to send an Email directly to that specific Contact's Email address. -Send a report email +Send a Report Email =================== Create a Report with any data and set it on a schedule, it should send an Email with the Report as an attachment diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index e65baaaf..ff151ee5 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -614,7 +614,7 @@ Mautic uses the follow tags to register services as described below. - Register this service as a Text Message transport. * - ``mautic.sms_callback_handler`` - none - - Registers this service to handle webhooks from a Text Message transport. + - Registers this service to handle Webhooks from a Text Message transport. * - ``mautic.email_transport`` - Key/value pairs to configure fields required to authenticate with the transport's service. See :ref:`components/emails:Email transports`. - Registers the service as an :ref:`Email transport`. diff --git a/docs/plugins/mautic_vs_symfony.rst b/docs/plugins/mautic_vs_symfony.rst index 83afa831..59d7d597 100644 --- a/docs/plugins/mautic_vs_symfony.rst +++ b/docs/plugins/mautic_vs_symfony.rst @@ -92,4 +92,4 @@ Mautic leverages middlewares before booting Symfony, see ``app/middlewares``. Fo Custom Translator ***************** -Mautic has a custom translator that extends Symfony's ``Translator`` component and enables Mautic's distributable language package model. All Plugins and bundles should contain US English language strings by default. https://github.com/mautic/language-packer integrates with Transifex to create language packs stored in https://github.com/mautic/language-packs. +Mautic has a custom Translator that extends Symfony's ``Translator`` component and enables Mautic's distributable language package model. All Plugins and bundles should contain US English language strings by default. https://github.com/mautic/language-packer integrates with Transifex to create language packs stored in https://github.com/mautic/language-packs. diff --git a/docs/themes/getting_started.rst b/docs/themes/getting_started.rst index 2910ad5f..3155fb82 100644 --- a/docs/themes/getting_started.rst +++ b/docs/themes/getting_started.rst @@ -59,7 +59,7 @@ features A corresponding ``html/[feature].html.twig`` file is required for each feature supported. For example, if the Theme supports ``email``, then there should be a ``html/email.html.twig`` file. See :ref:`themes/getting_started:Twig files` more information on each feature. builder - This contains an array of strings declaring which Builder the Theme supports. This currently only applies to Themes that support ``page`` or ``email``. By default, Themes without this line are only recognized by Mautic's legacy builder. New Themes built should declare the specific Builders it supports. + This contains an array of strings declaring which Builder the Theme supports. This currently only applies to Themes that support ``page`` or ``email``. By default, Themes without this line are only recognized by Mautic's Legacy Builder. New Themes built should declare the specific Builders it supports. Twig files ========== @@ -94,7 +94,7 @@ html/email.html.twig This file defines the base template when creating a new Email and should contain HTML suited for email clients. -The GrapesJs Builder supports the :xref:`MJML email framework`. +The GrapesJS Builder supports the :xref:`MJML email framework`. .. code-block:: html diff --git a/docs/themes/legacy.rst b/docs/themes/legacy.rst index 0ceae95e..0975112a 100644 --- a/docs/themes/legacy.rst +++ b/docs/themes/legacy.rst @@ -1,7 +1,7 @@ Legacy Builder ############## -.. warning:: The legacy Builder is still available in Mautic 4 but planned to be deleted in the future. Refer to the :xref:`Builder documentation` for more information. +.. warning:: The Legacy Builder is still available in Mautic 4 but planned to be deleted in the future. Refer to the :xref:`Builder documentation` for more information. Slots ***** From ff03ea24b4b38c0e05fad65d68023150d32b42d2 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:24:15 +0100 Subject: [PATCH 14/29] Give email capital letter --- docs/components/emails.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/components/emails.rst b/docs/components/emails.rst index ec7b087f..c1957143 100644 --- a/docs/components/emails.rst +++ b/docs/components/emails.rst @@ -531,7 +531,7 @@ Use the builder to do the following: - Complete the ``From Name`` & ``From Address``, ``BCC``, ``Reply-To``, ``Add Attachment``, ``custom headers``, and Click on ``Auto Generate`` to create a text version of the Email - Save the Email and send a sample test, you should get everything you filled -Send an individual email +Send an individual Email ======================== Go to the Contacts section and select a Contact, then click Send an Email. You should be able to send an Email directly to that specific Contact's Email address. @@ -541,7 +541,7 @@ Send a Report Email Create a Report with any data and set it on a schedule, it should send an Email with the Report as an attachment -Other email features +Other Email features ==================== There are other places like Forget Password: they need to work as well. Please make sure you verify them. From cd80d47eafe94d301d359f94a9e0a1de443133c4 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:40:28 +0100 Subject: [PATCH 15/29] Stab in the dark --- .github/workflows/linting.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index cd17571d..835f2b24 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -19,6 +19,30 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + prose_test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v4 + with: + python-version: '3.x' + cache: 'pip' + + - name: Install Python dependencies + run: pip3 install -r docs/requirements.txt + + - name: Vale install + working-directory: workspace + run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && cp /workspace/vale/vale /usr/local/bin/vale + + - name: Vale check + working-directory: docs + run: vale ./ + build: runs-on: ubuntu-latest steps: From 83a1f50d8049788319b4b6ac0424dfce0c979c8d Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:43:24 +0100 Subject: [PATCH 16/29] change workspace --- .github/workflows/linting.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 835f2b24..0b0615ef 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -36,8 +36,8 @@ jobs: run: pip3 install -r docs/requirements.txt - name: Vale install - working-directory: workspace - run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && cp /workspace/vale/vale /usr/local/bin/vale + working-directory: docs + run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv /docs/vale/vale /usr/local/bin/vale - name: Vale check working-directory: docs From 469db724cc310f3605516be9147fa660db710a7f Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:46:13 +0100 Subject: [PATCH 17/29] Fix path --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0b0615ef..d0ce7b21 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -37,7 +37,7 @@ jobs: - name: Vale install working-directory: docs - run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv /docs/vale/vale /usr/local/bin/vale + run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale - name: Vale check working-directory: docs From be10a2c5edc24597fdff16d0859bb56d1eecc745 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:51:24 +0100 Subject: [PATCH 18/29] Fix last 2 section titles --- .github/workflows/linting.yml | 2 +- docs/components/emails.rst | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d0ce7b21..a4b95520 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -37,7 +37,7 @@ jobs: - name: Vale install working-directory: docs - run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale + run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale && ../ && rm -rf vale - name: Vale check working-directory: docs diff --git a/docs/components/emails.rst b/docs/components/emails.rst index c1957143..372ad41f 100644 --- a/docs/components/emails.rst +++ b/docs/components/emails.rst @@ -530,20 +530,28 @@ Use the builder to do the following: - Go to the Advanced tab - Complete the ``From Name`` & ``From Address``, ``BCC``, ``Reply-To``, ``Add Attachment``, ``custom headers``, and Click on ``Auto Generate`` to create a text version of the Email - Save the Email and send a sample test, you should get everything you filled - + +.. vale off + Send an individual Email ======================== +.. vale on + Go to the Contacts section and select a Contact, then click Send an Email. You should be able to send an Email directly to that specific Contact's Email address. Send a Report Email =================== Create a Report with any data and set it on a schedule, it should send an Email with the Report as an attachment - + +.. vale off + Other Email features ==================== +.. vale on + There are other places like Forget Password: they need to work as well. Please make sure you verify them. Testing transport callback From 1924e4cc354013c882fac37f1893a211a75cbb63 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:52:40 +0100 Subject: [PATCH 19/29] add 'cd' --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index a4b95520..d84acc5f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -37,7 +37,7 @@ jobs: - name: Vale install working-directory: docs - run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale && ../ && rm -rf vale + run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale && cd ../ && rm -rf vale - name: Vale check working-directory: docs From b944524d821e05f4e22683dd41af3d58af164a64 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 17:58:12 +0100 Subject: [PATCH 20/29] try to use container --- .github/workflows/linting.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d84acc5f..4bab28e1 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,12 +5,17 @@ on: jobs: prose: runs-on: ubuntu-latest + container: + image: dennisameling/python-vale:latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Install Python dependencies + run: pip install -r docs/requirements.txt + - name: Vale uses: errata-ai/vale-action@reviewdog with: From ec3ec35a0b5a381f696f812c273eccced0723607 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:18:39 +0100 Subject: [PATCH 21/29] Add ruby to fix missing gem --- .github/workflows/linting.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4bab28e1..eac4636a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -13,6 +13,10 @@ jobs: with: fetch-depth: 0 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + - name: Install Python dependencies run: pip install -r docs/requirements.txt @@ -26,19 +30,16 @@ jobs: prose_test: runs-on: ubuntu-latest + container: + image: dennisameling/python-vale:latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - cache: 'pip' - - name: Install Python dependencies - run: pip3 install -r docs/requirements.txt + run: pip install -r docs/requirements.txt - name: Vale install working-directory: docs From b3910c038a862b6fa4daa5ac356615a957a8b064 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:23:57 +0100 Subject: [PATCH 22/29] Perhaps simplest works? --- .github/workflows/linting.yml | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index eac4636a..a58e4bfc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,20 +5,19 @@ on: jobs: prose: runs-on: ubuntu-latest - container: - image: dennisameling/python-vale:latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: ruby/setup-ruby@v1 + - uses: actions/setup-python@v4 with: - ruby-version: '3.3' + python-version: '3.x' + cache: 'pip' - name: Install Python dependencies - run: pip install -r docs/requirements.txt + run: pip3 install -r docs/requirements.txt - name: Vale uses: errata-ai/vale-action@reviewdog @@ -28,27 +27,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - prose_test: - runs-on: ubuntu-latest - container: - image: dennisameling/python-vale:latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install Python dependencies - run: pip install -r docs/requirements.txt - - - name: Vale install - working-directory: docs - run: mkdir -p vale && cd vale && wget https://github.com/errata-ai/vale/releases/download/v2.29.2/vale_2.29.2_Linux_64-bit.tar.gz && tar -xf vale_2.29.2_Linux_64-bit.tar.gz && mv ./vale /usr/local/bin/vale && cd ../ && rm -rf vale - - - name: Vale check - working-directory: docs - run: vale ./ - build: runs-on: ubuntu-latest steps: From 8137a5796bcfdd9356463d46a11a9b00d11f39af Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:25:43 +0100 Subject: [PATCH 23/29] could it be? --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index fda54427..b88c2b88 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,5 @@ StylesPath = .github/styles Vocab = Mautic -MinAlertLevel = warning +MinAlertLevel = suggestion [*.{md,rst}] BasedOnStyles = Vale, Google, Mautic From 51d59bf568909e812ea5461fae1a26e87311cb1a Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:28:51 +0100 Subject: [PATCH 24/29] This commit should trigger an error --- docs/plugins/config.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index ff151ee5..1c2e3f1a 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -1,6 +1,10 @@ Config file ########### + +This Title Should Be An Error +***************************** + Mautic leverages a simple array based config file to register routes, menu items, services, Categories, and configuration parameters. General config items From 7972eb74090b3198ae710974f96971a16a8534db Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:34:40 +0100 Subject: [PATCH 25/29] show warnings and above and fail on them --- .github/workflows/linting.yml | 1 + .vale.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index a58e4bfc..d6a335e9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -24,6 +24,7 @@ jobs: with: # Please keep version in sync with the version in .gitpod.Dockerfile for a consistent experience version: 2.29.2 + fail_on_error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vale.ini b/.vale.ini index b88c2b88..fda54427 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,5 @@ StylesPath = .github/styles Vocab = Mautic -MinAlertLevel = suggestion +MinAlertLevel = warning [*.{md,rst}] BasedOnStyles = Vale, Google, Mautic From ddbdcbeef20d89bfbce6d2b007e8fe3030d46520 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:37:21 +0100 Subject: [PATCH 26/29] ok this is an actual error, not warning --- docs/plugins/config.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index 1c2e3f1a..e4acbca3 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -1,11 +1,7 @@ Config file ########### - -This Title Should Be An Error -***************************** - -Mautic leverages a simple array based config file to register routes, menu items, services, Categories, and configuration parameters. +Mautic leverages a simple array based config file to register routes, menu items, services, Categories, and configuration parameters and Infographics. General config items ******************** From 56d6d3f9e0106157f994db9b7c98055df0fbfb48 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:40:00 +0100 Subject: [PATCH 27/29] Remove error --- docs/plugins/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index e4acbca3..ff151ee5 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -1,7 +1,7 @@ Config file ########### -Mautic leverages a simple array based config file to register routes, menu items, services, Categories, and configuration parameters and Infographics. +Mautic leverages a simple array based config file to register routes, menu items, services, Categories, and configuration parameters. General config items ******************** From ba00ba9a139e54d60609fa394b67caadfd5f4b4f Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:43:16 +0100 Subject: [PATCH 28/29] Align gitpod files between user docs and dev docs (user docs was more up to date) --- .gitpod.Dockerfile | 2 +- .gitpod.yml | 25 +++---------------------- .python-version | 1 - .readthedocs.yaml | 2 +- 4 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 .python-version diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index e345cbca..c345449f 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10 +FROM python:3.11 # Don't update to a higher version until this issue has been fixed: https://github.com/errata-ai/vale/issues/528 # Please keep version in sync with the version in .github/workflows/linting.yml for a consistent experience diff --git a/.gitpod.yml b/.gitpod.yml index 453002c6..fdbbf919 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,6 @@ -# We use a simple, custom Dockerfile that has Python and Vale preinstalled. -image: - file: .gitpod.Dockerfile +# Since Gitpod doesn't support caching custom Dockerfiles yet, we temporarily +# use this once which has Python 3.9 and Vale preinstalled. +image: dennisameling/python-vale:latest tasks: - before: pip install -r docs/requirements.txt @@ -13,22 +13,3 @@ vscode: - errata-ai.vale-server - eamodio.gitlens - trond-snekvik.simple-rst - -github: - prebuilds: - # enable for the master/default branch (defaults to true) - master: true - # enable for all branches in this repo (defaults to false) - branches: true - # enable for pull requests coming from this repo (defaults to true) - pullRequests: true - # enable for pull requests coming from forks (defaults to false) - pullRequestsFromForks: true - # add a check to pull requests (defaults to true) - addCheck: false - # add a "Review in Gitpod" button as a comment to pull requests (defaults to false) - addComment: false - # add a "Review in Gitpod" button to the pull request's description (defaults to false) - addBadge: true - # add a label once the prebuild is ready to pull requests (defaults to false) - addLabel: false diff --git a/.python-version b/.python-version deleted file mode 100644 index 0a590336..00000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.9.10 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e6f30f62..8f9730ca 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: "3.9" + python: "3.11" # You can also specify other tool versions: # nodejs: "16" # rust: "1.55" From f1742b9ce93dd430c83109c1c17ec6fcb9592609 Mon Sep 17 00:00:00 2001 From: Nick Vanpraet Date: Thu, 1 Feb 2024 18:45:27 +0100 Subject: [PATCH 29/29] revert wordlist change --- .github/styles/Google/WordList.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/Google/WordList.yml b/.github/styles/Google/WordList.yml index 0c094905..7303843f 100644 --- a/.github/styles/Google/WordList.yml +++ b/.github/styles/Google/WordList.yml @@ -50,6 +50,7 @@ swap: ephemeral IP address: ephemeral external IP address fewer data: less data file name: filename + firewalls: firewall rules functionality: capability|feature Google account: Google Account Google accounts: Google Accounts