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

Release [0.79] #7337

Merged
merged 49 commits into from
Jan 2, 2025
Merged

Release [0.79] #7337

merged 49 commits into from
Jan 2, 2025

Conversation

bobbykolev
Copy link
Contributor

@bobbykolev bobbykolev commented Dec 16, 2024

Summary by CodeRabbit

  • New Features
    • Enhanced performance of the Virtual Contributors Block with optimized rendering for the invite dialog.
  • Bug Fixes
    • Simplified dependency management in the Invite VCs Dialog for fetching virtual contributors.
  • Chores
    • Updated version number to 0.79.3 in the package.json file.

bobbykolev and others added 20 commits December 9, 2024 16:48
* init commit Notifications 0 button, dialog, mock

* updated NotificationProps

* InAppNotifications Template logic v0

* notifications base model updates

* Notification subject added

* remove the action from the main model

* mock assets for demo

* Notifications query integration

* removed mocks, fixed types, polling for notifications updates

* Read/Unread menu and functionality

* Actions - archive; onClose on click on notif or action; memo and keys added

* translations of actions; sentry warn for unsupported type

* fixed graphql types

* display additional fields; changes to the design; sorting

* handle callout types

* comments display logic; design chenages; documentaion

* pr rabbit fixes

* enabled notifications only for Beta testers

* update w the server chagnes

* Fix the comments url Style improvements

* pr rabbit fix

* pr fixes

* extract the isEnabled logic into the context

* Update inAppNotificationsDocs.md

---------

Co-authored-by: Svetoslav <svetoslav@alkem.io>
Co-authored-by: Carlos Cano <carlos@alkem.io>
* Fix BUG: Importing subspace template to space templates, doesn't import the template tag

* Fix #7259 another problem in the mappings file
fix in-app notification layout w comments
* add new alkemio banner

* delete old jpg banner

---------

Co-authored-by: Valentin Yanakiev <valentin.yanakiev@gmail.com>
* implement embed video functionality

* implement embed code functionality

* remove logs

* fixed ts warning

* polish code

* update textare colors

* resolve bunny comments

* rename video file

* fix iframe styles during edit mode, adding multiple iframes fixed

* resolve new bunny comments

* resolve pr comments

* simplify styles

* simplify state

* secure wrapperMarkdown

* fix iframe wrapper styles

* make allowed embed urls read-only

* update issuu allowed embed url

* secure the sandbox attribute too

* remove sandbox attributes for now

* resolve bunny comment

---------

Co-authored-by: Valentin Yanakiev <valentin.yanakiev@gmail.com>
Co-authored-by: Carlos Cano <carlos@alkem.io>
* handle gracefully broken notificaionts by not displaying them

* fix the translation and displya of the space type

* codegen with latest fields

---------

Co-authored-by: Svetoslav <svetoslav@alkem.io>
* Fix creating a subspace on a Space by nameId

* remove unused var
* Fix tutorials iframes

* parse the iframe with the DOMParser instead of with regex

---------

Co-authored-by: Valentin Yanakiev <valentin.yanakiev@gmail.com>
…late selector (#7325)

* Add Callouts preview accordion on SubspacesList default subspace template selector

* usememo

* memoize the Description component

---------

Co-authored-by: Valentin Yanakiev <valentin.yanakiev@gmail.com>
* Tech spec
* VC invite button in community's VC block (#7294)
* VC Add/Invite Functionality and UI from the Space -> Community  (#7306)
* Empty message;
# Conflicts:
#	package-lock.json
#	package.json
#	src/domain/community/community/CommunityAdmin/useCommunityAdmin.ts
Copy link

coderabbitai bot commented Dec 16, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request involves a version update and optimizations in the codebase. The package.json file has been updated to version 0.79.3. The VirtualContributorsBlock component in VirtualContributorsBlock.tsx has been optimized with the addition of the useCallback hook and conditional rendering for the InviteContributorDialog. Additionally, the InviteVCsDialog component has been modified to simplify its useEffect dependencies.

Changes

File Change Summary
package.json Version bumped from 0.78.1 to 0.79.3
src/domain/community/community/VirtualContributorsBlock/VirtualContributorsBlock.tsx - Added useCallback to onInvite function
- Implemented conditional rendering for InviteContributorDialog
src/domain/community/inviteContributors/InviteVCsDialog.tsx Removed memoizedDebouncedFetchVCs from useEffect dependency array
src/domain/community/inviteContributors/useInviteContributors.tsx Renamed refetchCommunityMembersListQuery to refetchSpaceCommunityPageQuery and updated its usage in mutations

Possibly related PRs

  • Release 0.71 #6881: This PR updates the version number in package.json from "0.70.1" to "0.71.0", similar to the main PR's version bump from "0.78.1" to "0.79.3".
  • Release 0.72 #6907: This PR updates the version number in package.json from "0.71.0" to "0.72.3", reflecting a similar version increment as seen in the main PR.
  • new release version 0.75.0 #7058: This PR updates the version number in package.json from "0.74.0" to "0.75.0", indicating a version change consistent with the main PR's version update.
  • Master to develop 0.76 #7153: This PR shows a version downgrade in package.json from "0.76.1" to "0.76.0", which is related to version management in the same file as the main PR.

Suggested reviewers

  • hero101
  • ccanos

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@bobbykolev bobbykolev changed the title Release [0.79.0] Release [0.79] Dec 16, 2024
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: 1

🧹 Nitpick comments (1)
src/domain/community/community/VirtualContributorsBlock/VirtualContributorsBlock.tsx (1)

76-82: Remove redundant open prop

Since the dialog is already conditionally rendered with inviteDialogOpen, passing the same value as the open prop is redundant.

      {inviteDialogOpen && (
        <InviteContributorDialog
-          open={inviteDialogOpen}
          onClose={closeInviteDialog}
          type={CommunityContributorType.Virtual}
        />
      )}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7517cad and 6b0912e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json (1 hunks)
  • src/domain/community/community/VirtualContributorsBlock/VirtualContributorsBlock.tsx (3 hunks)
  • src/domain/community/inviteContributors/InviteVCsDialog.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
📓 Path-based instructions (2)
src/domain/community/community/VirtualContributorsBlock/VirtualContributorsBlock.tsx (1)

Pattern src/**/*.{ts,tsx,js}: Review the React.js/TypeScript/JavaScript code for best practices and potential bugs.
Ensure that the code adheres to TypeScript's typing system and modern standards.
Use the following code guide documentation in the codebase: 'docs/code-guidelines.md'.
Ensure sufficient error handling and logging is present, but note:

  • We have a global error handler in place. So local try/catch blocks are not required unless they provide value beyond what the global error handler already covers.
  • Avoid flagging the absence of local error handling in cases where the global error handler suffices.
  • Avoid flagging the absence of logging in cases where the global logger is already in place (graphql usage).

Inform about the recommendation of not using non-null assertion,
except on GraphQL queries where the variable is asserted non-null and followed by a
skip: with the same variable.
Examples:

  • Not Required: there's a skip
    {
    variables: { templateId: templateId! },
    skip: !templateId,
    }

Check for common security vulnerabilities such as:

  • SQL Injection
  • XSS (Cross-Site Scripting)
  • CSRF (Cross-Site Request Forgery)
  • Insecure dependencies
  • Sensitive data exposure
src/domain/community/inviteContributors/InviteVCsDialog.tsx (1)

Pattern src/**/*.{ts,tsx,js}: Review the React.js/TypeScript/JavaScript code for best practices and potential bugs.
Ensure that the code adheres to TypeScript's typing system and modern standards.
Use the following code guide documentation in the codebase: 'docs/code-guidelines.md'.
Ensure sufficient error handling and logging is present, but note:

  • We have a global error handler in place. So local try/catch blocks are not required unless they provide value beyond what the global error handler already covers.
  • Avoid flagging the absence of local error handling in cases where the global error handler suffices.
  • Avoid flagging the absence of logging in cases where the global logger is already in place (graphql usage).

Inform about the recommendation of not using non-null assertion,
except on GraphQL queries where the variable is asserted non-null and followed by a
skip: with the same variable.
Examples:

  • Not Required: there's a skip
    {
    variables: { templateId: templateId! },
    skip: !templateId,
    }

Check for common security vulnerabilities such as:

  • SQL Injection
  • XSS (Cross-Site Scripting)
  • CSRF (Cross-Site Request Forgery)
  • Insecure dependencies
  • Sensitive data exposure
🔇 Additional comments (1)
src/domain/community/community/VirtualContributorsBlock/VirtualContributorsBlock.tsx (1)

42-44: LGTM! Good performance optimization

The useCallback hook is correctly implemented with the appropriate dependency. This optimization prevents unnecessary re-renders of child components that receive this callback as a prop.

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

🧹 Nitpick comments (2)
src/domain/community/inviteContributors/useInviteContributors.tsx (2)

Line range hint 83-83: Consider implementing pagination for scalability

The TODO comment indicates a need for pagination. This is important for performance as the list of virtual contributors grows.

Would you like me to help create a GitHub issue to track the pagination implementation? I can provide a detailed proposal for implementing pagination using cursor-based pagination with Apollo Client.


Line range hint 91-98: Consider memoizing filter functions for performance

The filter functions filterByName and filterExisting are recreated on every render. Consider using useCallback to memoize them.

- const filterByName = (vc: VirtualContributorNameProps, filter?: string) =>
-   vc.profile.displayName.toLowerCase().includes(filter?.toLowerCase() ?? '');
- const filterExisting = (vc: VirtualContributorNameProps, existingVCs) =>
-   !existingVCs.some(member => member.id === vc.id);

+ const filterByName = useCallback((vc: VirtualContributorNameProps, filter?: string) =>
+   vc.profile.displayName.toLowerCase().includes(filter?.toLowerCase() ?? ''), []);
+ const filterExisting = useCallback((vc: VirtualContributorNameProps, existingVCs) =>
+   !existingVCs.some(member => member.id === vc.id), []);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b0912e and 3490ff9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/domain/community/inviteContributors/useInviteContributors.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
📓 Path-based instructions (1)
src/domain/community/inviteContributors/useInviteContributors.tsx (1)

Pattern src/**/*.{ts,tsx,js}: Review the React.js/TypeScript/JavaScript code for best practices and potential bugs.
Ensure that the code adheres to TypeScript's typing system and modern standards.
Use the following code guide documentation in the codebase: 'docs/code-guidelines.md'.
Ensure sufficient error handling and logging is present, but note:

  • We have a global error handler in place. So local try/catch blocks are not required unless they provide value beyond what the global error handler already covers.
  • Avoid flagging the absence of local error handling in cases where the global error handler suffices.
  • Avoid flagging the absence of logging in cases where the global logger is already in place (graphql usage).

Inform about the recommendation of not using non-null assertion,
except on GraphQL queries where the variable is asserted non-null and followed by a
skip: with the same variable.
Examples:

  • Not Required: there's a skip
    {
    variables: { templateId: templateId! },
    skip: !templateId,
    }

Check for common security vulnerabilities such as:

  • SQL Injection
  • XSS (Cross-Site Scripting)
  • CSRF (Cross-Site Request Forgery)
  • Insecure dependencies
  • Sensitive data exposure
🔇 Additional comments (1)
src/domain/community/inviteContributors/useInviteContributors.tsx (1)

156-156: LGTM: Improved data consistency with specific refetch query

The change to use refetchSpaceCommunityPageQuery with specific parameters ensures better data consistency after mutations.

@bobbykolev bobbykolev changed the base branch from develop to master December 17, 2024 13:57
bobbykolev and others added 6 commits December 17, 2024 16:09
add canva to the whitelist of iframe embed urls
* Fix dashboard access

* fixed scope

* change polling interval

* fix pr comment

* renamed to useSpaceTemplate*s*ManagerQuery

---------

Co-authored-by: Carlos Cano <carlos@alkem.io>
@bobbykolev bobbykolev requested a review from ccanos January 2, 2025 08:17
@ccanos ccanos merged commit 8e5ed9f into master Jan 2, 2025
3 checks passed
@ccanos ccanos deleted the release-79 branch January 2, 2025 08:26
@bobbykolev bobbykolev restored the release-79 branch January 2, 2025 08:28
@coderabbitai coderabbitai bot mentioned this pull request Jan 2, 2025
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.

4 participants