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

Move lost grapesjs documentation to docs, small improves #43

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

adiux
Copy link

@adiux adiux commented Jun 8, 2022

@RCheesley
Copy link
Sponsor Member

Hey @adiux thanks for doing this! You have some Vale spelling / grammar / style errors that will need to be corrected (see the linter) - and there are some RST issues I can notice (headings are too long etc). If you are using VS Code you should get the highlights automatically to tell you where there are problems if you've got Vale installed.

Alternatively you could work in Gitpod: https://gitpod.io/#https://github.com/mautic/developer-documentation-new/pull/43 which has everything configured and will flag up issues with the PR in the Problems tab (ignore the ones relating to other pages, we will fix those in a separate PR!)

Happy to walk through it if you get stuck with anything!

Copy link
Sponsor Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

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

Thanks for making the PR to bring across some of the details @adiux - much appreciated!

I have left some comments on the PR, I think we need to be a lot more detailed on the information we are provided so that we can support developers in learning how to extend and work with the builder and the preset - let me know if anything is unclear!

Currently, Mautic uses the GrapesJS Builder for Emails and Landing pages.

Setup
*****
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think we need to be a bit more verbose here. Where exactly do they run npm install? Do they have to have Mautic installed first?

We need to assume that people reading this are completely new to using the builder and may not know where to start.


.. vale on

Use the template files provided. For example .eslintrc.temp
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

And do what with them? Can we be a bit more helpful here? Even if we point people out to documentation on external sites, it would be helpful to folks who might not know what to do with the template files.


Use the template files provided. For example .eslintrc.temp

How to test standalone
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

What does it mean to test standalone? This isn't very clear. Perhaps we could explain why you would do this and what it would allow you to do?


.. code-block:: BASH

npm run start-helloWorld
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

As above I think we need to be clear - are we in Mautic's root? In the plugin folder? What is the difference between the two commands and why might you use one rather than the other?


In order for ``start-mautic`` to work, a running DDEV container has to be present.

If you are using another development environment you need to update some paths in ``Demo/mautic/index.html``.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Let's be kind and give some examples here? You can use code blocks to include code samples.


All the JavaScript code lives in the Assets/library folder. This handles the UI of the builder.

In addition to the code in this repository, there is also the :xref:`GrapesJS Preset`.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Suggested change
In addition to the code in this repository, there is also the :xref:`GrapesJS Preset`.
In addition to the code in this `plugins/GrapesJsBuilderBundle` folder, there is also the :xref:`GrapesJS Preset`.

We aren't referring to a separate repo at this time.


In addition to the code in this repository, there is also the :xref:`GrapesJS Preset`.

This repository handles the basic Mautic specific code. The general idea is that this preset repository is a base for various Mautic builder Plugins.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Suggested change
This repository handles the basic Mautic specific code. The general idea is that this preset repository is a base for various Mautic builder Plugins.
This code in the `plugins/GrapesJsBuilderBundle` folder handles the basic Mautic specific code. The general idea is that the GrapesJS Preset repository is a base for various Mautic builder Plugins.


This repository handles the basic Mautic specific code. The general idea is that this preset repository is a base for various Mautic builder Plugins.

E.g one where the Rich Text Editor is CKEditor, or where there is some very customer or industry specific features.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Suggested change
E.g one where the Rich Text Editor is CKEditor, or where there is some very customer or industry specific features.
Examples might include if you wanted to have the Rich Text Editor is CKEditor, or where there is some very customer or industry specific features. These can be done with a custom preset.

- Opens the Block Manager at launch
- Add Dynamic Content Block for HTML used in Mautic
```

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think that we need to add here some instructions on how to roll your own custom preset. For example how to create a fork of the Mautic preset, and how to ship it with your own Mautic instance. I think that a few people do that already so hopefully we can get that documented.

I would also like to see some basic examples of:

How to create a new block
How to create a new section

These could link out to external documentation or be included here as our own docs.

PRs
***

Contributions to improve the GrapesJS Plugin happen in the main Mautic repository as :xref:`Github PRs`
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think we should also include a section on how to contribute and test PRs for the preset? That used to be in the readme I think.

@RCheesley
Copy link
Sponsor Member

@adiux @volha-pivavarchyk please could you take a look at the feedback/suggestions? It would be great to improve this documentation for our developers and get the PR merged but we are missing some key pieces of information I feel.

@RCheesley
Copy link
Sponsor Member

Hey folks @adiux @volha-pivavarchyk could we please get this info into the docs? It will need rebasing to 5.x and the feedback addressing. What do you think?

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.

None yet

2 participants