-
Notifications
You must be signed in to change notification settings - Fork 3.7k
CMS Kit: Add commenting widget as content widget #24110
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
Conversation
Updated addWidgetModal.js to exclude properties with default or empty values when generating widgetText. This prevents unnecessary attributes from being added to the widget markup.
There was a problem hiding this 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 adds support for conditional widget registration based on global features and introduces a new comment configuration widget with read-only support.
- Adds
AddWidgetIfFeatureEnabledmethod to register widgets conditionally based on global features - Introduces a new comment configuration widget (
CmsKitCommentConfiguration) with read-only mode support - Updates JavaScript logic to skip empty/default widget parameter values
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| en.json | Adds localization for the "IsReadOnly" field |
| CmsKitContentWidgetOptions.cs | Adds new method to conditionally register widgets based on global features |
| CmsKitCommentConfigurationViewModel.cs | New view model for comment configuration with EntityType, EntityId, and IsReadOnly properties |
| CmsKitCommentConfigurationViewComponent.cs | New view component for rendering comment configuration UI |
| CmsKitCommentConfiguration.cshtml | New view for comment configuration with input fields |
| CmsKitCommonWebModule.cs | Registers the comment widget using the new conditional registration method |
| addWidgetModal.js | Enhances widget text generation to skip empty/default parameter values |
| dynamic-widget.md | Updates documentation with details about the new conditional registration method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...it/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/CmsKitContentWidgetOptions.cs
Outdated
Show resolved
Hide resolved
...it/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/CmsKitContentWidgetOptions.cs
Outdated
Show resolved
Hide resolved
...lo.CmsKit.Common.Web/Pages/CmsKit/Components/Comments/CmsKitCommentConfigurationViewModel.cs
Outdated
Show resolved
Hide resolved
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js
Outdated
Show resolved
Hide resolved
…ntry to the all languages
Description
Related to https://github.com/volosoft/volo/issues/20587 (@enisn also created a PR for the pro side in our repository, you can review these 2 PR from there, if you want)
Checklist