Skip to content

Commit 9738b85

Browse files
authored
Merge pull request #495 from WoltLab/6.2-quote-tab
Document change to the quote system
2 parents 3653f8e + 5b60ae8 commit 9738b85

File tree

3 files changed

+151
-0
lines changed

3 files changed

+151
-0
lines changed

docs/migration/wsc61/deprecations_removals.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,36 @@ With version 6.2, we have deprecated certain components and removed several othe
1515
- `wcf\data\user\avatar\UserAvatarAction` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
1616
- `wcf\data\user\avatar\UserAvatarEditor` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
1717
- `wcf\data\user\avatar\UserAvatarList` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
18+
- `wcf\data\IMessageQuoteAction` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
19+
- `wcf\system\message\quote\AbstractMessageQuoteHandler` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
20+
- `wcf\system\message\quote\IMessageQuoteHandler` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
21+
- `wcf\system\message\quote\QuotedMessage` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
1822

1923
#### Methods
2024

2125
- `wcf\util\DateUtil::format()` ([WoltLab/WCF#6042](https://github.com/WoltLab/WCF/pull/6042/))
2226
- `wcf\data\smiley\category\SmileyCategoryAction::getSmilies()` ([WoltLab/WCF#6115](https://github.com/WoltLab/WCF/pull/6115/))
2327
- `wcf\data\smiley\category\SmileyCategoryAction::validateGetSmilies()` ([WoltLab/WCF#6115](https://github.com/WoltLab/WCF/pull/6115/))
28+
- `wcf\system\form\builder\container\wysiwyg\WysiwygFormContainer::quoteData()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
29+
- `wcf\system\form\builder\field\wysiwyg\WysiwygFormField::quoteData()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
30+
- `wcf\system\form\builder\field\wysiwyg\WysiwygFormField::getQuoteData()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
31+
- `wcf\system\message\quote\MessageQuoteManager::addQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
32+
- `wcf\system\message\quote\MessageQuoteManager::getQuoteID()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
33+
- `wcf\system\message\quote\MessageQuoteManager::removeQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
34+
- `wcf\system\message\quote\MessageQuoteManager::removeQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
35+
- `wcf\system\message\quote\MessageQuoteManager::getQuotes()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
36+
- `wcf\system\message\quote\MessageQuoteManager::getQuotesByObjectIDs()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
37+
- `wcf\system\message\quote\MessageQuoteManager::getQuotesByParentObjectID()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
38+
- `wcf\system\message\quote\MessageQuoteManager::getQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
39+
- `wcf\system\message\quote\MessageQuoteManager::getObjectID()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
40+
- `wcf\system\message\quote\MessageQuoteManager::renderQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
41+
- `wcf\system\message\quote\MessageQuoteManager::removeMarkedQuotes()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
42+
- `wcf\system\message\quote\MessageQuoteManager::countQuotes()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
43+
- `wcf\system\message\quote\MessageQuoteManager::initObjects()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
44+
- `wcf\system\message\quote\MessageQuoteManager::readParameters()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
45+
- `wcf\system\message\quote\MessageQuoteManager::assignVariables()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
46+
- `wcf\system\message\quote\MessageQuoteManager::getQuoteMessageID()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
47+
- `wcf\system\message\quote\MessageQuoteManager::isFullQuote()` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
2448

2549
#### Variables
2650

@@ -48,6 +72,7 @@ With version 6.2, we have deprecated certain components and removed several othe
4872
- `WCF.Message.Preview` ([WoltLab/WCF#6114](https://github.com/WoltLab/WCF/pull/6114))
4973
- `WCF.Message.SmileyCategories` ([WoltLab/WCF#6115](https://github.com/WoltLab/WCF/pull/6115/))
5074
- `WCF.Message.Submit`
75+
- `WCF.Message.Quote.Manager` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
5176
- `WCF.Moderation.Management` ([WoltLab/WCF#6116](https://github.com/WoltLab/WCF/pull/6116/))
5277
- `WCF.Moderation.Activation.Management` ([WoltLab/WCF#6116](https://github.com/WoltLab/WCF/pull/6116/))
5378
- `WCF.Moderation.Report.Management` ([WoltLab/WCF#6116](https://github.com/WoltLab/WCF/pull/6116/))
@@ -71,6 +96,7 @@ With version 6.2, we have deprecated certain components and removed several othe
7196
- `WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract` ([WoltLab/WCF#6126](https://github.com/WoltLab/WCF/pull/6126/))
7297
- `WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow` ([WoltLab/WCF#6126](https://github.com/WoltLab/WCF/pull/6126/))
7398
- `WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore` ([WoltLab/WCF#6126](https://github.com/WoltLab/WCF/pull/6126/))
99+
- `WoltLabSuite/Core/Ui/Message/Quote` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
74100

75101
## Removals
76102

@@ -83,6 +109,10 @@ With version 6.2, we have deprecated certain components and removed several othe
83109
- `wcf\form\AvatarEditForm` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
84110
- `wcf\system\upload\AvatarUploadFileSaveStrategy` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
85111
- `wcf\system\upload\AvatarUploadFileValidationStrategy` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
112+
- `wcf\action\MessageQuoteAction` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
113+
- `calendar\system\message\quote\EventMessageQuoteHandler`
114+
- `wbb\system\message\quote\PostMessageQuoteHandler`
115+
- `blog\system\message\quote\EntryMessageQuoteHandler`
86116

87117
#### Methods
88118

@@ -118,13 +148,39 @@ With version 6.2, we have deprecated certain components and removed several othe
118148
- `wcf\data\user\UserProfileAction::validateDeleteCoverPhoto()` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
119149
- `wcf\data\user\UserProfileAction::deleteCoverPhoto()` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
120150
- `wcf\data\user\UserProfileAction::setAvatar()` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))`
151+
- `calendar\data\event\EventAction::validateSaveFullQuote()`
152+
- `calendar\data\event\EventAction::saveFullQuote()`
153+
- `calendar\data\event\EventAction::validateSaveQuote()`
154+
- `calendar\data\event\EventAction::saveQuote()`
155+
- `calendar\data\event\EventAction::validateGetRenderedQuotes()`
156+
- `calendar\data\event\EventAction::getRenderedQuotes()`
157+
- `wbb\data\post\PostAction::validateSaveFullQuote()`
158+
- `wbb\data\post\PostAction::saveFullQuote()`
159+
- `wbb\data\post\PostAction::validateSaveQuote()`
160+
- `wbb\data\post\PostAction::saveQuote()`
161+
- `wbb\data\post\PostAction::validateGetRenderedQuotes()`
162+
- `wbb\data\post\PostAction::getRenderedQuotes()`
163+
- `blog\data\entry\EntryAction::validateSaveFullQuote()`
164+
- `blog\data\entry\EntryAction::saveFullQuote()`
165+
- `blog\data\entry\EntryAction::validateSaveQuote()`
166+
- `blog\data\entry\EntryAction::saveQuote()`
167+
- `blog\data\entry\EntryAction::validateGetRenderedQuotes()`
168+
- `blog\data\entry\EntryAction::getRenderedQuotes()`
121169

122170
#### Properties
123171

124172
- `wcf\system\option\user\DateUserOptionOutput::$dateFormat` ([WoltLab/WCF#6042](https://github.com/WoltLab/WCF/pull/6042/))
125173
- `wcf\data\user\User::$coverPhotoHash` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
126174
- `wcf\data\user\User::$coverPhotoExtension` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
127175
- `wcf\data\user\User::$coverPhotoHasWebP` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
176+
- `wcf\system\form\builder\container\wysiwyg\WysiwygFormContainer::$quoteData` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
177+
- `wcf\system\form\builder\field\wysiwyg\WysiwygFormField::$quoteData` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
178+
- `wcf\system\message\quote\MessageQuoteManager::$objectIDs` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
179+
- `wcf\system\message\quote\MessageQuoteManager::$objectType` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
180+
- `wcf\system\message\quote\MessageQuoteManager::$objectTypes` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
181+
- `wcf\system\message\quote\MessageQuoteManager::$quotes` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
182+
- `wcf\system\message\quote\MessageQuoteManager::$quoteData` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
183+
- `wcf\system\message\quote\MessageQuoteManager::$quoteMessageID` ([WoltLab/WCF#6163](https://github.com/WoltLab/WCF/pull/6163/))
128184

129185
### JavaScript
130186

@@ -146,3 +202,6 @@ With version 6.2, we have deprecated certain components and removed several othe
146202
- `WoltLabSuite/Core/Ui/User/CoverPhoto/Upload` ([WoltLab/WCF#6127](https://github.com/WoltLab/WCF/pull/6127/))
147203
- `WCF.User.Avatar` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
148204
- `WCF.User.Avatar.Upload` ([WoltLab/WCF#6051](https://github.com/WoltLab/WCF/pull/6051))
205+
- `WoltLabSuite/Calendar/Ui/Event/Quote`
206+
- `WoltLabSuite/Forum/Ui/Post/Quote`
207+
- `WoltLabSuite/Blog/Ui/Entry/Quote`

docs/migration/wsc61/quotes.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Migrating from WoltLab Suite 6.1 – Quotes
2+
3+
In the upcoming version of WoltLab Suite, the handling of quotes has been revamped to enhance user experience.
4+
Quotes are now stored client-side in the browser's local storage, allowing synchronization across browser tabs.
5+
6+
## Using the New Quote System
7+
8+
The interfaces `wcf\data\IMessageQuoteAction` and `wcf\system\message\quote\IMessageQuoteHandler` are no longer required to generate the quotes, and the implemented classes or functions can be completely removed.
9+
Since the interface `IMessageQuoteHandler` has been deprecated, the ObjectType no longer requires any information about an associated class.
10+
11+
```XML
12+
<?xml version="1.0" encoding="UTF-8"?>
13+
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/6.0/objectType.xsd">
14+
<import>
15+
<type>
16+
<name>com.woltlab.foo</name>
17+
<definitionname>com.woltlab.wcf.message.quote</definitionname>
18+
</type>
19+
</import>
20+
</data>
21+
```
22+
23+
The object that can be quoted:
24+
25+
- MUST implement the interface `wcf\data\IMessage`.
26+
- SHOULD implement the interface `wcf\data\IEmbeddedMessageObject`.
27+
28+
Using of `WoltLabSuite/Core/Ui/Message/Quote` is no longer required and only `WoltLabSuite/Core/Component/Quote/Message::registerContainer()` should be used so that a message can be quoted
29+
30+
```smarty
31+
<!-- Previous -->
32+
<script data-relocate="true">
33+
$(function() {
34+
require(["WoltLabSuite/Core/Ui/Message/Quote"], ({ UiMessageQuote }) => {
35+
{include file='shared_messageQuoteManager' wysiwygSelector='text' supportPaste=true}
36+
37+
new UiMessageQuote($quoteManager, "wcf\\data\\foo\\Foo", "com.woltlab.foo", ".message", ".messageBody", ".messageBody > .messageText", true);
38+
});
39+
});
40+
</script>
41+
42+
<!-- Use instead -->
43+
<script data-relocate="true">
44+
require(["WoltLabSuite/Core/Component/Quote/Message"], ({ registerContainer }) => {
45+
registerContainer(".message", ".messageBody", "wcf\\data\\foo\\Foo", "com.woltlab.foo");
46+
});
47+
</script>
48+
```
49+
50+
## Adjustments to the forms
51+
52+
The functions `MessageQuoteManager::readFormParameters()` and `MessageQuoteManager::saved()` must be called both in the form for creating and editing the entry.
53+
This is necessary if the text input does support quotes. Regardless of whether the entry itself can be quoted later or not.
54+
55+
```PHP
56+
use wcf\system\message\quote\MessageQuoteManager;
57+
58+
class FooAddForm extends \wcf\form\MessageForm {
59+
60+
#[\Override]
61+
public function readFormParameters()
62+
{
63+
parent::readFormParameters();
64+
65+
// …
66+
67+
// Read the quotes that are to be deleted after the message has been successfully saved
68+
MessageQuoteManager::getInstance()->readFormParameters();
69+
}
70+
71+
#[\Override]
72+
protected function saved()
73+
{
74+
parent::saved();
75+
76+
// …
77+
78+
// Save the used quotes so that they're deleted on the client with the next request
79+
MessageQuoteManager::getInstance()->saved();
80+
}
81+
}
82+
```
83+
84+
### Pre-filling of text
85+
86+
The automatic pre-filling of text when creating a new entry with previously marked quotes is no longer supported and has been removed in the new version.
87+
88+
### Changes to the FormBuilder
89+
90+
The functions `WysiwygFormContainer::quoteData()` and `WysiwygFormField::quoteData()` are no longer required, it is sufficient to use the function `supportQuotes()`.
91+
The functions `MessageQuoteManager::readFormParameters()` and `MessageQuoteManager::saved()` are called by `WysiwygFormField` and don't need to be called separately.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ nav:
130130
- 'From WoltLab Suite 6.1':
131131
- 'Deprecations and Removals': 'migration/wsc61/deprecations_removals.md'
132132
- 'Templates': 'migration/wsc61/templates.md'
133+
- 'Quotes': 'migration/wsc61/quotes.md'
133134
- 'From WoltLab Suite 6.0':
134135
- 'PHP API': 'migration/wsc60/php.md'
135136
- 'Templates': 'migration/wsc60/templates.md'

0 commit comments

Comments
 (0)