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

Update Inspector Sidebar #1334

Merged
merged 7 commits into from
Jun 20, 2023

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jun 19, 2023

Description

  • Removed all placeholder UI from the inspector sidebar:
    • The "Quick Help" menu
    • Unused settings and preferences
    • Unused and confusing file type menu with carbon copy Xcode options.
  • Filled in features in the file inspector:
    • Added ability to override file language (this PR also updates CETV, so it also incorporates Shebang & Modeline detection)
    • Renaming & Moving files works, and both open the correct tab and update necessary inspector UI to match
  • Connect text settings in file inspector to the real settings data structure
    • Created two new views: IndentOptionView and TabWidthOptionView.
    • Both views replace existing UI in Settings and the inspector.
  • Make inspector tabs permanent, keeping user selection when no tab is selected.

This PR removes the "Quick Help" menu. Currently, it doesn't perform any function and only serves to confuse users. It can be added back in the future when CodeEdit has some kind of in-app help functionality/user manual.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2023-06-18.at.11.52.28.PM.mov

@Wouter01 Wouter01 self-requested a review June 19, 2023 12:10
Copy link
Member

@Wouter01 Wouter01 left a comment

Choose a reason for hiding this comment

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

It looks like the syntax highlighting doesn't work when I switch file types. If I switch to another file and go back it seems to work. Is this intended?

Screen.Recording.2023-06-19.at.14.10.13.mov

@thecoolwinter
Copy link
Collaborator Author

Ah this is a CETV bug. I've opened a PR for that on that repository.

@thecoolwinter thecoolwinter changed the title Fix/inspector sidebar Update Inspector Sidebar Jun 19, 2023
@austincondiff
Copy link
Collaborator

austincondiff commented Jun 19, 2023

The file inspector is not meant to change the app Settings but changes these on a per-file basis.

@thecoolwinter
Copy link
Collaborator Author

The file inspector is not meant to change the app Settings but changes these on a per-file basis.

I'll change that 👍

0xWDG
0xWDG previously approved these changes Jun 19, 2023
Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

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

LGTM, works well. agree that #1334 (comment) should be done before merging :)

@austincondiff
Copy link
Collaborator

A few other things that I might mention before this is merged:

  • because it is per-file, this is why it reads "Indent using" instead of "Prefer indent using" as in the app Setting.
  • I prefer the widths being grouped together as it was before
  • In "Wrap lines to editor width" drop "to editor width" so it simply reads "Wrap lines" like it was before, as it is implied and labels should be short as possible for the inspector
  • We should be able to change text encoding and line endings for the file in question, were these removed because they are not yet implemented?

- Rename wrap lines setting
- Group tab and indent widths
- Add picker back for indent type menu
@thecoolwinter
Copy link
Collaborator Author

Yes the encoding options were removed because they haven't been implemented yet. I've made the changes you mentioned. Demo below:

Screen.Recording.2023-06-19.at.11.56.07.PM.mov

0xWDG
0xWDG previously approved these changes Jun 20, 2023
@austincondiff
Copy link
Collaborator

austincondiff commented Jun 20, 2023

Looks good! I wonder how the file inspector would go back to following the preferred settings after making a change. I'd imagine setting it back to the preferred setting might do this. I wonder what should happen if I set the preferred setting to match the file inspectors. Any thoughts? (this can wait for another PR)

Also, please resolve the merge conflicts. 🙂 When you do I can approve.

@thecoolwinter
Copy link
Collaborator Author

thecoolwinter commented Jun 20, 2023

@austincondiff That's exactly how it works already. If the inspector's setting is set to the same value as the global setting, the override is set to nil. I tried to demo that in my video. Towards the end you can see me change some preferences in the inspector, then change the global settings and the inspector only follows the unmodified ones.

@thecoolwinter
Copy link
Collaborator Author

thecoolwinter commented Jun 20, 2023

I'm not seeing any merge conflicts on my side either. I see them now, Github wasn't updating. Updating that now.

@Wouter01 Wouter01 self-requested a review June 20, 2023 16:48
@austincondiff austincondiff merged commit 6f39159 into CodeEditApp:main Jun 20, 2023
@austincondiff
Copy link
Collaborator

Nice work @thecoolwinter!

@thecoolwinter thecoolwinter deleted the fix/inspector-sidebar branch June 20, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment