Jintin / Swimat

An Xcode formatter plug-in to format your swift code.
https://jintin.github.io/Swimat/
MIT License
1.65k stars 89 forks source link

Regarding the UI changes #154

Closed saagarjha closed 7 years ago

saagarjha commented 7 years ago

I've noticed you've updated the UI, and I had a couple of suggestions:

  1. The new font is monospaced–I'm not convinced this is the best choice. The text is not code, so there's no point in changing the font (which IMHO makes it look uglier). If you were trying to get the list to align properly, there are better ways of doing this (without the many constraints I created).
  2. The background color is gray. I quite liked the white; any reason for the change?
  3. The "Configure" tab can be moved to Swimat > Preferences, which is currently unused.
  4. Make the configuration text field editable, so users can see the effects of their preferences on their own code.
  5. In accordance with the last point, bring back the File and Edit menus for text editing/window management.

In essence, I'm asking if I can revert the UI to dfa2c98884953f57abbc152c8ac2612a4db319cb and then selectively apply the changes you've made. What do you think; is it worth a shot?

Jintin commented 7 years ago

I think you can try a shot if you want.

  1. Sure if you can help the align.
  2. You can pick white.
  3. We didn't have lot function now, I'd better like it in one window.
  4. Sure, it's what I wanted to.
  5. Sure.
PMExtra commented 7 years ago
  1. We didn't have lot function now, I'd better like it in one window.

我也同意放在一個窗口中,Swimat本身就只是一個Xcode插件,目前在app中並沒有可以獨立使用的功能,因此app本身就應該是插件的配置器,而不需要啟動了app再啟動Preference。

saagarjha commented 7 years ago

@Jintin I'm running into issues getting the preview and options to fit in the window. I'm thinking we could have a button that opens just the preview. Any thoughts on how to organize it?

Jintin commented 7 years ago

@saagarjha What issue you face exactly? Maybe we can solve it together.

saagarjha commented 7 years ago

The issue is that the main window is too small to contain a bunch of settings as well as a text view with code.

Jintin commented 7 years ago

Maybe you can try enlarge the window, or make the text area scrollable?

saagarjha commented 7 years ago

I've moved the preview to another window, but I've kept the options in the main window. The preview, being two text areas, was just too large to fit in the main window without making it look too big.

I have a quick question: is Swimat fast enough to format a file in real time (i.e. as the user types), or should I make this a user-initiated action?

Jintin commented 7 years ago

It's fast enough. if it doesn't we should keep improve it. And have you tried the scroll view yet? I think there is no need to fix the window size, maybe someday we can try a more flexible layout.

saagarjha commented 7 years ago

It's fast enough. if it doesn't we should keep improve it.

Alright, I'll take a look at the core parser code after I finish the UI changes. I'll move the formatting to a background queue and rate limit it in the meantime.

I think there is no need to fix the window size, maybe someday we can try a more flexible layout.

Yes, I'm using a resizable window, but I feel that 800x600 is the bare minimum for editing. Let me just polish my work and I'll submit a pull request for you to take a look at.

And have you tried the scroll view yet?

I'm actually using an NSTabView for the instructions/options and an NSSplitView for the preview. I'll push it soon, you can take a look at it then.

saagarjha commented 7 years ago

@Jintin Please take a look at #157.

Jintin commented 7 years ago

merged