Demo/Portal example add-on update#76
Demo/Portal example add-on update#76QuackieMackie wants to merge 10 commits intoxenforo-ltd:mainfrom
Conversation
📝 WalkthroughWalkthroughMultiple documentation and code example updates reflecting widespread renaming of controller and service classes/files (e.g., Forum → ForumController, Creator → CreatorService, Editor → EditorService), an Entity method signature change to Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/lets-build-an-add-on.md`:
- Line 753: Line 753 contains a hard tab before the function declaration public
function canFeatureUnfeature(&$error = null): bool — replace the hard tab with
spaces to match surrounding indentation and satisfy MD010; update the whitespace
at the start of that line (the declaration for canFeatureUnfeature) so it uses
the same number of spaces as other lines in the file.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/files/Demo-Portal-1.0.0 Alpha.zipis excluded by!**/*.zip
📒 Files selected for processing (1)
docs/lets-build-an-add-on.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/lets-build-an-add-on.md
753-753: Hard tabs
Column: 1
(MD010, no-hard-tabs)
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@docs/lets-build-an-add-on.md`:
- Around line 828-830: The lines inside the setupThreadEdit function use hard
tabs for indentation which violates MD010; open the function definition for
public function setupThreadEdit(\XF\Entity\Thread $thread) and the docblock line
referencing \Demo\Portal\XF\Service\Thread\EditorService and replace tabs with
spaces so all indentation is space-based (consistent with the project's 2- or
4-space style).
- Around line 369-371: The prose instructs creating `Forum.php` but the example
code block and title use `ForumController.php`; update the instructional text to
reference `ForumController.php` so the filename in the narrative matches the
code block (path: src/addons/Demo/Portal/XF/Admin/Controller and the file name
shown in the code block/Title), ensuring the description, the example filename,
and any subsequent mentions consistently use `ForumController.php`.
- Line 367: Update the wording to use the correct indefinite article before
"Extension class name": change "a Extension class name" to "an Extension class
name" in the sentence that references the base class
`XF\Admin\Controller\ForumController` and the extension
`Demo\Portal\XF\Admin\Controller\ForumController` (the sentence ending with "We
should create that class before clicking Save.").
♻️ Duplicate comments (1)
docs/lets-build-an-add-on.md (1)
754-754: Replace hard tab indentation to satisfy MD010.
This is the same hard‑tab issue previously reported for this line.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/files/Demo-Portal-1.0.0 Alpha.zipis excluded by!**/*.zip
📒 Files selected for processing (1)
docs/lets-build-an-add-on.md
🧰 Additional context used
🪛 LanguageTool
docs/lets-build-an-add-on.md
[misspelling] ~367-~367: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...orumController`. And we need to specify a "Extension class name" which is the cla...
(EN_A_VS_AN)
[typographical] ~433-~433: There might be a comma missing.
Context: ...CP_CreatorService { } ``` While we're here we will also create another extension. ...
(IF_PRP_PRP_COMMA)
[style] ~765-~765: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e and feature or unfeature accordingly. We are going to need two new class extensi...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~767-~767: Consider removing “of” to be more concise
Context: ... that in the relevant location. Here is all of the code for the extended class: ```php ti...
(ALL_OF_THE)
🪛 markdownlint-cli2 (0.18.1)
docs/lets-build-an-add-on.md
754-754: Hard tabs
Column: 1
(MD010, no-hard-tabs)
828-828: Hard tabs
Column: 1
(MD010, no-hard-tabs)
829-829: Hard tabs
Column: 1
(MD010, no-hard-tabs)
830-830: Hard tabs
Column: 1
(MD010, no-hard-tabs)
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/lets-build-an-add-on.md (1)
870-899: Fix the file path in the code block title to match the forum controller section.
The prose says to edit the extended forum controller, but the code block title showsXF/Pub/Controller/ThreadController.php. This can misdirect readers.Proposed fix
-```php title="src/addons/Demo/Portal/XF/Pub/Controller/ThreadController.php" +```php title="src/addons/Demo/Portal/XF/Pub/Controller/ForumController.php"
🤖 Fix all issues with AI agents
In `@docs/lets-build-an-add-on.md`:
- Line 433: Update the sentence in the documentation text to include a comma
after "here": change "While we're here we will also create another extension."
to "While we're here, we will also create another extension." in the
docs/lets-build-an-add-on.md file (the line describing creating the extension
class Demo\Portal\XF\Pub\Controller\ForumController and the file path
src/addons/Demo/Portal/XF/Pub/Controller/ForumController.php).
♻️ Duplicate comments (1)
docs/lets-build-an-add-on.md (1)
754-754: Hard tabs remain in code block indentation.
Please replace hard tabs with spaces to satisfy MD010.Also applies to: 828-829
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
docs/lets-build-an-add-on.md
🧰 Additional context used
🪛 LanguageTool
docs/lets-build-an-add-on.md
[typographical] ~433-~433: There might be a comma missing.
Context: ...CP_CreatorService { } ``` While we're here we will also create another extension. ...
(IF_PRP_PRP_COMMA)
[style] ~765-~765: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e and feature or unfeature accordingly. We are going to need two new class extensi...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~767-~767: Consider removing “of” to be more concise
Context: ... that in the relevant location. Here is all of the code for the extended class: ```php ti...
(ALL_OF_THE)
🪛 markdownlint-cli2 (0.18.1)
docs/lets-build-an-add-on.md
754-754: Hard tabs
Column: 1
(MD010, no-hard-tabs)
828-828: Hard tabs
Column: 1
(MD010, no-hard-tabs)
829-829: Hard tabs
Column: 1
(MD010, no-hard-tabs)
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| { | ||
|
|
||
| } | ||
| ``` | ||
|
|
||
| While we're here we will also create another extension. The base will be `XF\Pub\Controller\Forum` and the extension class will be `Demo\Portal\XF\Pub\Controller\Forum`. Creating the following code in the path `src/addons/Demo/Portal/XF/Pub/Controller/Forum.php` and click "Save": | ||
| While we're here we will also create another extension. The base will be `XF\Pub\Controller\ForumController` and the extension class will be `Demo\Portal\XF\Pub\Controller\ForumController`. Creating the following code in the path `src/addons/Demo/Portal/XF/Pub/Controller/ForumController.php` and click "Save": |
There was a problem hiding this comment.
Add a comma after “here” for readability.
Small grammar fix: “While we're here, we will also create another extension.”
🧰 Tools
🪛 LanguageTool
[typographical] ~433-~433: There might be a comma missing.
Context: ...CP_CreatorService { } ``` While we're here we will also create another extension. ...
(IF_PRP_PRP_COMMA)
🤖 Prompt for AI Agents
In `@docs/lets-build-an-add-on.md` at line 433, Update the sentence in the
documentation text to include a comma after "here": change "While we're here we
will also create another extension." to "While we're here, we will also create
another extension." in the docs/lets-build-an-add-on.md file (the line
describing creating the extension class
Demo\Portal\XF\Pub\Controller\ForumController and the file path
src/addons/Demo/Portal/XF/Pub/Controller/ForumController.php).
|
I have gone through this documentation and built the add-on along with it. I committed all the fixes and I believe it is now up-to-date. That said in the method
I downloaded the 2.0.0 Xenforo files and checked the Replier and couldn't find this |
This fixes the obvious error I noted xenforo-ltd#63 after installing the add-on.
- Align filename in instructions with code block.
- Fix article usage ("a" → "an").
- [Possibly] Replace hard tabs with spaces to satisfy MD010.
`Basic board information` -> `Basic options`
dc4af2a to
b56391c
Compare
The add-on was a tad outdated, so I rewrote it using a Xenforo 2.3.8 Preview installation.
I changed as little as I could, only fixing errors as I saw them.
If I missed any, please let me know. :)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.