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

URL formatting when wrapping lines can be better #1604

Closed
redmunds opened this issue Sep 9, 2012 · 5 comments
Closed

URL formatting when wrapping lines can be better #1604

redmunds opened this issue Sep 9, 2012 · 5 comments

Comments

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2012

This issue was split from #1565. This applies to the Quick Open list, Find in Files Results, any error dialog that displays a URL, and maybe more places.

When displaying URLs, the default way that they wrap is terrible. Basically, lines are only broken on hyphens and spaces. Possible solutions:

(a) breaking on any character using this technique: http://perishablepress.com/wrapping-content/

(b) make it break on path separators (but still not break on any/all chars) which might be relatively easy if we can just inject "zero-width space" chars or some such in the display string... e.g. http://stackoverflow.com/questions/2046530/whats-the-opposite-of-a-nbsp

(c) some form of smart truncation (some native apps preserve the start & end of the path, but replace the middle with ellipses).

@ghost ghost assigned redmunds Sep 12, 2012
@pthiess
Copy link
Contributor

pthiess commented Sep 12, 2012

Reviewed - @redmunds - Randy this may be a starter bug, please review.

@redmunds
Copy link
Contributor Author

Yes, I agree that this would make a good starter bug.

@JakeStoeffler
Copy link
Contributor

@redmunds @pthiess - I'm new to Brackets and I'm considering taking this one. Solutions (a) and (b) seemed simple so I gave them a shot. Here's what the Quick Open list looks like with solution (a) and solution (b). Option (c) is going to be a bit trickier, but personally I prefer to see the whole file path so I'm thinking (a) or (b) might be better. What do you guys think?

@redmunds
Copy link
Contributor Author

redmunds commented Oct 6, 2012

@JakeStoeffler - Thanks for taking this on! @pthiess, @peterflynn, and I all prefer option (b). Please submit a pull request.

I'd also like to note that there are other places in the UI where we'd also like to have this functionality. For example, edit a file, then close it without saving, and you'll get a dialog about the unsaved changes with the full url to the file displayed in that dialog. So, try to make the solution as generic as possible.

JakeStoeffler added a commit to JakeStoeffler/brackets that referenced this issue Oct 7, 2012
@redmunds
Copy link
Contributor Author

redmunds commented Oct 7, 2012

Fixed. Closing.

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

No branches or pull requests

3 participants