-
Notifications
You must be signed in to change notification settings - Fork 172
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
Store canvas position of scene comments. #4791
Merged
Merged
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7a4e661
First version
gbalint 8fceb41
Some fixes
gbalint 3e43d7c
Move maintaining comments to react
gbalint 3e9b6c0
More types
gbalint 28fe8c3
Rename and clear up
gbalint 515c1d5
Only maintain comments when the user has commenting permissions
gbalint 68b2418
Better typing
gbalint cf945d4
Merge branch 'master' into feature/autoconvert-scene-comments
gbalint dcc67bd
Discriminated union type
gbalint f71055b
Merge branch 'master' into feature/autoconvert-scene-comments
gbalint 229c40e
try waiting
gbalint c20c26b
remove wait
gbalint 7eaa66b
Merge branch 'master' into feature/autoconvert-scene-comments
gbalint dc20409
Missing changes for the discriminated union refactor
gbalint 8e04f24
Revert "Missing changes for the discriminated union refactor"
gbalint d4344c9
Revert "Discriminated union type"
gbalint File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't like this! what's the point of these being optional here and then have a separate SceneThreadMetadata where they are declared as non optional?
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.
The reason is that canvas comments don't have these properties (sceneId, sceneX, sceneY), and we are only allowed to have string, number and boolean properties here, so no way to create a structured type.
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.
why not
CanvasThreadMetadata
without these fields andSceneThreadMetadata
with these fields, and thenThreadMetadata = CanvasThreadMetadata | SceneThreadMetadata
but better yet, why not make it a discriminated union type with a type: 'canvas' | 'scene'? I see on master there was some notion to do that
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.
I can not use discriminated union types because I can only add string/boolean/number fields.
Undiscrimated union types are not that nice to work with, but you can be right maybe this solution is better: 68b2418
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.
It turned out the problem was not discriminated union types, but that I used interfaces and not types.... Here is the proper solution: dcc67bd