multihack / multihack-brackets

Realtime collaboration for programmers. (Brackets Extension)
MIT License
24 stars 9 forks source link

Freeze selections #20

Open tweakimp opened 7 years ago

tweakimp commented 7 years ago

It would be helpful if you could highlight code for othere, maybe via right click on selected code (right click opens context menu > choose "highlight in multihack." or highlight a whole row via right click on its number.

t-mullen commented 7 years ago

Selecting text will highlight it for others, is that what you mean?

tweakimp commented 7 years ago

No. If I have text selected, I want to have the option of highlighting it for others. Otherwise text would be highlighted all over the place while just working on the code. All room mates would also need to have the option to remove all highlights to prevent the code from looking too cluttered.

t-mullen commented 7 years ago

Oh you mean leaving a permanent highlight so that when you deselect it, it's still highlighted.

Ok, I'll think about it.

tweakimp commented 7 years ago

Exactly. Additionally even give the option to comment on that highlight

Worie commented 7 years ago

Hi, this feature is sounds cool, feel free to mention me if you'd like any help with it, I've already created something similar for my private extensions

tweakimp commented 7 years ago

This is github, why don't you just start and make a pull request? :)

t-mullen commented 7 years ago

@Worie I'd appreciate it.

I know how to make selections visible, but the issue is persisting the marked text when the user switches editors. Brackets doesn't store any metadata for that. I thought about storing it myself, but never got around to it.

If you have a better solution, please share! :)

tweakimp commented 7 years ago

From my newbee view: cant you just assign one person in the group to be the "master" which means he stores this data? If he leaves the room, someone else becomes master and loads the data from the old master.

t-mullen commented 7 years ago

I've figured out how to store the data, so that's alright.

What would the workflow for this be?

I was thinking:

  1. User highlights the code.
  2. User right-clicks, "Freeze Highlight"
  3. Highlight stays there until user right-clicks it, "Remove Highlight"
tweakimp commented 7 years ago

I think: right click - > "highlight for all room mates", maybe even "highlight for specific room mate". Everyone who can see the highlight can remove it.

t-mullen commented 7 years ago

But you can already see each other's highlights right? All this feature is adding is the ability to freeze a selection.

I like the idea of removing other's highlights though.

tweakimp commented 7 years ago

Yeah, I can see the current selection, but this should be a permanent code marker. (until removed)

t-mullen commented 7 years ago

I'm still not clear on why you want this. What's the usecase for this that normal selections don't cover?

tweakimp commented 7 years ago

Lets say we both code something together. I look over what you are doing and spot some lines of code that could be done better. I highlight them and tell you "Look over here, redo this". I dont have to keep it selected and can continue working on whatever i am doing, but the selected lines of code are still there and help you find what I meant.

t-mullen commented 7 years ago

I think that's better solved by "Bring to line".

https://github.com/RationalCoding/multihack-web/issues/27

tweakimp commented 7 years ago

I thought of it more like a "to do list" feature, to be able to highlight everything that needs rework.

t-mullen commented 7 years ago

Ok, I see why that could be useful. Going to backlog this because it's not core-featureset; but I can see it being implemented later.

tweakimp commented 7 years ago

Ok, thanks.