Skip to content

chore: Internally operate Minimongo collections over Zustand stores (as transition for stores-only) #35470

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

Merged
merged 23 commits into from
Jun 4, 2025

Conversation

tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Mar 11, 2025

Proposed changes (including videos or screenshots)

It prepares for a migration from Meteor-dependent Minimongo collections to Zustand stores by making the said collections store their data into the stores.

Issue(s)

ARCH-1483

Steps to test or reproduce

Further comments

Instead of writing statements like

const doc = useReactiveValue(() => MyCollection.findOne({ xyz: 'abc' }));

the developer is encouraged to use the Zustand store as a hook

const doc = MyCollection.use((state) => state.find((record) => record.xyz === 'abc');

Although not as ergonomic as the Minimongo API, writing selector functions is more portable and performant than Mongo-like query objects.

Copy link
Contributor

dionisio-bot bot commented Mar 11, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Mar 11, 2025

⚠️ No Changeset found

Latest commit: 7a7ddd4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 11, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35470/

Built to branch gh-pages at 2025-06-04 01:33 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 54.23457% with 1994 lines in your changes missing coverage. Please review.

Project coverage is 64.51%. Comparing base (c008401) to head (7a7ddd4).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35470      +/-   ##
===========================================
- Coverage    64.97%   64.51%   -0.46%     
===========================================
  Files         3112     3123      +11     
  Lines        93795    97840    +4045     
  Branches     17810    18513     +703     
===========================================
+ Hits         60944    63123    +2179     
- Misses       30065    31893    +1828     
- Partials      2786     2824      +38     
Flag Coverage Δ
e2e 57.58% <42.42%> (-0.85%) ⬇️
unit 69.77% <44.11%> (-1.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tassoevan tassoevan force-pushed the chore/client-collections branch from affd24f to aad0285 Compare March 12, 2025 02:42
@tassoevan tassoevan changed the title poc: client collections chore(PoC): client collections Mar 12, 2025
@tassoevan tassoevan force-pushed the chore/client-collections branch 22 times, most recently from 3391c85 to d0f4a7b Compare March 18, 2025 20:44
@tassoevan tassoevan force-pushed the chore/client-collections branch from 4143ece to 6b60ebe Compare June 4, 2025 01:23
@tassoevan tassoevan changed the title chore(PoC): client collections chore: Internally operate Minimongo collections over Zustand stores (as transition for stores-only) Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@RocketChat RocketChat deleted a comment from kodus-ai bot Jun 4, 2025
@tassoevan tassoevan marked this pull request as ready for review June 4, 2025 14:10
@tassoevan tassoevan requested review from a team as code owners June 4, 2025 14:10
@ggazzo ggazzo added this to the 7.8.0 milestone Jun 4, 2025
@ggazzo ggazzo merged commit 1ff6d7a into develop Jun 4, 2025
54 checks passed
@ggazzo ggazzo deleted the chore/client-collections branch June 4, 2025 16:29
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.

2 participants