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

WIP: Optimize RTC Updates and RTC Highlighting #371

Merged
merged 11 commits into from
Sep 9, 2018

Conversation

Ram81
Copy link
Member

@Ram81 Ram81 commented Jul 29, 2018

Work in progress

@kdexd
Copy link
Member

kdexd commented Aug 20, 2018

Please resolve the conflicts and ping here :) I'll review it thereafter.

@Ram81
Copy link
Member Author

Ram81 commented Aug 24, 2018

@kdexd Conflicts resolved

Copy link
Contributor

@utsavgarg utsavgarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good mostly, have left some questions and suggestions for minor changes. Great effort! :)
There's a large amount of new code, it might be useful to add some comments to make it more understandable.

user_id = data['userId']
highlight_color = data['highlightColor']
username = data['username']
print(data['username'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging statement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that 😅

@@ -8,7 +8,7 @@ def check_login(request):
try:
user = User.objects.get(username=request.user.username)
user_id = user.id
username = ''
username = 'Kafka'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep the default user name as this? Because in the open link sharing case, all users will be given the same user name and it might be confusing. For now can we do something simple like User1, User2 etc. ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do select from a pool of usernames, but then we'll have to figure out some method for each user having a unique name from the pool. Because there's no place where we can manage details of a session other than websocket pipeline

this.changeCommentOnLayer = this.changeCommentOnLayer.bind(this);
this.getRandomColor = this.getRandomColor.bind(this);
}
getRandomColor() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of random colours, can we choose from a colour palette to ensure the colours are different? Because in some cases they are very similar. We can have a set of say 10 colours and then reuse them if there are more users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may get repitition here, I wasn't able to figure out a way to completely ensure colors are not repeated for multiple users. Similar to username problem

@@ -129,19 +143,60 @@ class Content extends React.Component {
onSocketMessage(message) {
// message received on socket
let data = JSON.parse(message['data']);
let rebuildNet = false;
let nextLayerId = this.state.nextLayerId;
//let rebuildNet = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing them

highlightColor = this.props.layer.highlightColor[this.props.layer.highlightColor.length - 1];
highlightUser = (<div style={{
background: highlightColor,
color: 'white',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we shift these style specifications to the css stylesheet as they are fixed?

Copy link
Member Author

@Ram81 Ram81 Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but highlight color is dynamic

Copy link
Contributor

@utsavgarg utsavgarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@utsavgarg utsavgarg merged commit 7b51c13 into Cloud-CV:RTC-Feature Sep 9, 2018
Ram81 added a commit to Ram81/IDE that referenced this pull request Oct 23, 2018
* RTC comment UI improvements

* Improvising UI

* Optimze RTC update and add highlight initial work

* Add complete support for RTC checkpointing

* Add support for RTC checkpointing comments

* Complete model history with checkpointing

* Add support for RTC highlighting

* Fix issues in username in highlight

* Change comment ref name

* Remove debugging statements and minor fixes
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.

3 participants