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

Write docs for Core component #214

Open
favour-chibueze opened this issue Sep 24, 2024 · 18 comments
Open

Write docs for Core component #214

favour-chibueze opened this issue Sep 24, 2024 · 18 comments
Assignees
Labels

Comments

@favour-chibueze
Copy link
Contributor

favour-chibueze commented Sep 24, 2024

We need to write documentation on the Core component.

https://devdocs.mautic.org/en/latest/components/core.html

@favour-chibueze favour-chibueze changed the title Write docs for Core section Write docs for Core component Sep 24, 2024
@RCheesley RCheesley moved this from Backlog to Ready in Mautic's 2024 No/Low/Code Tasks Oct 2, 2024
@Peacesandy
Copy link

Peacesandy commented Oct 5, 2024

Hello @favour-chibueze and @RCheesley
Can I take this up, I'd like to work on it.

@RCheesley RCheesley moved this from Ready to In progress in Mautic's 2024 No/Low/Code Tasks Oct 5, 2024
@RCheesley
Copy link
Member

Awesome @Peacesandy please let us know if you need any guidance!

@Peacesandy
Copy link

Thank you!
Sure, how do I get started please, what is the core component all about?

@RCheesley
Copy link
Member

@escopecz could you give any guidance here? The file was added by Alan when we initially started this repo.

@escopecz
Copy link
Member

escopecz commented Oct 6, 2024

The CoreBundle is a basically the Mautic bundle. Other core bundles are adding some specific feature like Configuration, Category, User bundles. The Core bundle is the only bundle that must be present to have Mautic working. Basically, if there is a PHP class that is used in multiple other bundles, it's added to the CoreBundle. It's hard to describe it easily as it is huge but doesn't really do anything specific, really. It contains all the interfaces and abstract classes that other bundles are implementing and extending. It actually handles themes but that's pretty much the only visible feature it handles.

@Peacesandy
Copy link

Okay, thanks for the clarification @escopecz

@Peacesandy
Copy link

Peacesandy commented Oct 17, 2024

Hello @escopecz and @RCheesley any guidance on how I can set up the docs on my local machine or can I add the documentation via Github.

@favour-chibueze

@favour-chibueze
Copy link
Contributor Author

Hello @escopecz and @RCheesley any guidance on how I can set up the docs on my local machine or can I add the documentation via Github.

@favour-chibueze

Have you tried using gitpod? @Peacesandy

@Peacesandy
Copy link

@favour-chibueze , I have cloned it to my local machine, should I go ahead and add the documentation and make a PR?

@favour-chibueze
Copy link
Contributor Author

Yes, please

@Peacesandy
Copy link

Okay

@Peacesandy
Copy link

@RCheesley and @escopecz which of the files do I do the routing?

@Peacesandy
Copy link

Hi @RCheesley @favour-chibueze @escopecz I've not been able to push my changes and I can't create a PR

@RCheesley
Copy link
Member

Hi there!

Here's how to set up the docs locally: https://github.com/mautic/developer-documentation-new?tab=readme-ov-file#build-documentation-locally

Here's how to make a PR on GitHub:

  1. Fork the repository, by clicking the button you see above all the files when you first land on the repo
  2. Clone your fork locally
  3. Create a new branch to work on - name it something relevant to what you're working on. In VSCode you do this by clicking on the name of the branch bottom left, and then typing the name of the new branch in the popup that shows.

Desktop-screenshot-10-29-2024_04_13_PM

  1. Make your changes, and save the files as you work.
  2. Click on the version control icon, and you'll see the changes you've made. Next to each file if you hover over will be a plus icon, which allows you to stage those changes for committing (saving) them. Click it for each file you want to add, then type a commit message in the box above. You can commit one file at a time, a few at a time, or everything - it's better to do things incrementally as you can then easily roll back one specific commit if you make a mistake.

Desktop-screenshot-10-29-2024_04_18_PM

  1. Once you've done this, press publish branch and it'll publish the branch on your fork.
  2. Come back to this repository and you'll see a green button which tells you that changes have been made on your branch, and inviting you to make a PR
  3. Once you are done with making the PR, switch back to the 5.x branch by clicking bottom left again, and selecting 5.x

@Peacesandy
Copy link

Thank you so much for your help @RCheesley

After building the documentation and running make HTML, I noticed that the build files are grey because the build is included in gitignore.

core

Should the changes be made in the build files or component, .rst which is written in markdown

@RCheesley
Copy link
Member

Great question! You only need commit the .rst files, anything in /build should not be committed as they are built when we render the documentation.

So, make the changes to your files, use the make html command to rebuild the docs and check that they are working OK (I run DDEV in the /docs folder to have a web server on which to do this - you need to install Docker Desktop/Colima and DDEV to do this, then type ddev config when in the docs folder, and then just accept the defaults, then ddev start and it will give you a local URL to use to check).

Once you're happy everything has rendered as you'd expect it to, then you can commit the .rst files which you edited (and only those files).

@Peacesandy
Copy link

Thank you so much @RCheesley

@RCheesley
Copy link
Member

HI @Peacesandy how are you getting along, did you need any further help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

No branches or pull requests

4 participants