Coder Social home page Coder Social logo

brackets-ruler's People

Contributors

lkcampbell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

brackets-ruler's Issues

Launching Brackets with empty editor messes up tick mark spacing

Repro Steps

  1. Open Brackets, open any document, and increase font to a very big size
  2. Close all documents.
  3. Reload brackets. Note that the tick marks for the empty screen are now smaller.
  4. Open any document.

Expected behavior:
Ruler is lined up properly with document columns

Observed behavior:
Ruler is misaligned. Tick mark spacing is too narrow.

word wrap at guide

Hi,

Would it be possible to somehow get the text to wrap at the guide width and still have the editor at full-screen?

Can't scroll to bottom of file when Word Wrap is on

Steps to Repro

  1. Launch Brackets, and make sure Word Wrap is on
  2. Open the index.html file from the Getting Started project
  3. Make your window narrow enough so many lines wrap
  4. Try to scroll to the bottom of the file

Results
Can't scroll to the bottom of the file.

When there is no open document ruler should be hidden

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 8653151b1)

Repro Steps:

  1. Toggle on the ruler
  2. Close all documents in Brackets

Expected Behavior:
Ruler is hidden. It serves no purpose when there is no open document.

Observed Behavior:
Ruler is shown

Remove shortcut keys

The Ctrl+Alt+R shortcut key is going to eventually conflict with:

adobe/brackets#4546

which is the pull request to add Recent Project Navigation.

Need to remove the shortcut keys since people rarely have to toggle the ruler and guide on or off on a frequent basis.

Column Guide is drawn over Brackets Toolbar

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)

Repro Steps:

  1. Open Brackets and set column guide to column 80.
  2. Resize the editor until the Brackets Toolbar overlaps with the column guide.

Observed Behavior:
The column guide is drawn over the toolbar

Expected Behavior:
The toolbar is drawn over the column guide.

Single click on the ruler should toggle guide on and off

Repro Steps:

  1. Toggle on ruler
  2. Toggle on column guide
  3. Click on ruler at column where guide is set

Expected Result:
Column guide toggles off or on every time you click it.

Observed Result:
Column guide stays on no matter how many times you click it.

Additional Notes:
This worked before. Must have broke it when putting in the click and drag event for the ruler.

Last number shifts left when resizing windows

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 8653151b1)

Repro steps:

  1. Horizontally resize the window so that the last (i.e. highest) number on the ruler can be seen.
  2. Slowly horizontally resize the window until the edge is right next to the last number

Expected Behavior:
Last number stays in the same place throughout any horizontal resizing.

Observed Behavior:
Last number shifts one pixel left as the window edge gets close to it.

Update preferences code for Sprint 37

OS: Mac OSX Mavericks

Brackets Version: sprint 37 development build 0.37.0-0 (master 715589c46)

Extension Version: 1.1.8

Repro Steps:

  1. Launch Brackets with Column Ruler extension installed.
  2. Open Dev Tools and review console

Expected Results:
No errors or warnings for the Column Ruler extension

Observed Results:
Several Preferences deprecation warning about Column Ruler extension.

Won't install

I've tried installing with all three methods. I'm on build 1.3.0-16022.
capture

ruler isn't scaling correctly

I've disabled all extensions except for brackets-ruler. I've reset the theme to the Brackets default. No matter what, the ruler isn't scaled correctly.

The guide displays in the proper place relative to my guidePosition setting, but relative to the ruler, it appears to be in the wrong place. For every 10 columns of actual real estate, the ruler thinks it's 9 columns. So, when I have guidePosition set to 80, the guide appears to be at 72, relative to the ruler.

I'm on ...

  • Release 1.1 build 1.1.0-15558 (release ea908cae5)
  • Windows 7
  • brackets-themes.fontType: "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace"

ruler

Console error about ruler when starting up Brackets

Repro Steps:

  1. Start up Brackets with ruler extension installed.
  2. Open Dev Tools console.

Observed Result:
Error logged in console: "Uncaught TypeError: Cannot call method 'is' of null "

Expected Result:
No ruler errors logged in console.

Feature request: ruler context menu

Right now if you right-click in the ruler, it interprets it the same as a click and moves the guide line.

It'd be nice if I could right-click in the ruler and get a context menu with options to hide the ruler and hide the guide line.

In any case, I didn't expect it to move the guide line when I right-clicked in the ruler.

Shouldn't be able to see or toggle column guide when there is no document

Repro Steps:

  1. Toggle Column Guide on.
  2. Close all documents and observe behavior.
  3. Toggle column guide on and off, and observe behavior.

Observed Behavior:
Column Guide can be seen, and toggled on and off when there is no document open.

Expected Behavior:
Column Guide is not shown and cannot be toggled when there is no document open.

Console error when clicking to the left of the zero tick mark

Repro Steps:

  1. Click a little bit to the left of the zero mark while watching the console log.
  2. Continue moving slowly to the left as you keep clicking, still watching the console log.

Observed Results:
Eventually, you will hit a "dead" spot on the ruler where the clicks start producing the following error in the console log:
Uncaught TypeError: Cannot read property '1' of null

Expected Results:
Nothing should show up in the console log no matter where you click on it.

Additional notes:
This happens on the right edge of the ruler as well.

Window repaint problem on horizontal resize over column guide

OS: Windows 7

Build: sprint 28 development build 0.28.0-0 (master )

Repro Steps:

  1. Open an empty document in Brackets
  2. Turn on Column Guide and set it to 80.
  3. Horizontally resize editor smaller until the right tool bar is just over the column guide.
  4. Slowly resize the editor horizontally bigger until the column guide reappears.

Observed Behavior:
A white rectangular section flickers briefly over the entire screen, sometimes leaving white spaces on the side bar and the tool bar.

Expected Behavior:
No white rectangular flicker, no repaint problems.

Other Notes:
This is a problem recently introduced in the last dev build. I don't see the problem in Sprint 27.

Major tick marks are missing for ticks end in 5

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 8653151b1)

Repro steps:

  1. Open a Brackets document that has a max line length of 80 or less columns
  2. Add some text to the longest line so it has between 80-90 columns, exclusive.
  3. Observe the new section of the ruler that appears

Expected Result:
There is a major tick mark (i.e. white instead of gray) at the 95th tick mark.

Observed Result:
There is a minor tick mark (i.e. gray instead of white) at the 95th tick mark.

Ruler disappears when jumping to a different project

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)

Repro Steps:

  1. Open a project and a document in Brackets, and toggle the ruler on.
  2. Jump to a different project.

Observed Results:
The ruler is hidden. The menu item is still checked, indicating the ruler should be shown.

Expected Results:
The ruler is shown.

Column guide z-index not correct on toggle line numbers and change themes

OS: Windows 7

Build: sprint 28 development build 0.28.0-0 (master 97b957e80)

Repro Steps:

  1. Select a Brackets document that is big enough to have both horizontal and vertical scroll bars.
  2. Turn on column guide, turn off word wrap, and turn on line numbers.
  3. Install Miguel's Themes extension and select Monkai Dark Soda.
  4. Horizontally scroll the document so the column guide is just behind the vertical scroll bar.
  5. Toggle line numbers off and on.
  6. Change to Default theme, then back again.

Expected Results:
Column guide should be visible when it is automatically moved into the editor viewer and not visible when it is automatically moved behind the vertical scroll bar.

Observed Results:
Column guide stays hidden the whole time.

Rulers don't work in splitview

Hey Lance,
I tested your Column Ruler extension with splitview (Jeff/Splitview-factory) and it doesn't work as designed.

  1. primary ruler extends over secondary view
  2. no ruler for secondary view

You can test with the jeff/splitview-factory branch

Guide is drawn on top of text

If you move your mouse over the guide, the cursor turns into an arrow (ie, not the text vertical bar cursor). Clicking does not change the selection. Clicking and dragging does not move the guide.

Ubuntu 13.10

Issues with the Preference Manager

setValue is called to set preference 'guideEnabled,' use PreferencesManager.set instead.

It seems you are using this several times. I see there is one more error on first load
there is case when the $tickMark is undefined

        tickPosX    = $tickMark.position().left;
        tickWidth   = $tickMark.width();

breaks, I have replaced with

        tickPosX    = $tickMark.length!=0 ? $tickMark.position().left : 800;
        tickWidth   = $tickMark.length!=0 ? $tickMark.width() : 0;

saw that inthe debug console of brackets. I don't know how the preferences should be managed but maybe you need to update some your code

Ruler length does not resize when word wrap is on

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 8653151b1)

Repro Steps:

  1. Turn on word wrap
  2. Open documents of various maximum column lengths and observe ruler length
  3. Turn off word wrap
  4. Open documents of various maximum column lengths and observe ruler length

Expected Results:
The ruler lengths at step 2 and step 4 are the same.

Observed Results:
The ruler lengths at step 2 and step 4 are often different.

Guide height wrong when resizing editor height

OS: Windows 7

Build: sprint 27 development build 0.27.0-0 (master dd6bdc9a4)

Repro steps:

  1. Create a new document, turn off word wrap, and set column guide to 80.
  2. Add a text line that spans the width of the editor.
  3. Resize the editor width so you are just before the point where the horizontal scroll bar for the view appears. The width of the text line should be approximate the same as the width of the editor view.
  4. Decrease the editor height by resizing the Brackets window.

Expected result:
Column guide should continually span the entire height of the editor window as the editor is resized.

Observed result:
Column guide is too short and does not span the entire height of the editor window. This problem is either constant or flickers back and forth between the correct and incorrect height, depending on how close the right edge of the text line is to the right side of the editor window.

Edit Update 6/22/13: Update Build and rewrote repro steps to make this bug easier to repro

Multiple guides

Having multiple guides would be helpful.
I try to use Brackets in almost all web projects now. But not in all projects we have set the line length to 80 columns in our dev guides.

I suggest an array of guides like it is in Sublime Text 2/3

I don't know if its a good idea to allow different styles per guide or if all guides should use same style, color and thickness.

Launching Brackets with ruler enabled makes status bar disappear

OS: Windows 7

Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)

Repro Steps:

  1. Launch Brackets and toggle the Ruler on.
  2. Reload Brackets

Observed Results:
The status bar is missing until the editor is resized manually.

Expected Results:
The status bar is visible.

Column Guide is drawn over Side Panel

OS: Windows 7

Build: sprint 26 development build 0.26.0-0 (master adda76c23)

Repro Steps:

  1. Show the side panel.
  2. Make sure there is enough text to scroll to the right
  3. Set column guide to column 0.
  4. Scroll to the right.

Observed Behavior:
The column guide is drawn over the side panel.

Expected Behavior:
The side panel is drawn over the column guide.

Console error when dragging ruler guide

OS: Mac OSX Mavericks

Brackets Version: Release 1.1 development build 1.1.0-0 (master 4bfed93b8)

Extension Version: 2.3.5

Repro Steps:

  1. Click and drag along the ruler to reset the column guide
  2. Move off the ruler, still dragging
  3. Move back onto the ruler, still dragging

Observed Results:
Console error in Dev Tools:
Uncaught TypeError: Cannot read property 'which' of undefined main.js:192

Expected Results:
No console error

Showing ruler when cursor is on last line of word wrapped doc bumps cursor down too far

OS: Windows 7

Brackets Build: sprint 26 development build 0.26.0-0 (master 22192c9e7)

Repro Steps:

  1. Toggle ruler off
  2. Copy this gist into an empty Brackets document and add one extra newline so there are 14 lines.
  3. Turn on word wrap
  4. Put the cursor on the empty line 14.
  5. Toggle ruler on

Expected results:
Ruler shows and cursor stays on line 14.

Observed results:
Ruler shows and cursor bumps down to an undefined line just below line 14.

Improve typing performance with word wrapped documents

Repro:
Create a fairly long brackets text file and word wrap it. As the word wrapped lines get longer and longer, the ruler gets longer as well. When it get up to 1000 columns long, the typing performance is sluggish. Removing the word wrap makes the type speed faster.

Expected behavior: The typing performance should stay the same whether the document is word wrapped or not.

Proposed solution: In the current code base, the ruler length is based on the longest line length in the document. When word wrap is on, the ruler length should be based on the width of the main editor frame. This will fix this problem in three ways:

First, the ruler will be shorter, which will make the code that updates the ruler length perform better.

Second, the ruler length will be updated on editor resize instead of text change, taking the pressure off of the typing.

Third, I can get rid of the weird word wrap flip workaround I had to use because CodeMirror doesn't define the longest line length in word wrap mode. This workaround is the most likely culprit for the performance problems.

Other Notes:
The fix for this issue depends upon the merging of pull request #4152.

Ruler left scroll is off by one pixel with 80's Baby Theme

OS: Mac OSX Mavericks

Brackets Version: Release 0.44 development build 0.44.0-0 (master 7b45d825a)

Extension Version: 2.3.4

Repro Steps:

  1. Load and select 80's Baby Theme
  2. Open any file and observe the location of the ruler's zero tick mark

Observed Results:
Zero tick mark is one pixel farther left than it should be.

Expected Results:
Zero tick mark should be lined up correctly.

Other Notes:
This is just one of several Themes that exhibit this problem.

API change coming in Brackets 37

Hi Lance,

As far as I can see, brackets-ruler is the only extension that listens for the Editor optionChange event. In Brackets 36 and lower, this event exposes the CodeMirror names for the options. Starting with Brackets 37, I'd like to make it expose the Brackets preference names for the sake of consistency.

The current bit of code in your extension is:

        if (option === "lineNumbers") {
            _updateRulerScroll();
            _updateGuideVisibility();
        } else if (option === "lineWrapping") {
            _updateRulerLength();
            _updateGuideHeight();
        }

I think it just needs to become:

        if (option === "showLineNumbers" || option === "lineNumbers") {
            _updateRulerScroll();
            _updateGuideVisibility();
        } else if (option === "wordWrap" || option === "lineWrapping") {
            _updateRulerLength();
            _updateGuideHeight();
        }

and your extension will be backwards and forward compatible. Does that seem reasonable?

Unit test failures

OS: Mac OSX Mavericks

Brackets Version: Release 0.44 development build 0.44.0-0 (master 27e6c5abb)

Extension Version: 2.3.3

Repro Steps:

  1. Run the Column Ruler Jasmine Unit Tests

Expected Results:
All unit tests pass.

Observed Results:
Four failures.

Ruler scrolling misaligned after new line changes gutter size

OS: Windows 7

Brackets Build: sprint 26 development build 0.26.0-0 (master 69198e6bb)

Repro Steps:

  1. Open a blank document.
  2. Add 9999 blank lines. Observe ruler is aligned with gutter edge.
  3. Add 10,000th blank line, and observe the gutter and the ruler

Observed Behavior:
The gutter gets wider but the ruler does not align with the gutter.

Expected Behavior:
The gutter gets wider and the ruler aligns with the gutter.

Gutter Width Unit Test Failure

OS: Mac OSX Mavericks

Brackets Version: Release 1.3 development build 1.3.0-0 (master 49553b361)

Extension Version: 2.3.7

Repro Steps:

  1. Run the Column Ruler Jasmine Unit Tests

Expected Results:
All unit tests pass.

Observed Results:
One failure on should EQUAL Editor Scroll after CHANGING Gutter Width test.

Add Key Mapping Documentation

Add in documentation on the command ids for the extension and examples of how to add shortcut keys for those commands.

Ruler does not realign itself when toggling line numbers

Repro Steps:

  1. Launch Brackets and Toggle Ruler on.
  2. Toggle the Line Numbers in the View Menu
  3. Observe ruler behavior

Observed Result:
The ruler does not realign itself properly to the left when the number gutter appears or disappears.

Expected Result:
The ruler realigns itself properly to the left each time the line numbers are toggled.

Other Notes:
The fix for this issue depends upon the merging of pull request #4152.

Themeable guides.

I'd like to theme the properties of the guide with CSS, if possible. Right now it looks like most of the style is being added with JavaScript instead of CSS.

Wrong settings when launching Brackets

If I ever enable the Column Guide or Column Ruler options, the ruler is always visible on subsequent launches of Brackets. The ruler is visible even if I have it disabled on the View menu. If I have the Column Guide option enabled it is not visible during launch.

Note that this only happens on the first file automatically opened by Brackets during launch. If I then proceed to open another file, the view options are respected and both the ruler and the guide follow what's set in the View menu.

Brackets Sprint 36, Ubuntu 13.10.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.