Closed Bug 1059663 Opened 10 years ago Closed 10 years ago

Input Management scripts: Don't interchangeably use |group| and |type| variable names

Categories

(Firefox OS Graveyard :: Gaia::System::Input Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S4 (12sep)

People

(Reporter: mnjul, Assigned: mnjul)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

In the current keyboard_manager.js (and probably those submodules it uses) we sometimes use variable name |type| when we actually mean |group|. While for most of the time the exact meaning of a |type| variable (whether it's the "type" attribute of an <input> or the group as a result of type-to-group mapping) can be deduced from the context, we want to avoid confusing ourselves in the future.
Summary: Input Management scripts: Don't not interchangeably use |group| and |type| variable names → Input Management scripts: Don't interchangeably use |group| and |type| variable names
Attached file Patch (PR @ GitHub)
Tim, This patch looks big but does tidy things quite up. This is probably my last big patch during my more focusing on input management refactoring, before I begin to focus more on bug 1044525 and see if Alive can have time to discuss with me KeyboardWindowManager (or whatever that name is gonna be). Copy of my multi-line commit log: - Move group-to-type reverse mapping generation to |InputLayouts| since it's used only there - Move handling of mozChrome events into |handleEvent()| - Extract |onTransitionStateChange| - Eliminate use of |self| - Rename |showAll| to |showImeMenu| - Eliminate interchangeability between |type| and |group| to better reflect the idea in Input Management Additionally the script should now be clean enough to make it out of jshint xfail list (I tried and only a few hiccups to fix). Shall I do it (in a follow-up bug)? Thanks for your feedback & reviewing!
Assignee: nobody → jlu
Attachment #8484819 - Flags: review?(timdream)
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S4 (12sep)
Comment on attachment 8484819 [details] [review] Patch (PR @ GitHub) Do a quick grep to make sure no one else is probing your properties?
Attachment #8484819 - Flags: review?(timdream) → review+
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #2) > Comment on attachment 8484819 [details] [review] > Patch (PR @ GitHub) > > Do a quick grep to make sure no one else is probing your properties? Ah, I forgot to mention that. I had done the necessary greps and ensured things were good before I requested for review. Well, on thinking about this, maybe we should underscore-prefix those private members of the script to make other developers more aware of their intended private-ness. I'll track it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: