Skip to content

Preference View - #205

Closed
underthestars-zhy wants to merge 38 commits into
CodeEditApp:mainfrom
underthestars-zhy:main
Closed

underthestars-zhy wants to merge 38 commits into
CodeEditApp:mainfrom
underthestars-zhy:main

Conversation

@underthestars-zhy

@underthestars-zhy underthestars-zhy commented Mar 23, 2022 •

Copy link
Copy Markdown

Description

  1. Preference Tab View
  2. New Tabs

Releated Issue

#146
#286

Checklist (for drafts):

  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • Review requested

Screenshots (if appropriate):

CleanShot 2022-03-29 at 20 12 23@2x

CleanShot 2022-03-29 at 20 18 59@2x

CleanShot.2022-03-23.at.21.56.32.mp4

Use keyboard change themes

CleanShot.2022-03-24.at.19.10.33.mp4

CleanShot 2022-03-26 at 14 53 44@2x

@pkasila
pkasila marked this pull request as ready for review March 23, 2022 14:27
@pkasila
pkasila marked this pull request as draft March 23, 2022 14:27
@underthestars-zhy
underthestars-zhy marked this pull request as ready for review March 24, 2022 12:46
@lukepistrol
lukepistrol requested a review from pkasila March 24, 2022 12:54
@underthestars-zhy
underthestars-zhy marked this pull request as draft March 24, 2022 22:28
@austincondiff

Copy link
Copy Markdown
Collaborator

For appearance, instead of macOS wallpaper, we need a simplified illustration of the application and code similar to this

Screen Shot 2022-03-26 at 12 36 02 PM

@austincondiff

austincondiff commented Mar 26, 2022 •

Copy link
Copy Markdown
Collaborator

I really like how Nova has done their theme selector, the thumbnails are simple and their settings react to your system appearance, very flexible. I might make thumbnails a bit smaller thought to allow for more to be seen an once.

Screen.Recording.2022-03-26.at.1.13.06.PM.mp4

@austincondiff

Copy link
Copy Markdown
Collaborator

In our theme preference pane, I would have a checkbox, a tabset, and then a "More Themes" button. In the tabset, there are three tabs - "Window", "Editor", and "Terminal". When the checkbox is clicked, A light mode and dark mode toggle appears so that users can select light mode settings and dark mode settings.

By default if their currently selected theme supports the opposite appearance mode, it is automatically chosen. For example, if there is a High Contrast theme that offers a light version and a dark version and the user is in dark mode and they select "Automatically change theme based on system appearance", High Contrast Light will automatically be used for light mode because they have previously selected High Contrast Dark while in dark mode.

@austincondiff

Copy link
Copy Markdown
Collaborator

The theme preference pane might look something like this without the left sidebar category selector...
Screen Shot 2022-03-26 at 2 46 22 PM

@underthestars-zhy

Copy link
Copy Markdown
Author

In our theme preference pane, I would have a checkbox, a tablet, and then a "More Themes" button. In the tabset, there are three tabs - "Window", "Editor", and "Terminal". When the checkbox is clicked, A light mode and dark mode toggle appears so that users can select light mode settings and dark mode settings.

By default if their currently selected theme supports the opposite appearance mode, it is automatically chosen. For example, if there is a High Contrast theme that offers a light version and a dark version and the user is in dark mode and they select "Automatically change theme based on system appearance", High Contrast Light will automatically be used for light mode because they have previously selected High Contrast Dark while in dark mode.

We don’t need a window theme tab now. We only have three window themes. If we add this tab the view will become ugly.

@underthestars-zhy

Copy link
Copy Markdown
Author

So which theme picked we choose?
The system one or nova one.
If we have a lot of themes, system one may be a good choice.

@austincondiff

Copy link
Copy Markdown
Collaborator

Something like this...

image

image

@underthestars-zhy

Copy link
Copy Markdown
Author

Something like this...

image

image

So how can people choose auto themes?

@underthestars-zhy

Copy link
Copy Markdown
Author

For appearance, instead of macOS wallpaper, we need a simplified illustration of the application and code similar to th

fixed

@austincondiff

austincondiff commented Mar 27, 2022 •

Copy link
Copy Markdown
Collaborator

So how can people choose auto themes?

You would check the “automatically change theme based on system appearance” checkbox.

If you notice, in the first mock up that check box is unchecked. When it is unchecked there is only one preview thumbnail to the right. When it is checked there are two thumbnails to the right. One for light, one for dark. When the light thumbnail is selected, you are selecting the theme below that will be applied when the system is in light mode. When the dark thumbnail is selected at the top right, the user can then select the dark theme to use when the system is in dark mode. The thumbnails at the top act as tabs to make a selection for each mode.

@austincondiff

Copy link
Copy Markdown
Collaborator

Opening a new issue for the design preference tab.

@austincondiff

Copy link
Copy Markdown
Collaborator

Appearance option thumbnails need "Light" and "Dark" labels like in macOS system preferences. Reopen behavior and icon style should instead be select menus for better clarity.

@pkasila
pkasila self-requested a review March 28, 2022 10:08

@lukepistrol lukepistrol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment in Terminal Settings is not quite right yet, also make sure all options are available and clear to understand (see review comments).

Current Main
Screen Shot 2022-03-28 at 12 10 34

This PR
Screen Shot 2022-03-28 at 12 07 42

{
"package": "Highlightr",
"repositoryURL": "https://github.com/raspu/Highlightr.git",
"repositoryURL": "https://github.com/raspu/Highlightr",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave .git

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2022-03-29 at 20 13 27@2x

It seems work well in my mac.

import FontPicker
import Preferences

struct ExecutionSettingsView: View {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why execution and not terminal ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change. Terminal part will move to the theme tab.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment in Terminal Settings is not quite right yet, also make sure all options are available and clear to understand (see review comments).

Current Main Screen Shot 2022-03-28 at 12 10 34

This PR Screen Shot 2022-03-28 at 12 07 42

CleanShot 2022-03-29 at 20 20 09@2x

Fixed

Comment thread CodeEdit/Settings/Models/PreferencesIdentifier.swift
}

Preferences.Section(title: "Terminal Color:") {
if colorScheme == .dark {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't switch on colorScheme. Normal and Light colors are used in both dark and light appearance

}
}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Reset Defaults button like on current main.

}

Preferences.Section(title: "Terminal Font:") {
Toggle(isOn: $customFont) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a separate line for switching between system and custom font. With the font picker only shown when custom is selected. like on current main

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I don't think this design will cause misunderstanding. And the content can be reduced.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having an unlabeled checkbox near a font selector will most likely lead to misunderstandings.

@lukepistrol lukepistrol added enhancement New feature or request UI This is UI related labels Mar 28, 2022
@lukepistrol lukepistrol added the clarification needed Further information is requested label Mar 29, 2022
@lukepistrol
lukepistrol marked this pull request as draft March 29, 2022 00:31
# Conflicts:
#	CodeEdit.xcodeproj/project.pbxproj
#	CodeEdit/Settings/GeneralSettingsView.swift
xinix909 pushed a commit to xinix909/CodeTransfer that referenced this pull request Sep 7, 2024
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will
be closed until separated. -->

### Description

Adds a minimum ruler width equal to 4 digits wide to reduce layout shift
while scrolling.

### Related Issues

<!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) -->
<!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123)
-->
<!--- If this PR addresses multiple issues, these issues must be related
to one other -->

* N/A, discussed a couple times in discord.

### Checklist

<!--- Add things that are not yet implemented above -->

- [x] I read and understood the [contributing
guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)
as well as the [code of
conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots

Previous:
<img width="356" alt="Screenshot 2023-07-11 at 12 28 26 PM"
src="https://github.com/CodeEditApp/CodeEditTextView/assets/35942988/469044fa-189f-41d8-83ca-367f2244fe82">

Now:
<img width="321" alt="Screenshot 2023-07-11 at 12 27 51 PM"
src="https://github.com/CodeEditApp/CodeEditTextView/assets/35942988/547dcdda-f50e-4be6-a065-7fef5b6e7cd7">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarification needed Further information is requested enhancement New feature or request UI This is UI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants