Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Unable to see whole path when creating file with very long path/name and dashes #473

Closed
adamreisnz opened this issue Jun 9, 2015 · 35 comments · Fixed by atom/atom#13764
Closed

Comments

@adamreisnz
Copy link

Try creating a new file (or duplicating/renaming one), and type a very long name into the dialog box (e.g. some/path/my-very-very-long-filename-to-test-this-issue).

You will notice that once the text reaches the end of the box, you cannot see the end of the filename anymore. Moving left/right/up/down with arrows doesn't help. Only pressing space seems to trigger the display of the end of the filename.

@mnquintana
Copy link
Contributor

Would you mind attaching a screen capture of this behavior? I can't seem to reproduce this with OS X 10.10.3 and Atom 0.208.0-c06d62e, but I want to make sure I'm looking for the right thing.

@adamreisnz
Copy link
Author

Yes, sure thing. Can you recommend a decent screen grabber? I tried Gifgrabber earlier, but it was rather obnoxious...

I'm on OS X 10.10.3 as well, but Atom 0.207.

@mnquintana
Copy link
Contributor

@AdamBuczynski You can try LICEcap (which is what I usually use)

@adamreisnz
Copy link
Author

Screengrab

As you can notice, when the filename becomes too long, without spaces/slashes, it doesn't move the view to the "right" to see where you're typing. When using spaces, it does.

@williamboman
Copy link

+1. @adambuczynski Have you solved this somehow?

@adamreisnz
Copy link
Author

Sorry no I haven't.
@mnquintana could you update the status from more info needed to bug or do you still need more information?

@williamboman
Copy link

@adambuczynski Which themes do you use? This seems to be a pretty isolated issue.

@adamreisnz
Copy link
Author

That screen cap was with the Atom Dark theme (comes bundled with Atom).

@adamreisnz
Copy link
Author

In the One Dark theme, the input box turns to multi line, which is a neat solution:

ex

Maybe the Atom Dark theme can adopt this as well. Is there a issues repository for that specific theme?

@izuzak
Copy link
Contributor

izuzak commented Jun 19, 2015

cc @simurai for 🎨 👀

@simurai
Copy link
Contributor

simurai commented Jun 20, 2015

I'm not able to reproduce it. In my case, the file name just keeps moving to the left:

new-file

Same thing with One dark.

As you can notice, when the filename becomes too long, without spaces/slashes, it doesn't move the view to the "right" to see where you're typing. When using spaces, it does.

That sounds like the text wraps to a new line. Or it behaves like a multi-line input, with only a height of one line. One dark must have some auto height. Have you tried with atom --safe to only test with core packages?

@adamreisnz
Copy link
Author

Same happening with atom --safe

ex

Could you try renaming a file with slashes in the path to see if that makes a difference?

@izuzak
Copy link
Contributor

izuzak commented Jun 20, 2015

@simurai 😮 that's strange -- I can definitely reproduce this in the latest master version of Atom (0.211.0-fc4f2a1) in safe mode on OSX 10.10.3 with the Atom Dark theme:

add

@simurai
Copy link
Contributor

simurai commented Jun 20, 2015

Haa.. me still not and I got the exact same setup as @izuzak.

new-file

And just to be sure, what syntax theme? Although I tried all of the core ones. Also retina/non-retina screen.

@izuzak
Copy link
Contributor

izuzak commented Jun 20, 2015

Ah man, now it's getting interesting :D I think I see the problem -- I see the same behavior as @simurai if I turn the Soft Wrap config setting OFF, but if I have Soft Wrap turned ON -- I see the behavior described in the issue. Do you see the same, @simurai?

(Syntax theme: Atom dark, UI theme: Atom dark)

@simurai
Copy link
Contributor

simurai commented Jun 20, 2015

Yes, that's it. Kinda makes sense now.

That's something I wondered already a few times. Wouldn't it be simpler to just use <input>s? Or what's the reason that all inputs (like here or in the settings) are full featured atom-text-editors?

@izuzak
Copy link
Contributor

izuzak commented Jun 20, 2015

Or what's the reason that all inputs (like here or in the settings) are full featured atom-text-editors?

Wish I could answer that question 😄

However, the interesting thing here is that the OneDark/OneDark theme combo behaves differently than the AtomDark/AtomDark theme combo with the Soft Wrap config setting turned ON -- OneDark/OneDark expands the textbox while the AtomDark/AtomDark doesn't. With the Soft Wrap config setting turned ON -- both theme combos have the same behavior: the textbox scrolls horizontally as you type.

@simurai
Copy link
Contributor

simurai commented Jun 20, 2015

Ya, the mini editors in the One themes don't have a fixed height and just expand if the content grows. I think it wasn't intended like this and is just a lucky side effect of making the UI resizable based on font size.

I guess we could try the same with Atom dark/light. Although other themes will still have this issue. So it might also be worth preventing soft wrap for all mini editors.. maybe not in find+replace?

@acusti
Copy link

acusti commented Jun 22, 2015

Should this issue be in a different repo? It isn’t specific to the tree view, but rather applies to any “mini” atom-text-editor. I opened a duplicate issue in atom/atom#7228, but then closed it when I realized it was a duplicate; maybe keeping it there makes more sense, considering that the behavior lives in that repo.

From my perspective, while the One theme behaviour has interesting behavior, that behavior is incidental and the best solution is to disable soft wrap on all mini atom-text-editors. They look like text inputs, so I think user expectation is that they will behave like text inputs. Looking at the TextEditor model, the ignoreInvisibles flag already has special handling (here and here) based on the @mini attribute, so extending those exceptions to include modifying the softWrapped attribute (which is also set on the DisplayBuffer) seems pretty straightforward.

I guess tests for softWrapped would then need to go in the text-editor-spec, though that spec seems pretty low level. Should they instead be part of the “when the 'mini' property is true” suite in the text-editor-component-spec?

Would it be worthwhile at the same time to extend the text editor instantiation tests to check if the constructor sets ignoreInvisibles and softWrapped based on the value of the mini attribute? And to add a separate test of the same behavior for the setMini method?

@louisgv
Copy link

louisgv commented Aug 13, 2015

Hi all,

How can I temporary fix this behavior? I need soft wrap for coding but also want the horizontal behavior for the mini path editor.

Interestingly, Softwrap was disabled but still work with markdown files:

screenshot from 2015-08-13 01 47 36

I'm using Seti UI theme and Monokai Syntax

@simurai
Copy link
Contributor

simurai commented Aug 15, 2015

@acusti They look like text inputs, so I think user expectation is that they will behave like text inputs.

I kinda agree with this. Having the input expand to multiline might work in some cases, but could also cause layout issues.

I opened a duplicate issue in atom/atom#7228, but then closed it when I realized it was a duplicate; maybe keeping it there makes more sense, considering that the behavior lives in that repo.

Yes, now that the root cause (SoftWrap) is known, it would make sense. Maybe issue atom/atom#5503 will take over. Proposal is to have <atom-text-editor>, <atom-text-area> and <atom-text-input> (current mini editor).


@louisgv Interestingly, Softwrap was disabled but still work with markdown files

Soft Wrap can be changed on a per language basis. In the settings, try to search for the language-gfm package. There you can enable/disable Soft Wrap for only Markdown files, regardless of your "global" Soft Wrap settings.

@Trudko
Copy link

Trudko commented Sep 8, 2015

+1 thanks @simurai for workaround.

@swrobel
Copy link

swrobel commented Nov 26, 2015

Using @simurai's recommended styles.less fix isn't working for me. I tested on multiple themes in Atom 1.2.4 on OS X 10.11. Is there any hope of getting this fixed soon?

@arielnoname
Copy link

naming

For the record.
Now: OSX 10.11, Atom 1.2.4
Happened to me since always.

Cheers

@matheussampaio
Copy link

I'm still having this issue, even in safe mode.

Versions

Atom : 1.8.0
Node : 6.2.2
OSX: 10.11.5

@clemsos
Copy link

clemsos commented Jul 19, 2016

Idem here on Debian with Atom 1.2.1
tooltip_161

@vekien
Copy link

vekien commented Jul 22, 2016

This is still an issue in Atom 1.8 on OSX. With the option Soft Wrap turned on the text goes to a new line. Turning off the option fixes it. @simurai Solution did not work for me (but could be the Theme).

screen shot 2016-07-22 at 13 23 16

@simurai
Copy link
Contributor

simurai commented Jul 22, 2016

@viion What's the theme you're using? It probably needs a stronger selector.

@Sam-Hoult
Copy link

Sam-Hoult commented Oct 19, 2016

I used the fix from @simurai, but added !important flags:

atom-text-editor[mini] {
  height: auto !important;
  max-height: none !important;
}

@chiangs
Copy link

chiangs commented Jan 5, 2017

@Sam-Hoult , thanks, the !important flags made the difference for me on v 1.12.9 with Seti-ui theme.

@GioLogist
Copy link

@simurai good temp fix!

Any plans on getting this incorporated directly into Atom?

@winstliu
Copy link
Contributor

winstliu commented Feb 7, 2017

atom/atom#13764

@chiangs
Copy link

chiangs commented Feb 7, 2017

feb-06-2017 21-18-10
@viion, I use advanced-open-file package and it works great with wrapping long file paths/names.

@winstliu
Copy link
Contributor

This will be fixed in Atom 1.17.0.

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

Successfully merging a pull request may close this issue.