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

Allow specifying a topic when subscribing to a document #78

Merged
merged 12 commits into from
Jul 11, 2023

Conversation

humdrum
Copy link
Contributor

@humdrum humdrum commented Jun 21, 2023

What this PR does / why we need it:

  • provide a new API that allows users to subscribe to the document with a specific target path.
  • improve the event value of Local/RemoteChange.

Which issue(s) this PR fixes:

Fixes #74 #76

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

document.eventStream is removed. Use document.subscribe() to catch the events.
Please refer to the samples.

Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@humdrum humdrum added the enhancement 🌟 New feature or request label Jun 21, 2023
@humdrum humdrum added this to the 0.3.4 milestone Jun 21, 2023
@humdrum humdrum requested a review from hackerwins June 21, 2023 07:29
@humdrum humdrum self-assigned this Jun 21, 2023
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #78 (b85832c) into main (8e84992) will increase coverage by 0.41%.
The diff coverage is 63.87%.

❗ Current head b85832c differs from pull request most recent head 48e762a. Consider uploading reports for the commit 48e762a to get more accurate results

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   55.54%   55.96%   +0.41%     
==========================================
  Files          92       92              
  Lines       14303    14649     +346     
==========================================
+ Hits         7945     8198     +253     
- Misses       6358     6451      +93     
Impacted Files Coverage Δ
Sources/Document/DocEvent.swift 0.00% <0.00%> (ø)
Sources/Document/Json/JSONText.swift 73.57% <ø> (+17.78%) ⬆️
Tests/Integration/DocumentIntegrationTests.swift 0.45% <0.00%> (-0.16%) ⬇️
Sources/Document/Operation/Operation.swift 60.86% <58.13%> (-39.14%) ⬇️
Sources/Document/Operation/SelectOperation.swift 46.34% <75.00%> (-5.28%) ⬇️
Sources/Document/Document.swift 48.82% <79.26%> (+8.28%) ⬆️
Sources/Document/Operation/AddOperation.swift 92.30% <81.81%> (-4.25%) ⬇️
Sources/Document/Operation/IncreaseOperation.swift 73.80% <81.81%> (-7.45%) ⬇️
Sources/Document/Operation/EditOperation.swift 58.82% <85.71%> (-0.16%) ⬇️
Sources/Document/Operation/SetOperation.swift 70.27% <85.71%> (+2.52%) ⬆️
... and 10 more

... and 1 file with indirect coverage changes

@humdrum humdrum requested review from 7hong13, chacha912 and myupage and removed request for hackerwins June 22, 2023 06:33
Sources/Document/Document.swift Show resolved Hide resolved
Sources/Document/DocEvent.swift Outdated Show resolved Hide resolved
@humdrum humdrum modified the milestones: 0.3.4, 0.3.5 Jul 10, 2023
@humdrum humdrum merged commit b6424dc into main Jul 11, 2023
2 checks passed
@humdrum humdrum deleted the document-subscribe-topic branch July 11, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying a topic when subscribing to a document
3 participants