Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tabs in the UI #57

Closed
rtsuk opened this issue May 4, 2016 · 5 comments · Fixed by #172
Closed

Implement tabs in the UI #57

rtsuk opened this issue May 4, 2016 · 5 comments · Fixed by #172

Comments

@rtsuk
Copy link
Contributor

rtsuk commented May 4, 2016

I've started work on this. The plan is to use an NSSegmentedControl to display the tabs and an NSTabView to hold one EditView per tab.

@wezm
Copy link

wezm commented May 4, 2016

Maybe consider MMTabView as well.

@rtsuk
Copy link
Contributor Author

rtsuk commented May 4, 2016

It looks good but I will have to check with @raphlinus on whether he wants to use something like that here.

@raphlinus
Copy link
Member

MMTabView looks really nice. I especially like the tear-off tab functionality, as I use that all the time. The license is compatible, and it looks like it would be quite a bit of work to duplicate what it already provides.

I don't think there's any good way to declare a reference to it and have Xcode resolve it the way that gradle or cargo would (correct me if I'm wrong), so probably the best way to get this dependency added is to copy it in under a third_party directory.

Some very minor polish issues: the "dirty" close buttons are lacking @2x (retina) PNGs, and some of the tab-reorder animations could be a little smoother. I'm sure both can be readily patched.

@rtsuk
Copy link
Contributor Author

rtsuk commented May 4, 2016

There's CocoaPods, but I don't think MMTabView is hosted there and I've never used CocoaPods.

I will experiment with MMTabView. Thanks @wezm!

raphlinus added a commit that referenced this issue Jul 24, 2016
Currently, each tab gets its own window. Opening a file replaces the
main window if it's empty, otherwise creates a new window. The
newDocument command is wired (and always creates a new window).

Also sets window title to last component of filename.

Progress towards #57.

Closes #15.
@raphlinus
Copy link
Member

So Sierra is out and has tabs built in. Things work to some extent without any code changes, although windows open by default to new windows, so getting to tabs is not very discoverable (there's a "Merge All Windows" added to the Window method).

I think the app delegate needs to implement newWindowForTab to get the "+" button, but that's easy enough.

Should the app window controller have its tabbing mode set to preferred? That would more or less match the Sublime behavior, but I'm not sure it follows the macOS recommendations. Also, I'm not sure how easy it will be to get a side bar (see #78) with tabs.

lord pushed a commit to lord/xi-editor that referenced this issue Oct 31, 2018
Currently, each tab gets its own window. Opening a file replaces the
main window if it's empty, otherwise creates a new window. The
newDocument command is wired (and always creates a new window).

Also sets window title to last component of filename.

Progress towards xi-editor#57.

Closes xi-editor#15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants