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 support for tags #527

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Add support for tags #527

wants to merge 12 commits into from

Conversation

Universal-Omega
Copy link
Sponsor Member

@Universal-Omega Universal-Omega commented May 13, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new "wiki tags" feature, allowing users to tag wikis with specific labels.
    • Added a dynamic tag selection interface for easier tagging.
  • Enhancements

    • Updated forms to include a field for wiki tags, enhancing the user experience by allowing more detailed categorization.
  • Localization

    • Added new localization strings for "wiki tags" in English.
  • Database

    • Added a new column for storing wiki tags in the database schema.

@Universal-Omega
Copy link
Sponsor Member Author

@coderabbitai review

Copy link

coderabbitai bot commented May 17, 2024

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

coderabbitai bot commented May 17, 2024

Walkthrough

This update introduces a new feature for managing wiki tags in the CreateWiki extension. It includes backend changes to handle wiki tags in the database and frontend enhancements for selecting tags via a user-friendly interface. The update also adds internationalization support for the new tags feature.

Changes

Files/Paths Change Summary
extension.json, i18n/en.json, i18n/qqq.json Added new entity ext.createwiki.oouiform.wikiTags, new messages, and configuration settings.
includes/RemoteWiki.php Updated RemoteWiki class to include a new property $wikitags with getter and setter methods.
includes/RequestWiki/SpecialRequestWiki.php Enhanced form and module loading logic to support the new wiki tags feature.
modules/ext.createwiki.oouiform.wikiTags.js Introduced JavaScript functionality for a tag selection widget.
sql/cw_wikis.sql, sql/patches/patch-cw_wikis-add-wiki_tags.sql Added a new wiki_tags column to the cw_wikis table in the database schema.

🐇
In the world of wikis, tags now bloom,
A feature enhanced, dispelling gloom.
With scripts and forms, and fields so new,
Our wikis shine with tags in view.
Database grows, with columns bright,
A coder's dream, in the soft moonlight.
🌙


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 051cc9d and f0ece8e.
Files selected for processing (8)
  • extension.json (3 hunks)
  • i18n/en.json (1 hunks)
  • i18n/qqq.json (1 hunks)
  • includes/RemoteWiki.php (3 hunks)
  • includes/RequestWiki/SpecialRequestWiki.php (2 hunks)
  • modules/ext.createwiki.oouiform.wikiTags.js (1 hunks)
  • sql/cw_wikis.sql (1 hunks)
  • sql/patches/patch-cw_wikis-add-wiki_tags.sql (1 hunks)
Files skipped from review due to trivial changes (2)
  • i18n/qqq.json
  • sql/cw_wikis.sql
Additional comments not posted (7)
sql/patches/patch-cw_wikis-add-wiki_tags.sql (1)

1-2: The SQL patch correctly adds the wiki_tags column to the cw_wikis table with appropriate default settings.

modules/ext.createwiki.oouiform.wikiTags.js (1)

1-38: The JavaScript module for wiki tag selection is well-implemented, using efficient jQuery and OOUI components.

includes/RequestWiki/SpecialRequestWiki.php (2)

52-61: The addition of the ext.createwiki.oouiform.wikiTags module and configuration of JavaScript variables are correctly implemented.


106-113: The form field for wiki tags is correctly added and configured based on the system settings.

includes/RemoteWiki.php (1)

31-31: The wikitags property and its associated getter and setter methods are correctly implemented in the RemoteWiki class.

Also applies to: 80-83, 332-344

extension.json (1)

184-193: The new ext.createwiki.oouiform.wikiTags module and the CreateWikiAvailableTags and CreateWikiUseWikiTags configuration variables are correctly defined.

Also applies to: 214-218, 390-394

i18n/en.json (1)

40-40: The new message key "createwiki-label-wiki-tags": "Wiki tags" is correctly added to the internationalization messages.

'type' => 'text',
'label-message' => 'createwiki-label-wiki-tags',
'cssclass' => 'createwiki-wikitags',
'disabled' => true,

Choose a reason for hiding this comment

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

This should be readonly => true, no? Or else it won't be sent with the form?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

You may be right. This still has a lot of work like also passing to cw_requests also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants