atom-archive / text-document

MIT License
57 stars 10 forks source link

Added specs to Point and Range classes #11

Closed vramana closed 9 years ago

vramana commented 9 years ago
vramana commented 9 years ago

@maxbrunsfeld What is the description of Point.traversalFrom? Is it something like delta traversalFrom a point ??

maxbrunsfeld commented 9 years ago

b.traversalFrom(a) returns a Point containing the number of rows and columns that you would have to move to get from a to b.

In other words:

vramana commented 9 years ago

@maxbrunsfeld Thanks!!

vramana commented 9 years ago

@maxbrunsfeld except for the two notes I left this PR is complete I guess. Can you review it?

thomasjo commented 9 years ago

@vramana Remember to update your task list :smiley:

vramana commented 9 years ago

@maxbrunsfeld I fixed the things you mentioned. Can you take a look at this now?

maxbrunsfeld commented 9 years ago

Looks great, @vramana! Thanks for adding this stuff!

vramana commented 9 years ago

@maxbrunsfeld I want add more functionality. I have read through the source files. I kind of understand what is happening. Can you assign a simple task to me?

maxbrunsfeld commented 9 years ago

@vramana I really appreciate your taking an interest in this project! For a while, it will be difficult for people outside of the core team to contribute, because the project is at such an early stage. It is difficult to think of a simple task right now, but in the future there will probably lots of things we need help with.

I have one idea for a task, though it is not simple. We need to implement the 'find and replace' functionality from text-buffer. Specifically, what we need to do is copy the tests for scan, backwardsScan, scanInRange, and backwardsScanInRange from text-buffer to our TextDocument spec, and make those tests pass by implementing those methods on the TextDocument class.

I have to warn you that I may not be able to give you much guidance here, and we may need to start working on this feature ourselves as soon as 2 weeks from now, but if you are interested, we would love to merge a pull request adding some or all of this functionality.

Also, if you want to hold off until the project has stabilized a bit and there are some easier contributions to make, I definitely understand.

Thanks!

vramana commented 9 years ago

@maxbrunsfeld I am busy for 2 more days or so. After I'll start to work on this. In the past year so, I have been reading a lot of stuff here and there about node, javascript. I want to concretely put that to use. Unfortunately, due to my course work at university, I was not able to write anything significant. My summer starts from next week. I'll try to work on this. I think I'll learn a lot from this. I also want to get a first hand feel for writing things from scratch. I may utterly fail but I don't think there is any harm in trying.

vramana commented 9 years ago

@maxbrunsfeld Can you explain difference between position and inputPosition ? I think position refers to the start of active region of the patch and inputPosition refers to the start of visible region on the screen? I have been going through source files but it is not exactly clear.

maxbrunsfeld commented 9 years ago

@vramana You may want to hold off your contributions to this repository for a while. We're reconsidering our approach and we may end up incorporating parts of this codebase into other pieces of Atom, but pausing development of this repo for a while. Currently, I am porting our work on the MarkerIndex and History to the original tex-buffer codebase. I'll let you know when we have a more firm plan for text-document.