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

Rewrite of line boundary movement actions #609

Merged
merged 3 commits into from
Jul 22, 2014

Conversation

peitschie
Copy link
Contributor

Rewrite of line boundary detection logic to address numerous cursor movement issues (#555, #405, #227, #225, #224, #185, #124 and #98).

This also removes the last uses of the gui.SelectionMover class, allowing it to be removed in a subsequent PR.

@peitschie peitschie changed the title [Draft] Line boundaries Rewrite of line boundary movement actions May 28, 2014
@peitschie peitschie removed the draft label May 28, 2014
@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1970/

@@ -52,6 +52,18 @@ gui.CaretManager = function CaretManager(sessionController) {
}

/**
* @return {!number|undefined}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if one should just assume the units of the offset to be in pixel, given the method name. But I would prefer to be explicit about that in the API dox.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in method name and API dox.

@kossebau
Copy link
Contributor

Bah, github had the list of commits unordered, so I tried to grasp the second commit as first and made some wrong assumptions of what is already in current master. Sorry for my partial confusion. (And now I also press that green button "Comment" for this comment. The heat!)

/**@const*/ MIN_OVERLAP_THRESHOLD = 0.4;

/**
* Return the faction of overlap between two rectangles. If there is
Copy link
Contributor

Choose a reason for hiding this comment

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

"faction" -> "fraction"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@kossebau
Copy link
Contributor

Being ready to shift any blame to the heat here, the stuff I grasped made sense to me. Still not sure why the paragraph filter/acceptor/classifier is needed, though. RTL will be some fun to add later... oh if will only would have access to native layout info... but for now this PR seems an improvement over the current code to me :) So optimistic to send it direction harbour in the second review round

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1981/

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1982/

}
// usually the rect is 1px width, so rect.left ~= rect.right.
// Right is used because during IME composition the caret width includes
// the chars being composed. The caret is *always* flush against the right side
Copy link
Contributor

Choose a reason for hiding this comment

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

"flush" -> "flushed"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I never realised flush has so many definitions :S.

The one I'm specifically using here is: "level or even with another surface"

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, so it is an adjective here. So I had not yet learned that it can also be that, okay.

@kossebau
Copy link
Contributor

I run risk failing a test about this PR, but still feel rather happy about the code I got.
Second review round done.

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1987/



/**
* @constructor
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it might be still worth it after all to also note here explicitely that this structure is to be considered opaque to anyone not core.StepIterator, so people who come across this structure first get the idea from the beginning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kossebau
Copy link
Contributor

Super. So please 🔨 down to normal commits, then 🐫, eh, ⛵, eh, 🚢, eh, 🚀, no, :shipit: !
And then have fun 👞 all the referenced issues, can confirm they are gone.

When navigating vi the up/down arrow keys, the user often wants to move
multiple lines in sequence (e.g., to visually place the caret in one of
the following lines). To stop the caret suddenly jumping to the left
side of the page when crossing an empty paragraph, the caret's X position
will be stored and re-used by subsequent up/down movement for up to 2s
after navigating by line.

Any other operations performed by the local user (e.g., cursor movement
to the left or right), or edit operations by collaborative users will
immediately clear the stored X position.
@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/1989/

peitschie added a commit that referenced this pull request Jul 22, 2014
Rewrite of line boundary movement actions
@peitschie peitschie merged commit 4b7cf29 into webodf:master Jul 22, 2014
@peitschie peitschie deleted the line-boundaries branch July 22, 2014 16:20
@kossebau
Copy link
Contributor

Darn, forget about that: we also now need to update ChangeLog.md on each user relevant changes/fixes. Could you please add another PR with the respective entry for the ChangeLog.md?

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