Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix autofill regression caused by refactor #4669

Closed
wants to merge 1 commit into from
Closed

Fix autofill regression caused by refactor #4669

wants to merge 1 commit into from

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Oct 11, 2016

Some of the refactoring done in #4361 unfortunately broke autofill. This commit reverts the parts that broke it back to the pre-refactor state and keeps the parts that were OK.

Properly fixes #1725

js/store/windowStore.js and js/contextMenus.js had a circular dependency with each other. Ultimately, contextMenus.js shouldn't have a dependency on windowStore (IMO). I tried to keep the refactored code in place and while eliminating the windowStore dependency in contextMenus.js and realized this is not an easy task (we'll have to revisit in future)

Auditors: @darkdh @bridiver

Test Plan: follow steps from original PR. The original automated tests work great

This commit reverts the parts that broke it and keeps the parts that were OK.

Auditors: @darkdh @bridiver

Test Plan: follow steps from original PR
@bsclifton bsclifton added this to the 0.12.5dev milestone Oct 11, 2016
@@ -20,7 +20,6 @@ const {tabFromFrame} = require('../state/frameStateUtil')
const {l10nErrorText} = require('../../app/common/lib/httpUtil')
const {aboutUrls, getSourceAboutUrl, isIntermediateAboutPage, navigatableTypes} = require('../lib/appUrlUtil')
const Serializer = require('../dispatcher/serializer')
const { showBookmarkFolderInit } = require('../contextMenus')
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the line which broke things (definitely my bad)

@bsclifton bsclifton changed the title Fix autofill regression Fix autofill regression caused by refactor Oct 11, 2016
@@ -841,7 +813,7 @@ const doAction = (action) => {
if (getSetting(settings.AUTO_HIDE_MENU)) {
doAction({actionType: WindowConstants.WINDOW_TOGGLE_MENUBAR_VISIBLE, isVisible: false})
} else {
hideContextMenu(action)
doAction({actionType: WindowConstants.WINDOW_SET_CONTEXT_MENU_DETAIL})
}
doAction({actionType: WindowConstants.WINDOW_SET_SUBMENU_SELECTED_INDEX})
doAction({actionType: WindowConstants.WINDOW_SET_BOOKMARKS_TOOLBAR_SELECTED_FOLDER_ID})
Copy link
Member Author

Choose a reason for hiding this comment

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

Glad this came up- this is something I missed while doing the refactor. Resetting the menu status is supposed to clear the selected folder ID. This action never got renamed to the new one

@bsclifton
Copy link
Member Author

This PR no longer needed- it was included as one of the commits in #4658 (I was still working on that one and was going to drop it via rebase)

@bsclifton bsclifton closed this Oct 11, 2016
@luixxiul luixxiul removed this from the 0.12.5dev milestone Oct 11, 2016
@bsclifton bsclifton deleted the partial-revert-bookmarks-toolbar-refactor branch October 11, 2016 14:52
@bridiver
Copy link
Collaborator

agree on the contextMenus -> windowStore dependency. Any state it requires should be passed in like any other component

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

Successfully merging this pull request may close these issues.

Moving mouse to other bookmarks toolbar items after click should make them expand
4 participants