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

🚀 Addons enhancement & file association #17

Merged
merged 9 commits into from Jan 30, 2024

Conversation

ItsTheSky
Copy link
Collaborator

@ItsTheSky ItsTheSky commented Jan 18, 2024

Overview

Addon enhancement

Each addon can now provide MenuItems (implementing a method in IAddon) to be added in the Addons tab of SkEditor. This will make addon's implementations much easier, and not rely on SkEditor's tabs order. They can also register FileAssociation, which is explained just below :)

File association

When opening a file, SkEditor will now check the registered FileAssociation to open the desired file correctly. Multiple associations can be available for the same extension (e.g. coming from an Addon), and for now SkEditor will just try each of them and use the first "correct" one.

Various modifications

  • Added way to enable/disable the footer (bottom bar) as we wish, as to disable it with file types such as images
  • Registered a simple Image viewer as the default available association. More will come in this PR!

Tasks

  • File association core features
  • Addon's tabs registering
  • Addons can register their File association
  • Provide a prompt to let the user choose and configure the desired file association
  • File Type: Image (png, jpg, webp, bmp, ico, svg, tiff)

@ItsTheSky ItsTheSky changed the title 🚀 First push of addons enhancement & file type support 🚀 Addons enhancement & file association Jan 18, 2024
@NotroDev
Copy link
Member

It seems that images can't be opened from a directory that contains special characters, for example Polish Zdjęcia.
You probably need to use Uri.UnescapeDataString(string) in some place

@ItsTheSky ItsTheSky marked this pull request as ready for review January 20, 2024 19:07
@ItsTheSky
Copy link
Collaborator Author

The new commit adds a warning for binaries file (or any files that are not meant to be openable via a text editor, e.g. containing non-UTF8 chars) with localization.

I added that mainly for projects (thus I hope this PR will be merge soon) as we can open a lot of files directly into SkEditor now.

@ItsTheSky ItsTheSky merged commit 5265cbe into SkEditorTeam:main Jan 30, 2024
@ItsTheSky ItsTheSky deleted the features/addons-enhancement branch February 5, 2024 12:50
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 this pull request may close these issues.

None yet

2 participants