-
Notifications
You must be signed in to change notification settings - Fork 535
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
feat(tree): adds a changed
event on TreeBranchEvents
#22977
Conversation
@@ -631,6 +643,9 @@ export interface TreeBranchEvents { | |||
* @param data - information about the commit that was applied | |||
* @param getRevertible - a function provided that allows users to get a revertible for the commit that was applied. If not provided, | |||
* this commit is not revertible. | |||
* | |||
* @deprecated use the "changed" event instead which behaves the same way but also gets fired for more scenarios, see its doc comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably link here with {@link TreeBranchEvents.changed | "changed"}
.changeset/stinky-cars-fart.md
Outdated
"section": tree | ||
--- | ||
|
||
Added a new `changed` event to the (currently alpha) `TreeBranchEvents` that is meant to replace the `commitApplied` event on `TreeViewEvents`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new `changed` event to the (currently alpha) `TreeBranchEvents` that is meant to replace the `commitApplied` event on `TreeViewEvents`. | |
Adds a new `changed` event to the (currently alpha) `TreeBranchEvents` that replaces the `commitApplied` event on `TreeViewEvents`. |
--- | ||
"section": tree | ||
--- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a concise description of the change? Examples can be found in #22965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good!
Co-authored-by: Noah Encke <[email protected]>
Co-authored-by: Noah Encke <[email protected]>
@@ -580,6 +580,7 @@ export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = I | |||
|
|||
// @public @sealed | |||
export interface TreeViewEvents { | |||
// @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off on deprecating this for now. I'm not sure if we should deprecate something in the public API when the only alternative is an alpha API. Some users might not want to participate in alpha APIs, and we would be forcing them to choose between two evils.
If we change our mind, we can easily deprecate later, no harm done, and we will at the very latest deprecate when the other event becomes public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Coverage Summary
↓ packages.dds.tree.src.core.rebase:
Line Coverage Change: No change Branch Coverage Change: -0.03%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 96.99% | 96.96% | ↓ -0.03% |
Line Coverage | 99.46% | 99.46% | → No change |
↑ packages.dds.tree.src.simple-tree.api:
Line Coverage Change: 0.04% Branch Coverage Change: 0.03%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 87.85% | 87.88% | ↑ 0.03% |
Line Coverage | 82.19% | 82.23% | ↑ 0.04% |
↑ packages.dds.tree.src.shared-tree:
Line Coverage Change: No change Branch Coverage Change: 0.08%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 90.77% | 90.85% | ↑ 0.08% |
Line Coverage | 97.23% | 97.23% | → No change |
Baseline commit: d7658b5
Baseline build: 304262
Happy Coding!!
Code coverage comparison check passed!!
⯅ @fluid-example/bundle-size-tests: +425 Bytes
Baseline commit: a475dc4 |
adds a new `changed` event to `TreeBranchEvents` that fires for both local and remote changes --------- Co-authored-by: Noah Encke <[email protected]>
adds a new
changed
event toTreeBranchEvents
that fires for both local and remote changes