Skip to content

Improve documentation for core files#875

Open
Prokyonn wants to merge 2 commits intosulu:2.xfrom
Prokyonn:docs/2.6/phase-1-core
Open

Improve documentation for core files#875
Prokyonn wants to merge 2 commits intosulu:2.xfrom
Prokyonn:docs/2.6/phase-1-core

Conversation

@Prokyonn
Copy link
Copy Markdown
Member

Q A
Fixed tickets fixes #issuenum
Related PRs sulu/sulu#prnum
License MIT

What's in this PR?

Improves grammar issues in the documentation

@Prokyonn Prokyonn changed the title Docs/2.6/phase 1 core Improve documentation for core files Jan 20, 2026
@Prokyonn Prokyonn requested a review from Copilot January 20, 2026 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves grammar and consistency in the Sulu documentation files. The changes focus on correcting grammatical errors, improving clarity, and standardizing terminology (particularly changing "Property Type" to "Content Type" in the glossary).

Changes:

  • Updated terminology from "Property Type" to "Content Type" in glossary and related files
  • Fixed numerous grammatical issues including verb tenses, article usage, and sentence structure
  • Improved clarity and readability across 21 documentation files
  • Updated code examples in the extend-admin guide

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
reference/glossary.rst Changed "Property Type" to "Content Type" for terminology consistency
reference/content-types/checkbox.rst Updated terminology reference to "content type"
index.rst Fixed grammar in introductory text
book/webspaces.rst Extensive grammar improvements throughout
book/twig.rst Grammar fixes and array access changes
book/templates.rst Grammar improvements and terminology updates
book/smart-content.rst Grammar fixes and heading capitalization
book/localization.rst Grammar improvements and command updates
book/introduction/sulu-focus.rst Minor grammar corrections
book/introduction/structure.rst Grammar fixes and technical description updates
book/introduction/right-choice.rst Grammar improvements in questions
book/introduction/index.rst Grammar corrections
book/introduction/content-management-platform.rst Grammar and clarity improvements
book/introduction/content-architecture.rst Content simplification and grammar fixes
book/introduction/components.rst Grammar corrections
book/introduction/backend-template.rst Grammar improvements
book/index.rst Grammar fixes
book/image-formats.rst Grammar corrections
book/getting-started.rst Grammar fixes and heading improvements
book/extend-admin.rst Grammar improvements and code example updates
book/content-architecture.rst Content simplification and PHPCR reference removal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread book/extend-admin.rst
{
$event = $this->eventRepository->find($id);

return new JsonResponse($this->serializer->serialize($event));
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The serializer's serialize method returns a string, but JsonResponse expects an array or object that it will encode to JSON. The correct usage should be either new JsonResponse($this->serializer->serialize($event, 'json')) with the format parameter, or new JsonResponse($event) and rely on JsonResponse to handle the serialization.

Copilot uses AI. Check for mistakes.
Comment thread book/webspaces.rst
:doc:`templates` for more details on the content management process.

Normally you'll create a webspace for a new website, a landingpage or a portal,
Normally, you create a webspace for a new website, a landingpage or a portal,
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The word "landingpage" should be "landing page" (two separate words). This applies to both occurrences in this sentence.

Suggested change
Normally, you create a webspace for a new website, a landingpage or a portal,
Normally, you create a webspace for a new website, a landing page or a portal,

Copilot uses AI. Check for mistakes.
Comment thread book/webspaces.rst
the UI is defined.

One of the segments must be set as the default. That's the segment a visitor
This is the segment a visitor
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The sentence is incomplete. It states "One of the segments must be set as the default. This is the segment a visitor..." but doesn't complete the thought about what happens with the default segment. The original text "That's the segment a visitor sees when visiting the website for the very first time" provided complete information. The new text should be: "This is the segment a visitor sees when visiting the website for the very first time."

Suggested change
This is the segment a visitor
One of the segments must be set as the default. This is the segment a visitor

Copilot uses AI. Check for mistakes.
Comment thread book/webspaces.rst
content tree. These trees are accessible by the navigation in the Sulu
administration interface. Sulu allows you to create pages and sub pages in
these trees and fill them with content. Have a closer look at
administration interface. Sulu allows you to create pages and subpages in
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The word "subpages" should be "sub-pages" or "sub pages" (hyphenated or two words) for consistency with how it's written elsewhere in the documentation. Looking at the changes, it appears the preferred style in this documentation is to use separate words (e.g., "sub pages").

Suggested change
administration interface. Sulu allows you to create pages and subpages in
administration interface. Sulu allows you to create pages and sub pages in

Copilot uses AI. Check for mistakes.
Comment thread book/extend-admin.rst
/**
* Creates a new event
*/
public function postAction(Request $request): Response
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing the Request parameter import and type hint. The method signature shows postAction(Request $request) but the Request class is not imported in the use statements shown in this code block. The import use Symfony\Component\HttpFoundation\Request; should be added to the use statements.

Copilot uses AI. Check for mistakes.
Comment thread book/extend-admin.rst

$this->eventRepository->flush();

return new JsonResponse($this->serializer->serialize($event)));
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

There is a syntax error with an extra closing parenthesis at the end of the line. The line should end with a single closing parenthesis: return new JsonResponse($this->serializer->serialize($event));

Copilot uses AI. Check for mistakes.
Comment thread book/extend-admin.rst
Comment on lines +240 to 290
$event = $this->eventRepository->find($id);

return new JsonResponse($this->serializer->serialize($event));
}

/**
* Creates a new event
*/
public function postAction(Request $request): Response
{
$event = new Event();
$this->mapRequestToEvent($request, $event);

$this->eventRepository->persist($event);
$this->eventRepository->flush();

return new JsonResponse($this->serializer->serialize($event)));
}

/**
* Updates an existing event by finding it, mapping new data onto it and saving it
*/
public function putAction(int $id, Request $request): Response
{
$event = $this->eventRepository->find($id);

$this->mapRequestToEvent($request, $event);

$this->eventRepository->flush();

return new JsonResponse($this->serializer->serialize($event)));
}

public function deleteAction(int $id): Response
{
$event = $this->eventRepository->find($id);
$this->eventRepository->remove($event);
$this->eventRepository->flush();

return new JsonResponse(null, Response::HTTP_NO_CONTENT);
}

/**
* Maps the request body to an event object
*/
private function mapRequestToEvent(Request $request, Event $event): void
{
$event->setName($request->request->get('name'));
$event->setStartDate($request->request->get('startDate'));
$event->setEndDate($request->request->get('endDate'));
}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The code references $this->eventRepository but this dependency is not shown in the constructor or as a class property. The EventRepository should be injected as a constructor dependency and stored as a private property for this code to work correctly.

Copilot uses AI. Check for mistakes.
Comment thread book/twig.rst
Comment on lines +81 to +82
{{ extension.excerpt.icon.thumbnails['50x50'] }}
{{ extension.excerpt.images.thumbnails['300x300'] }}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The array index notation has been incorrectly removed. The original code extension.excerpt.icon[0].thumbnails['50x50'] and extension.excerpt.images[0].thumbnails['300x300'] was correct because icon and images are arrays and need the index [0] to access the first element. The changed code extension.excerpt.icon.thumbnails['50x50'] and extension.excerpt.images.thumbnails['300x300'] will not work correctly when these properties are arrays.

Suggested change
{{ extension.excerpt.icon.thumbnails['50x50'] }}
{{ extension.excerpt.images.thumbnails['300x300'] }}
{{ extension.excerpt.icon[0].thumbnails['50x50'] }}
{{ extension.excerpt.images[0].thumbnails['300x300'] }}

Copilot uses AI. Check for mistakes.
Comment thread book/templates.rst
* how that structure is rendered

The structure of a page consists of *properties*, each of which has a *(content)
The structure of a page consists of *properties*, each of which has a *property
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

This terminology change is inconsistent with the glossary updates in this PR. In reference/glossary.rst, "Property Type" was changed to "Content Type" throughout. This line should use "content type" instead of "property type" to maintain consistency with the glossary and the overall terminology standardization in this PR.

Suggested change
The structure of a page consists of *properties*, each of which has a *property
The structure of a page consists of *properties*, each of which has a *content

Copilot uses AI. Check for mistakes.
Comment thread book/smart-content.rst
The smart content supports pagination, which can be activated with the param
``max_per_page`` described in the content-type reference
The smart content supports pagination, activated with the parameter
``max_per_page`` described in the property-type reference
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

This terminology change is inconsistent with the glossary updates in this PR. In reference/glossary.rst, "Property Type" was changed to "Content Type" throughout. This line should use "content-type" instead of "property-type" to maintain consistency with the terminology standardization being applied in this PR.

Suggested change
``max_per_page`` described in the property-type reference
``max_per_page`` described in the content-type reference

Copilot uses AI. Check for mistakes.
@alexander-schranz alexander-schranz changed the base branch from 2.6 to 2.x February 4, 2026 12:09
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.

2 participants