Repository navigation
Mark Text Preference - #1003
Mark Text Preference#1003
Conversation
29728fb to
0742819
Compare
fxha
left a comment
There was a problem hiding this comment.
I did some testing but not a full code review yet and found two improvements:
- How can I add another font family to the drop-down menu (editor and code family)?
AutoSaveshould be disabled by default because it automatically format you files (or destroy your text files if it was not markdown file 😿). What do you think?
The titlebar style should only be applied to existing windows and only to new windows or after a restart because we cannot change the BrowserWindow style at runtime. Do you know why AppVeyor testing freezes since the last build for this PR?
Now give the enumeration value, do we need to add a new font? The drop-down box has the advantage that the user does not enter invalid fonts. AutoSave should be disabled by default because it automatically format you files (or destroy your text files if it was not markdown file 😿). What do you think? Ok, I'll update it. The titlebar style should only be applied to existing windows and only to new windows or after a restart because we cannot change the BrowserWindow style at runtime. Do you know why AppVeyor testing freezes since the last build for this PR? I don't know either. |
FYI we have fallback font if we should load an invalid font but we could use font-manager and patch the library to work with Electron 5. I'll cancel all AppVeyor builds because they will all freeze and get cancelled after 1 hour and try to reproduce the issue on Windows. Seem as the XSS tests fail on Windows. |
it's great! |
|
@Jocs I added the custom titlebar but I don't know what the difference between BrowserWindow |
|
I tried focus on macOs and it didn't work. I changed it to moveTop. Electron don't have this method on Linux, it shouldn't matter. Will it report an error? If you get an error, add a judgment(if (!isLinux) {}). In the control buttons of macOs, maximization and minimization are disabled, and the setting window is only allowed to close. |
|
There are two exceptions during window loading on Windows: 1. 2. Mark Text exception and the BrowserWindow is crashed due this exception: Edit: |
fxha
left a comment
There was a problem hiding this comment.
I found the one or the other typo.
is it also because the path separator? |
|
@fxha I add a setting window menu, it also the fallback menu. pls review. |
|
@Jocs Did you have change the GUI settings text also? There are still typo's like |
|
@fxha What's the meaning of |
Client-Side Decoration |
|
@fxha I remove the |
|
@fxha The titleBarStyle updated will not broadcast to windows any more, Can you help test it? |
|
|
||
| if (!defaultSettings) { | ||
| console.error('Can not load static preference.json file') | ||
| return |
There was a problem hiding this comment.
Throw an exception to crash Mark Text. Otherwise Mark Text will crash later because no settings are set, right?
* dynamic change element-ui theme to our themeColor * add some ui components * add preference doc * add json schema file * update preference.json and schema.json * reset to old commit * rename preference file for rebase * rebase develop * add setting window * user electron-store to store preferences * add themes setting * add select component * add markdown pref * fix: bool and select init value * add font size setting * editor pref * add general preference * search preference * update menu after preference changed * update muya codes * prevent scale setting window * fix: titlebar undefined * update input style * remove window from windowManager after close setting window * remove old docs and preference.md * if a setting window is already created, no need to create another one, just move it to top * rename openFilesInNewWindow to openFileInNewWindow * change aidou runtime * change hideQuickInsertHint by setting page runtime * change autopair runtime * change codefont and codefontfamily dynamic * change default value of autoSave to false * update bulletListMarker * fix style error * add custom titlebar to settings window * add window shadow for Linux and Windows * fix Windows build * fix some typo error * update doc * add default menu and setting menu * fix update menu bug * fix typo * remove mac titlebarstyle * do not need to send titlebarstyle to renderer * fix typo * crash Mark Text if no initial preference.json file * update the path * add showCustomTitleBar prop * set empty settings menu on Linux/Windows + workaround
* dynamic change element-ui theme to our themeColor * add some ui components * add preference doc * add json schema file * update preference.json and schema.json * reset to old commit * rename preference file for rebase * rebase develop * add setting window * user electron-store to store preferences * add themes setting * add select component * add markdown pref * fix: bool and select init value * add font size setting * editor pref * add general preference * search preference * update menu after preference changed * update muya codes * prevent scale setting window * fix: titlebar undefined * update input style * remove window from windowManager after close setting window * remove old docs and preference.md * if a setting window is already created, no need to create another one, just move it to top * rename openFilesInNewWindow to openFileInNewWindow * change aidou runtime * change hideQuickInsertHint by setting page runtime * change autopair runtime * change codefont and codefontfamily dynamic * change default value of autoSave to false * update bulletListMarker * fix style error * add custom titlebar to settings window * add window shadow for Linux and Windows * fix Windows build * fix some typo error * update doc * add default menu and setting menu * fix update menu bug * fix typo * remove mac titlebarstyle * do not need to send titlebarstyle to renderer * fix typo * crash Mark Text if no initial preference.json file * update the path * add showCustomTitleBar prop * set empty settings menu on Linux/Windows + workaround
Refactor the appWindow, appMenu, and preference singletons into factory mode. @fxha Originally this should be done in the main process refactoring, but in order to refactor the preference, I modified it first, it may not be perfect, I just guarantee that the function is the same as before.Add Mark Text Preference UI.
Update autoSave and themes in menu.
Remove
font...in view menu.Known bugs:
titleBarStylein undefined when first startup.Some follow-up PR's
muyaoptions in runtime.setting(not implement yet)