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

Sequential navigation in edit history #13418

Merged
merged 15 commits into from
Jun 28, 2017
Merged

Sequential navigation in edit history #13418

merged 15 commits into from
Jun 28, 2017

Conversation

swmitra
Copy link
Collaborator

@swmitra swmitra commented Jun 5, 2017

This feature is something which I missed a lot! Remembering most recently used (interesting?) cursor positions and navigating there manually is really cumbersome.

This module adds the feature of remembering cursors/selections across full editors inside a project root and aids the user by providing 'Navigate Back'(Alt+I) and 'Navigate Fwd'(Alt+Shift+I) using the captured navigation frames.

Ping @petetnt @ficristo for review.

Copy link
Collaborator

@petetnt petetnt left a comment

Choose a reason for hiding this comment

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

Some initial code review, good stuff @swmitra!

captureTimer,
activePosNotSynched = false,
jumpInProgress,
command_JumpBack,
Copy link
Collaborator

Choose a reason for hiding this comment

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

The camelcase + underscore hybrid is a bit weird, would prefer just commandJumpBack.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

*/
var jumpedPosStack = [],
captureTimer,
activePosNotSynched = false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: values with defaults first

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: activePosNotSynced

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

*/
function _validateNavigationCmds() {
if (jumpToPosStack.length > 0) {
command_JumpBack.setEnabled(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just do

commandJumpBack.setEnabled(jumpToPosStack.length > 0);
commandJumpFwd.setEnabled(jumpedPosStack.length > 0);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

fileEntry = FileSystem.getFileForPath(entry.file);

if (entry.inMem) {
var indxInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.file);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: prefer index over indx

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

* Function to check existence of a file entry
* @private
*/
function _checkIfExist(entry) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We probably should null check for entry here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's already checked at the call location -

if (navFrame) {
            // We will check for the file existence now, if it doesn't exist we will jump back again
            // but discard the popped frame as invalid.
            _checkIfExist(navFrame).done(function () {
`

function NavigationFrame(editor, selectionObj) {
this.cm = editor._codeMirror;
this.file = editor.document.file._path;
this.inMem = editor.document.file.constructor.name === "InMemoryFile" ? true : false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this.inMem = editor.document.file.constructor.name === "InMemoryFile"

is sufficent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

}

/**
* Binds the lifecycle event listner of the editor for which this frame is captured
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: listener

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 😄

* -> Addition/Updation of characters in the captured selection
*/
NavigationFrame.prototype._createMarkers = function (ranges) {
var range, index, bookMark;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: new variables on new lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

range = ranges[index];
// 'markText' has to used for a non-zero length position, if current selection is
// of zero length use bookmark instead.
if (range.anchor.line === range.head.line && range.anchor.ch === range.head.ch) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: can anchor or head be null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If there is a cursor or selection, it can never be null and if there are no selections/cursor then the ranges would be an empty array.

}

this.selections = [];
var marker, selection, index;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: new variables on new lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 5, 2017

@petetnt Thanks a lot for reviewing this PR. It was really quick 👍
I have updated the code with relevant changes pertaining to review comments. All yours now 😄

Copy link
Collaborator

@petetnt petetnt left a comment

Choose a reason for hiding this comment

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

Few more nits, otherwise codewise starting to LGTM. Haven't had the time to test it yet.

// The latency time to capture an explicit cursor movement as a navigation frame
var NAV_FRAME_CAPTURE_LATENCY = 2000;

/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: missing * (/**)

*/
var jumpToPosStack = [];

/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: missing * (/**)

} else {
deferred.reject();
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: indentation: Tabs -> Spaces

if (!this.cm) {
return;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: L173-L177 indendation Tabs -> Spaces

}
});

// Iterate over CM textmarkers and collate the updated(if?) positions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Indentation: tabs -> spaces

this.selections = [];
var self = this;

// Collate only the markers we used to mark selections/cursors
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Indentation: tabs -> spaces

selection,
index;

// Reset selections first.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Indentation: tabs -> spaces

@ficristo
Copy link
Collaborator

I will not review, but I have a question.
If I understand correctly the navigation history is never emptyed but when you change project.
Doesn't it risk to consume too much memory? Usually this kind of things have a limit, like remembering only the last 100 navigation changes.

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 19, 2017

@ficristo You are right 👍 .
I had now put a limit of 30 and control overflow beyond that as having infinite navigation frames won't help anyone. As a developer even to do 30 back navigation would be too much.

@swmitra swmitra requested a review from marcelgerber June 19, 2017 04:34
@swmitra
Copy link
Collaborator Author

swmitra commented Jun 19, 2017

@petetnt Can you please have a look at the PR again and if possible use it.
@MarcelGarber Can you please have a look at this PR?

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 19, 2017

@nethip Can you please have a look at this PR?

* @private
* @type {Array.<Object>}
*/
var jumpedPosStack = [],
Copy link
Contributor

Choose a reason for hiding this comment

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

It is better to initialize all the variables. here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Collaborator

@petetnt petetnt left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me codewise, one nit and one typo. Also there's now mixed tabs and spaces in new code. Haven't had the time to test the functionality yet but I'll try soon.

/**
* Command handler to navigate forward
*/
function _navigateFwd() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would prefer _navigateForward() here


/**
* Function to create CM TextMarkers for the navigated positions/selections.
* This logic is required to ensure that the captured navaigation positions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: navigation

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 19, 2017

@petetnt Done. Fixed the last 2 nits and mixed tabs & spaces.

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 22, 2017

@nethip Can you please have a look at this PR again?

@nethip
Copy link
Contributor

nethip commented Jun 22, 2017

@swmitra I think the code part is fine. But here are few questions I had

  • What will happen if the file, for which a NavigationFrame is present in your JumpToStack or JumpedPosStack, is changed externally ?

  • I am trying to understand why you have to use beforeSelection instead of selection changed? Had it been capturing after selection change, you won't have to rely on activePosNotSynced variable.

  • I see that you have used currentFullEditor for switching between different files to restore a frame state. Does that mean selections captured for editors inside Inline editors will transform to full view when back or front command is fired?

  • I see that you are relying on cm.setBookMark. What happens when any extension overrides the selection marks set, while selection being changed?

  • Also for batch operations like Replace All, are you going to log all of the selection changes?

Edited:

  • What happens if the selection was captured in a document from pane 1 and now the document is moved to pane 2?

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 22, 2017

@nethip Thanks a ton for reviewing the PR 👍

I will try to answer the questions, please let me know if you think anything in the assumptions can go wrong.

  • If we categorize external changes, we can see there are broadly 2 different kind of mutations. First one is the file entry itself being changed (delete/rename) and secondly the content being changed. In first case when we actually try to navigate using the stale frame, we end up discarding the frame as the entry doesn't exist on the disk. In second case, Brackets calls _resetText() on the existing editor with modified content which removes all the CM markers. So we gracefully discard the frame.(Let me verify it once again).

  • I have used CM beforeSelection to capture the selection change "origin". This property is not part of selection change event as that's a simulated event by Brackets. We need to check for the origin of the change to discard frame capture in case user has used keyboard navigation keys or cursor change has happened because of character input. We just want to capture programmatic selection change (jump to def) or explicit pointer click.

  • This part was getting really tricky to implement as showing the selection again in InlineEditor would be impossible for two reasons - First and the most prominent one is availability of "createInlineEditor" as a public API. I have seen multiple usage of this API even by extensions and then might show this in a different DOM container all together. That's the reason I listen only for full editors ( check for _paneId). So any navigation in inline editors are not captured at all.

  • Once a textmark is created in CM, it can't be overridden. It can be removed though. In case it is removed , we won't be able to find it ("find()" will return empty position) and hence we will not act on it.

  • Correct me if I am wrong, to highlight the matches in search/replace operation, we use CM text marker instead of actual selection and to actually replace the searched token we use replaceRange. So we don't use selection in these operations.

Please let me know if you think we can go wrong in any of these or other situations. Thanks again for raising this questions, I could verify lot of the scenarios after looking at this 😄

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 23, 2017

@nethip I have added additional handling for external changes. Also, deciding on which pane the document should open on navigation is determined based on the current master editors association with pane.

Please have a look at the additional changes.

function _navigateForward() {
var navFrame = jumpedPosStack.pop();

// Check if the poped frame is the current active frame or doesn't have any valid marker information
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have an early return here for the case when navFrame is null (!navFrame)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

*/
function _hasNavBackFrames() {
return (jumpedPosStack.length > 0 && jumpToPosStack.length > 0)
|| (!jumpedPosStack.length && jumpToPosStack.length > 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite get this code.
So, when you can't jump forward, there need to be at least two elements in jumpToPosStack? Why is that?

Copy link
Contributor

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Didn't really get to actually testing it yet.
Just one note, and I hope you are aware of it: CodeMirror already has a kind of cursor/selection history using Ctrl-U / Ctrl-Shift-U (Windows), so maybe we can utilize that a little? Maybe they already take care of all the markers internally?

* -> Addition/Deletion of lines before the captured position
* -> Addition/Updation of characters in the captured selection
*/
NavigationFrame.prototype._createMarkers = function (ranges) {
Copy link
Contributor

Choose a reason for hiding this comment

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

createMarkers and reinstateMarkers share a lot of code. Maybe we can consolidate them a little more?

As I see it, this should work:

NavigationFrame.prototype._reinstateMarkers = function (editor) {
    this.cm = editor._codeMirror;
    this.paneId = editor._paneId;
    this._createMarkers(this.selections)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The problem was with range start and end placeholder names but handled it now to make use of same function.

}

// Ensure cursor activity has not happened because of arrow keys or edit
if (selectionObj.origin !== "+move" && (!window.event || (window.event && window.event.type !== "input"))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can simplify the logic here: !window.event || window.event.type !== "input"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored this code earlier but missed this condition completely. Changed it now.

// Check if we have reached MAX_NAV_FRAMES_COUNT
// If yes, control overflow
if (jumpToPosStack.length === MAX_NAV_FRAMES_COUNT) {
var navFrame = jumpToPosStack.splice(0, 1)[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use .shift() here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

if (!jumpedPosStack.length) {
if (activePosNotSynced) {
currentEditPos = new NavigationFrame(EditorManager.getCurrentFullEditor(), {ranges: EditorManager.getCurrentFullEditor()._codeMirror.listSelections()});
jumpedPosStack.push(currentEditPos);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:
Make the anonymous function inside setTimeout a "real" function and use it here, too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to use the anonymous function to create closure in the call back scope.

* @private
* @type {Array.<Object>}
*/
var jumpToPosStack = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

To make naming clearer, you might also use jumpStackForward and jumpStackBackward

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

*/
function NavigationFrame(editor, selectionObj) {
this.cm = editor._codeMirror;
this.file = editor.document.file._path;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might call this filepath or just path to make it clear that this is not a file handle.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. "filePath" would be more logical.

@swmitra
Copy link
Collaborator Author

swmitra commented Jun 27, 2017

@marcelgerber Thanks a lot for reviewing this PR 👍
I have tried CM's implicit way to handle navigation but the problem was to handle navigation between multiple instances of CM which is the case we want to support predominantly. Then if we add handling of external changes and re initiating the edit session of the same file in a different CM instance, maintaining the marker cache inside CM was impossible. I had to externalize the whole thing to handle such scenarios.
Do let me know if you think it can be handled in a better way by supporting all the features what we are going to have with this implementation.

I have addressed most of the review comments. Please have a look at this PR and use it if possible.

@saurabh95 saurabh95 merged commit 9bb0bfb into master Jun 28, 2017
@saurabh95 saurabh95 deleted the swmitra/Navigation branch June 28, 2017 09:33
saurabh95 pushed a commit that referenced this pull request Jul 3, 2017
* add a tab with default extensions to extension manager

* implement getDefaultExtensionPath function

* enable and disable default extensions through a preference

* use the preference when attempting to load an extension

* do not allow disabling/enabling of themes

* better way to handle themes

* Upgraded version to 1.10

* Now search history is stored in preferences and user can go through the search history using key up and key down in search bar

* ALF Automation (#13179)

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Fixed a minor issue

* Addresses issue where style and script tags (and their contents) did not appear as collapsible in html mixed mode.

* Add no-unsafe-negation rule and upgrade grunt-eslint to 19.0.0

* Added a check of Untitled doc in _getNormalizedFilename and _getDenormalizedFilename

* ALF Automation (#13204)

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Replaced .border-radius with border-radius css in brackets_patterns_override.less

This fixes #13227

* Addressed review comments and also added tests

* Add jsx language ID to supported languages for JavaScript code hints

* Style code (cleanup)

* Add media queries to display search and filter below tabs

* Change padding to be consistent with other elements' padding

* Reset margin of filter dropdown and add top and bottom padding to div container

* Prevent media queries from overlapping

* Wrap search elements in a container & add responsiveness using flex

* Use flex-item mixin

* Move custom search bar width to media query

* Add GitHub Brackets OAuth token to romove CLA pull request limit

* Adding rest filter expression

* Updated webplatform links in css.json from https://docs.webplatform.org/wiki/ to http://www.webplatform.org/docs/ (#13266)

* Addresses #13264 where setting `saveFoldStates` preference to false caused the code folding extension to  stop working.

* CSS code hints in 'style' attribute value context

* Append auth token only when available in travis environment (#13272)

* Append auth token only when available in travis environment

* Remove unused var

* #7276 Live Preview highlight customization  (#12949)

* Live Preview visual customization (colors of highlight can be customized via user preferences)

* PR improvements
Remove trailing spaces, use Object.assign instead of manually iterating over remoteHighlight properties and remove quotes from object properties in default configuration of remoteHighlight

* Allow to animate transform property via transition

* Remove old vendor prefixes from transitionValues in RemoteFunctions.js

* updateConfig RemoteFunctions.js method
Enable injecting new config into remoteFunction when user changed preferences, without the need to restart the live preview session.

* Show margin and paddings in live preview.

* Do not show element if it has width or height equal to 0. A little bit of clean up

* PR improvements
calculateSize is renamed to sum. (better naming conventions are welcome). sum now takes an array as argument. It returns sum of parsed array elements, suffixed with „px”.

* Redraw via requestAnimationFrame if element has transition / animation on it.

* PR improvements.
Set experimental to false by default, if no config specified (caused the test to crash).
Minor code quality improvements, removed duplicated variables.

* Fix ESLINT errors.

* drawMarginRect and drawPaddingRect functions now calculate the require size of highlight elements instead of manaul calculations on each element.

The code is shorter and more readable. Also, it’ll be easier to move drawing functions into separate file if necessary.

* Temporary workaround for transform issue.

* Formatting improvements

* Fix font family name preference (#13279)

* Update grunt-contrib-watch to 1.0.0 and clean a bit the task (#13215)

* Scrapped QuickDocs data for css and html from MDN to css.json and html.json (#13268)

* Scrapped summary and values of css properties from MDN to css.json

* Migrated mozilla's extension of MDNDocs to Brackets with some minor changes

* Removed redundant file

* Fixed faling tests, modified a test to test HTML docs

* Renamed all WebPlatformDocs strings to MDNDocs

* Addressed review comments

* Removed the usage of array for supported languages

* Pre-release build for 1.10 (#13283)

* Fix #13274 - make Brackets margin/padding highlight work like Chrome devtools one

* Migrated missing Quick Docs Tests from PR #10036 (#13285)

* Add inputStyle preference (#13216)

* Add indentBlockComment preference. Support indent block comments on line comment command

* Whitespace removal

* AtRules, Pseudo elements and Pseudo selector code hints

* Revert "Fix #13274 - make Brackets margin/padding remoteHighlight work like Chrome one"

* Fix highlighting elements with border and transform-origin property.

* Adress review comments and restructure using different extensions

* Added Search History UI similar to Quick Open

* Minor Change

* Fixed some issues

* Check for useTabChar and correct a comment. Add some tests

* Handle multiline attribute value and add UNIT test for element styles

* Search bar is visible after pressing arrow up and down keys

* Added JSDocs and updated tests

* Zero results are not highlighted red now

* Added dropdown icon to toggle search History

* fix the extension-manager-min-width variable

* Handle SCSS mode seperately

* Use a single preference

* Add test for block comments

* Correct a test

* Check also if it is a line comment command

* Addresses #13282 which caused performance issues when navigating between large folded files.
A check is now performed to ensure we do not attempt to restore line folds for editors whose folds have already been initialised.

* removed unused variable

* Removed filtering in search dropdown

* Return 0 from _firstNotWs

* Changed url to access Japanese translated page (#13321)

* Update Codemirror to version 5.25.2

* Addressed review comments

* Removed Lint error

* add: flow-root as value for display (#13334)

* Changed Global.js to enable Native Menus for Linux

* Adding unit tests for the newly added extensions

* Fix for eslint errors

* Extract pseudo context validation as a function

* Enabled tests for Native Menus in Linux

* Editor command handlers test (#13337)

* EditorCommandHandlers-test: use testToggleLine everywhere

* EditorCommandHandlers-test: use testToggleBlock everywhere

* Now initial query is also added to searchHistory queue

* Update CSS Code Hints Properties

Add properties
– `all`
– `caret-color`
– `hanging-punctuation`
– `scroll-behavior`
– `tab-size`
– `user-select`.

Add values:
– `clone` and `slice` for `box-decoration-break`
– `contents` for `display`

Remove deprecated `padding-box` from `box-sizing`.

* Update CSS Code Hints pseudo-selectors

Add pseudo-classes
– `:default`
– `:dir()`
– `:focus-within`
– `:indeterminate`
– `:matches()`
– `:placeholder-shown`.

Add pseudo-element `::placeholder`.

Fix alphabetical order, space around `:`.

* Update more

Add
– `grid-template`
– `isolation`
– `mix-blend-mode`

Add `subgrid` for `display`

Reorder `background-blend-mode`

* Added test

* Fix :matches(), add :fullscreen

* Added check for length of dependencies also in npm-installer.js

* Translated English to Japanese Comments (#13327)

* Change parseInt to parseFloat everywhere where calculating box-model visualization to prevent glitches (#13353)

* Fixed Project Manager failing tests

* Brackets 1.10 Pre-release 2

* Fix box model regression (transform) (#13357)

* Various additions and changes to Swedish interface strings (#13404)

* Mixed changes and additions to Swedish interface strings

* One addition and one fix

* More additions and changes

* Correct one word in sv/strings.js

* Externalize Live preview hightlight settings string

* ALF Automation (#13293)

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Fix root strings (#13435)

* ALF Automation (#13434)

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Change in UUID fetching for first launches (#13419)

* Fixing Mac compilation errors

* Removing console message

* Fixing linter errors in this file.

* Add option for first highlight index in Quick Open and Search History (#13444)

* Fixed #13437

* minor change

* Passed first highlight index as paramater to QuickSearchField

* Added jsdocs

* Changed WebPlatform License to MDN License and respective strings

* Use the correct border color in multifile Replace in Files bar with dark theme

* Updated by ALF automation. (#13454)

* In writeJSON (grunt), use CRLF on Windows (#13458)

* Fixes translation error in Simplified Chinese

Fixes /issues/13416

* Enable no-redeclare to eslint (#13452)

* Added strings for translation for 1.10 Release

* minor change

* Add navigation strings.

* Updated some strings

* ALF Automation (#13471)

* Updated by ALF automation.

* Updated by ALF automation.

* Added some more translations

* Saurabh95/encoding support (#13412)

* Now encoding is passed as parameter on file read and it is used by writefile in order to preserve encoding

* UI wiring

* Code Cleanup

* Fixed failing tests

* Added warning Dialog while changing encoding

* Added some Linux specific changes

* Fixed some linting errors

* Reverted last commit

* Minor changes

* Now selected encoding is stored in state

* Fixed lint error

* Added some more encodings

* Added some more encodings

* Fixed lint errors

* Removed duplicate encodings

* Fixed failing tests

* Used externalized strings

* Addressed review comments

* Added supported encodings file

* Addressed review comments

* Addressed review comments

* More Robust UUID Handling (#13476)

* More efficient UUID Handling: We need to backing up existing uuid so that we can accurately get the new user count, as the uuid is changed now and will effect the existing users as well. Also added robust checking for shell API availability before calling the shell API and if not present handling olderUUID in a different way.

* Addressed review comments.

* Now BOM is preserved for UTF-8 files (#13477)

* Now BOM is preserved for UTF-8 files

* Added error strings for failure in encode/decode and utf-16

* Removed utf-16 from encodings list

* Addressed review comments

* fix JP translation in comment tags (#13363)

* New File and New Folder execute in project root if there's no selection (#12752)

* New File and New Folder execute in project root if there's no selection

* Add ProjectManager.getSelectedFileTreeItem

* Add function to get file tree context instead

* Polish translation update for brackets 1.10 (#13398)

* Polish translation update for brackets 1.10

* Corrected some strings in pl translation

* Added basic translation for core preferences section

* Transform some polish strings in core preferences section

* German translation (#13436)

* zh-cn (#13473)

* Update urls.js

* Create Getting Started

* Delete Getting Started

* Create index.html

* Create main.css

* Add files via upload

quick-edit.png

* Problems panel: add an icon per problem to tell which type it is (#13430)

* Sequential navigation in edit history (#13418)

* First commit - sequential navigation in edit history

* Fix lint errors

* Handle undefined history entries

* Added comments and some additional edge case handling

* Update code review comments

* Put a max navigation frame capture limit and control overflow once reached. Fix all bugs found in unit testing.

* Fix indentation issues

* Change spaces to tabs for indentation

* Fix mixed tabs and spaces

* Convert spaces to tab

* resolve mixed tabs and spaces

* Initialize variables

* Handle external file changes and discard stale frames

* Additional checks to validate the navigation frames

* Address review comments

* pre release build 3

* Fixed JS lint error (#13489)

* Fix NavigationProvider throwing errors when doc.file is missing. Fixes #13491 (#13492)

Signed-off-by: petetnt <[email protected]>

* ALF Automation (#13474)

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Updated by ALF automation.

* Adding extra check to handle null mrof list entries (#13495)

* After changing encoding of a dirty file if user cancels the popup then encoding of file should not be changed (#13497)

* After changing encoding of a dirty file if user cancels the popup then encoding of file should not be changed

* Removed popup for dirty file encoding change

* Now doc is reloaded if the path of the file being saved is same
@swmitra swmitra added this to the Release 1.10 milestone Jul 6, 2017
@schroef
Copy link

schroef commented Jul 8, 2017

Just downloaded the revision, but alt+i shows me this character ˆ??

OSX 10.11.6
Brackets 1.10

@petetnt
Copy link
Collaborator

petetnt commented Jul 9, 2017

Hi @schroef,

the OSX shortcuts were improved / fixed in #13527, which didn't land to 1.10. You can change your shortcuts to match the ones in 13527 from Debug -> Show User Key Map and adding the following:

{
    "documentation": "https://github.com/adobe/brackets/wiki/User-Key-Bindings",
    "overrides": {
        "Cmd-Alt-Left": "navigation.jump.back",
        "Cmd-Alt-Right": "navigation.jump.fwd".
    }
}

@schroef
Copy link

schroef commented Jul 9, 2017

Sorry but that doesnt do anything as well. Looking at that code, shouldn't that also be visible then in the navigation menu, if so it's not there in 1.10

screen shot 2017-07-08 at 9 39 11 pm

@schroef
Copy link

schroef commented Jul 9, 2017

Seems shortcuts work not normally like in other applications. I need to pres cmd+alt+ left or right in a sequence in order to let it do something. I seem to be able to jump through documents. It doesnt always jump back to the complete history of it locations though

@swmitra
Copy link
Collaborator Author

swmitra commented Jul 9, 2017

@schroef Brackets have a slightly different implementation for navigation. We don't remember all the positions rather only explicit positions. For example when you do mouse click at a position and pause for a brief moment to read something, do a jump to def or switch file to work on some other context.

@swmitra
Copy link
Collaborator Author

swmitra commented Jul 9, 2017

We are going to change the OSX shorcuts and provide a small UI place holder as well in the next pre release ( within a week's time!)

@schroef
Copy link

schroef commented Jul 9, 2017

Well it doesnt store all the position i think. I've tried it couple times and sometimes is seems to work and sometimes not. I definitely dont see that history of 30 states.

Copy link

@utkarshmehta utkarshmehta left a comment

Choose a reason for hiding this comment

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

a

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

Successfully merging this pull request may close these issues.

None yet

8 participants