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

Adds support for menus sections, fixes #1210 #1247

Merged
merged 9 commits into from
Jul 17, 2012
Merged

Conversation

tvoliter
Copy link
Contributor

addMenuItem() now supports a MenuSection constant for the relativeID parameter. The new menu is then supported at the end or beginning of the section, where the section is denoted by dividers or the beginning/end of a menu.

fixes #1210

tvoliter added 6 commits July 10, 2012 17:41
* origin/master: (41 commits)
  Replace window.onload with $.ready() to fix unit tests.
  Add path for text plugin now that it is needed for unit tests.
  add comments
  code review fix
  Code review fixes
  Remove KeyMap.js (it's not longer needed and it came back into this pull request)
  Code review cleanup
  updates for code review
  Use Array.isArray instead of $.isArray
  Adding back Previous/Next Match back into Navigate menu.
  fix ProjectManager unit tests
  comment and todo clean up
  remove global from regex expression so only the first match is made bold
  refactor api to allow for programmatically opening a project
  Trigger code hints on "<". Show popup above the line if not eough room to show it underneath the line. Also update the popup location as we filter the code hint list which can change its height.
  Fix my careless mistake; should be "<=" in comparison.
  Fixed an issue with Home key. We are incorrectly showing popup with an empty filter instead of dismissing the popup.
  don't highlight codehints on hover
  add codehint-menu class. remove shadow, padding
  Add item highlighting and keyboard navigation/selection.
  ...
@ghost ghost assigned redmunds Jul 13, 2012
EDIT_REPLACE_MENU: "replace-menu-section",
EDIT_SELECTED_TEXT_COMMANDS: "selected-text-commands-menu-group",
VIEW_HIDESHOW_COMMANDSkey: {sectionMarker: Commands.VIEW_HIDE_SIDEBAR},
VIEW_FONTSIZE_COMMANDSkey: {sectionMarker: Commands.VIEW_INCREASE_FONT_SIZE},
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to have "key" at the end of these 2 ids? It doesn't seem consistent.

tvoliter added 2 commits July 16, 2012 14:58
* origin/master:
  Update CodeMirror SHA
  Clarify clickDialogButton async scenarios
  Allow failed tests to be re-ran individually. Change clickDialogButton to wait for dialog closing generically.
  Update CodeMirror SHA
  Fix issue 1028. Automatically add the new file to the working set upon completion of the file creation.
  Conforming to style guides; fixing undeclared var in test
  Update unit test
  Fix async bug  in unit tests when dismissing file save dialog
  - Update CodeMirror SHA for Sprint 11's upstream merge. - Switch Editor code over from our fork's old scrollPos() API to the new getScrollInfo() from upstream.
  fixes as per peterflynn's feedback
  duplicateText amended to handle end-of-file scenarios, adding new line; testing thereof
@tvoliter
Copy link
Contributor Author

Hi Randy, I followed your suggestion of using new position constants which made the code simpler too. I've pushed my fixes for the review

* @param {?string} relativeID - id of command (future: also sub-menu, or menu section).
* @param {?string} relativeID - id of command (future: sub-menu).
* @param {?string} position - only needed when relativeID is a MenuSection
* @param {HTMLIElement}
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this 3rd parameter can be deleted from documentation

@redmunds
Copy link
Contributor

2 minor comments, then it's ready to merge.

@tvoliter
Copy link
Contributor Author

Thanks Randy. Fixes pushed.

-----Original Message-----
From: Randy Edmunds [mailto:reply@reply.github.com]
Sent: Monday, July 16, 2012 8:18 PM
To: Ty Voliter
Subject: Re: [brackets] Adds support for menus sections, fixes #1210 (#1247)

2 minor comments, then it's ready to merge.


Reply to this email directly or view it on GitHub:
#1247 (comment)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MenuSection insertion doesn't work, but docs suggest it should
2 participants