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

Add additional rtw area config #4278

Merged
merged 5 commits into from
Sep 7, 2023
Merged

Conversation

BoDonkey
Copy link
Contributor

Summary

Summarize the changes briefly, including which issue/ticket this resolves. If it closes an existing Github issue, include "Closes #[issue number]"

This PR extends the rich-text-widget to allow for custom options to be passed through the per area configuration. This will allow for new Tiptap extensions to pass their own configuration options. A tutorial on this subject and three new improvements to the rich-text-widget will be released to take advantage of this. This change does not alter the existing configuration behavior.

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@BoDonkey BoDonkey requested a review from haroun August 26, 2023 12:29
CHANGELOG.md Outdated
@@ -5,6 +5,7 @@
### Adds

* Add `publicApiCheckAsync` wrapper method (and use it internally) to allow for async permission checks of REST APIs. This feature doesn't introduce any breaking changes.
* Add ability to add custom rich-text-widget options per area.
Copy link
Member

Choose a reason for hiding this comment

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

Please say just a little more here. I know there will be docs, but how about: add ability for custom tiptap extensions to access the options passed to rich text widgets at the area level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@BoDonkey BoDonkey requested a review from boutell August 30, 2023 15:46
@BoDonkey BoDonkey marked this pull request as draft August 30, 2023 19:08
@BoDonkey BoDonkey marked this pull request as ready for review August 30, 2023 19:10
@@ -546,7 +546,8 @@ export default {
return (apos.tiptapExtensions || [])
.map(extension => extension({
styles: this.editorOptions.styles.map(this.localizeStyle),
types: this.tiptapTypes
types: this.tiptapTypes,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can achieve the same goal with

      aposTiptapExtensions() {
        return (apos.tiptapExtensions || [])
          .map(extension => extension({
            ...this.editorOptions,
            styles: this.editorOptions.styles.map(this.localizeStyle),
            types: this.tiptapTypes
          }));
      },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I overthought that a bit! 😅

@BoDonkey BoDonkey requested a review from haroun September 5, 2023 15:14
haroun
haroun previously approved these changes Sep 6, 2023
## 3.55.0

### Adds

* Add `publicApiCheckAsync` wrapper method (and use it internally) to allow for async permission checks of REST APIs. This feature doesn't introduce any breaking changes.
* Add ability to add custom rich-text-widget options per area.
* Add `publicApiCheckAsync` wrapper method (and use it internally) to allow for overrides to do async permission checks of REST APIs. This feature doesn't introduce any breaking changes because the default implementation still invokes `publicApiCheck` in case developers have overridden it.
Copy link
Member

Choose a reason for hiding this comment

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

Why is this in this PR? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR was opened before the last release date so there ended up being a merge conflict in the CHANGELOG.

@BoDonkey BoDonkey merged commit 09a0fbe into main Sep 7, 2023
6 checks passed
@BoDonkey BoDonkey deleted the add-additional-rtw-area-config branch September 7, 2023 20:35
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.

3 participants