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

chore: upgrade slate editor #4323

Merged
merged 1 commit into from
Oct 20, 2024
Merged

chore: upgrade slate editor #4323

merged 1 commit into from
Oct 20, 2024

Conversation

sjschlapbach
Copy link
Member

@sjschlapbach sjschlapbach commented Oct 20, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Updated dependencies for improved performance and stability across various projects.
  • Bug Fixes

    • Adjusted HTML structure in email templates to enhance rendering consistency.
  • Documentation

    • Comments added to HTML files for better clarity and maintenance.

These updates ensure a smoother user experience and maintain the integrity of our applications.

Copy link

aviator-app bot commented Oct 20, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

Copy link

coderabbitai bot commented Oct 20, 2024

📝 Walkthrough

Walkthrough

This pull request includes updates to several package.json files across different projects, primarily focusing on dependency version modifications. The remark-math dependency was downgraded from version 6.0.0 to 5.1.1 in both the @klicker-uzh/docs and @klicker-uzh/markdown projects. Additionally, the @klicker-uzh/frontend-manage project saw an increment in its version to 3.3.0-alpha.2, along with updates to the slate, slate-history, and slate-react dependencies. Minor adjustments were also made to several HTML files related to email templates.

Changes

File Path Change Summary
apps/docs/package.json Updated remark-math dependency: ~6.0.0~5.1.1
apps/frontend-manage/package.json Incremented version to 3.3.0-alpha.2; updated dependencies: slate, slate-history, slate-react
packages/markdown/package.json Downgraded remark-math dependency: 6.0.05.1.1
packages/transactional/out/MagicLinkRequested.html Added comment <!--$-->; adjusted inline styles; moved closing </div> tag
packages/transactional/out/ParticipantAccountActivation.html Added comment <!--$-->; adjusted inline styles; modified hidden div for activation link
packages/transactional/out/RandomizedGroupCreationFailure.html Added comment <!--$-->; adjusted inline styles; removed redundant attributes

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8c91505 and 900466c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • apps/docs/package.json (1 hunks)
  • apps/frontend-manage/package.json (1 hunks)
  • apps/frontend-manage/src/components/common/ContentInput.tsx (1 hunks)
  • packages/markdown/package.json (1 hunks)
  • packages/transactional/out/MagicLinkRequested.html (2 hunks)
  • packages/transactional/out/ParticipantAccountActivation.html (2 hunks)
  • packages/transactional/out/RandomizedGroupCreationFailure.html (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/transactional/out/MagicLinkRequested.html
  • packages/transactional/out/ParticipantAccountActivation.html
  • packages/transactional/out/RandomizedGroupCreationFailure.html
🧰 Additional context used
🔇 Additional comments (8)
apps/docs/package.json (1)

37-37: Verify the impact of downgrading remark-math and clarify PR objective alignment.

The change to downgrade remark-math from ~6.0.0 to ~5.1.1 has been noted and aligns with similar updates in other parts of the project. However, I have a few points to address:

  1. Please verify that this downgrade doesn't negatively impact the functionality or compatibility of the project.
  2. Could you clarify how this change relates to the PR objective of upgrading the slate editor? The connection isn't immediately apparent.

To ensure this change doesn't affect other parts of the project, please run the following script:

This script will help identify any other occurrences of remark-math in the project that might be affected by this version change.

packages/markdown/package.json (1)

16-16: Verify the intentional downgrade of remark-math.

The version of remark-math has been downgraded from 6.0.0 to 5.1.1. While this aligns with a similar change in apps/docs/package.json, it's important to confirm if this downgrade is intentional and necessary.

Please confirm the following:

  1. Is this downgrade intentional and required for compatibility with other dependencies?
  2. Have you tested the markdown rendering functionality to ensure it still works as expected with this older version?
  3. Are there any known issues or limitations in version 5.1.1 that we should be aware of?

To verify the impact of this change, let's check for any other occurrences of remark-math in the project:

✅ Verification successful

Remark-math downgrade verified.

The downgrade of remark-math to version 5.1.1 is consistent across the project, as seen in both packages/markdown/package.json and apps/docs/package.json. Additionally, its usage in relevant source files indicates that this change is intentional and necessary for compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other occurrences of remark-math in the project

# Search for remark-math in all package.json files
echo "Searching for remark-math in package.json files:"
fd package.json --exec grep -H '"remark-math"'

# Search for import statements of remark-math
echo "\nSearching for import statements of remark-math:"
rg 'import.*from.*remark-math'

Length of output: 546

apps/frontend-manage/package.json (5)

Line range hint 4-4: Version update looks good.

The version has been incremented to 3.3.0-alpha.2, which follows semantic versioning and indicates a pre-release version with new features. This aligns with the dependency updates in this PR.


59-59: Slate-react update approved.

The slate-react dependency has been updated from 0.94.2 to 0.110.2, which exactly matches the version of the slate core update. This alignment is good for ensuring compatibility between the packages.


57-59: Overall approval for Slate-related dependency updates.

The updates to slate (0.110.2), slate-history (0.109.0), and slate-react (0.110.2) are consistent with the PR objective of upgrading the slate editor. These changes appear appropriate, but please ensure to:

  1. Check for any breaking changes or migration guides in the Slate changelog.
  2. Verify compatibility between the slate and slate-history versions.
  3. Test thoroughly to ensure these updates don't introduce any unexpected behavior in your application.

After addressing these points, the changes look good to merge.


58-58: Slate-history update approved, verify version compatibility.

The slate-history dependency has been updated from 0.93.0 to 0.109.0, which is in line with the slate core update. However, note that the version numbers are not exactly the same as the slate core (0.110.2).

Please verify that this version is compatible with the slate core version:


57-57: Slate dependency update approved, but verify compatibility.

The slate dependency has been updated from 0.94.1 to 0.110.2. This significant version jump aligns with the PR objective of upgrading the slate editor. However, it's crucial to ensure that this update is compatible with your project and other related dependencies.

Please run the following script to check for any breaking changes or migration guides:

apps/frontend-manage/src/components/common/ContentInput.tsx (1)

108-108: Approved: Correct usage of initialValue prop

The change from value to initialValue is correct and aligns with the latest Slate API best practices. This modification allows the Slate editor to manage its internal state more efficiently while still allowing the parent component to control the initial content and react to changes.

Make sure that the parent component using ContentInput is updated to handle this change correctly, especially if it was previously relying on the value prop to update the editor's content dynamically.

To ensure this change is consistently applied across the codebase, run the following script:

✅ Verification successful

Verification Complete: No remaining usages of value prop with Slate components

All instances of the value prop with Slate components have been successfully replaced with initialValue. No further changes are necessary.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining usage of the 'value' prop with Slate components
rg 'Slate.*value=' -g '*.tsx'

Length of output: 31


Script:

#!/bin/bash
# Verify there are no usages of the 'value' prop with Slate components in .tsx files
rg 'Slate[^}]*?\bvalue\s*=' --type tsx

Length of output: 68


Script:

#!/bin/bash
# Verify there are no usages of the 'value' prop with Slate components in .tsx files
rg 'Slate[^}]*?\bvalue\s*=' -g "*.tsx"

Length of output: 40


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 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.

CodeRabbit Configuration 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

sonarcloud bot commented Oct 20, 2024

Copy link

cypress bot commented Oct 20, 2024

klicker-uzh    Run #3316

Run Properties:  status check passed Passed #3316  •  git commit 408923f3f3 ℹ️: Merge 900466c52bd2b3fb5b6cc5684751a878cf086bfc into 8c9150549fa3c7decf940b977469...
Project klicker-uzh
Run status status check passed Passed #3316
Run duration 11m 21s
Commit git commit 408923f3f3 ℹ️: Merge 900466c52bd2b3fb5b6cc5684751a878cf086bfc into 8c9150549fa3c7decf940b977469...
Committer Julius Schlapbach
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 140

@sjschlapbach sjschlapbach merged commit 864ad79 into v3 Oct 20, 2024
10 of 12 checks passed
@sjschlapbach sjschlapbach deleted the upgrade-slate branch October 20, 2024 12:25
Copy link

cypress bot commented Oct 20, 2024

klicker-uzh    Run #3318

Run Properties:  status check passed Passed #3318  •  git commit 864ad7978e: chore: upgrade slate editor (#4323)
Project klicker-uzh
Run status status check passed Passed #3318
Run duration 11m 19s
Commit git commit 864ad7978e: chore: upgrade slate editor (#4323)
Committer Julius Schlapbach
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 140

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

Successfully merging this pull request may close these issues.

1 participant