Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 985853 - [Keyboard UX update][User Story] Hold shift to enter upper ... #23456

Closed
wants to merge 1 commit into from

Conversation

chardis
Copy link
Contributor

@chardis chardis commented Aug 29, 2014

Fixed Bug 985853 - [Keyboard UX update][User Story] Hold shift to enter upper case characters

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

this._handlePressEnd(press, id);
if (!this.app.upperCaseStateManager.isUpperCasePressed) {
this._handlePressEnd(press, id);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think what we can do here is remove this code, and introduce an interface between targetHandlersManager and targetHandler to have each of the target handler to decide whether or not it should be committed when a new target is activated.

Copy link
Contributor

Choose a reason for hiding this comment

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

e.g.

 DefaultTargetHandler.prototype.COMMIT_WITH_ANOTHER_PRESS = true;

and

CapsLockTargetHandler.prototype.COMMIT_WITH_ANOTHER_PRESS = false;

and have TargetHandlersManager at ontargetactivated do things differently against the existing targets.

Copy link
Contributor

Choose a reason for hiding this comment

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

.... ok. After giving another thought on this, we should still remove the code here in active target manager, but I think we shouldn't need a COMMIT_WITH_ANOTHER_PRESS flag on handlers. What we should do is introduce a onanotherpressactivated callback to each of the handlers and have the handlers to commit/ignore on it's own. Default handler, for example, could call it's own this.commit() and then set this.ignoreCommitActions = true to itself.

Does that make sense more? I just try to find a way to generalize *Managers (bad name, I know) as much as possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe onanotherpresswillactivate since this call should happen before onactivate of another handler?

@try-server-hook
Copy link

chardis chardis started tests. Results

@@ -93,7 +94,9 @@ ActiveTargetsManager.prototype._handlePressStart = function(press, id) {
// All targets before the new touch need to be committed,
Copy link
Contributor

Choose a reason for hiding this comment

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

// Notify current targets about the new touch

@@ -178,6 +185,10 @@ BackspaceTargetHandler.prototype.cancel = function() {
this.app.visualHighlightManager.hide(this.target);
};

BackspaceTargetHandler.prototype.anotheractivate = function() {
this.commit();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

@try-server-hook
Copy link

chardis chardis started tests. Results

@@ -65,6 +65,10 @@ DefaultTargetHandler.prototype.cancel = function() {
DefaultTargetHandler.prototype.doubleTap = function() {
this.commit();
};
DefaultTargetHandler.prototype.newTargetActivate = function() {
// Ignore any action when commit.
this.ignoreCommitActions = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need this.commit() above this line?

@try-server-hook
Copy link

chardis chardis started tests. Results

@try-server-hook
Copy link

chardis chardis started tests. Results

@@ -244,11 +249,17 @@ var CapsLockTargetHandler = function(target, app) {
DefaultTargetHandler.apply(this, arguments);
};
CapsLockTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype);
CapsLockTargetHandler.prototype.NEW_TARGET_ACTIVATED = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is not a constant, let's use newTargetActivated instead of all-caps NEW_TARGET_ACTIVATED.

@try-server-hook
Copy link

chardis chardis started tests. Results

@@ -244,11 +249,18 @@ var CapsLockTargetHandler = function(target, app) {
DefaultTargetHandler.apply(this, arguments);
};
CapsLockTargetHandler.prototype = Object.create(DefaultTargetHandler.prototype);
CapsLockTargetHandler.prototype.newTargetActivated = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, it turned out newTargetActivated is a bad name.

How about isNewTargetActivated?

@try-server-hook
Copy link

chardis chardis started tests. Results

@ghost
Copy link

ghost commented Sep 29, 2014

Vou fixar só de manhã!!!

@ghost
Copy link

ghost commented Sep 29, 2014

Oh, ops!!! I will fix them today. Sure in 6:00 am.

@try-server-hook
Copy link

chardis chardis started tests. Results

@mozilla-autolander-deprecated
Copy link
Contributor

This pull request has been closed due to tree stability issues. Please rebase and re-open the pull request if you still need to land this. Ensure the gaia-try run is green before landing. Sorry for any inconvenience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants