-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Some improvement and suggestion #65
Conversation
If taskbar in Windows not in light color, it's difficult to see the icon.
Signed-off-by: Michael Keck <github@michaelkeck.de>
Hello there, thank you for your effort! It's nice to see that this project has awakened interest in more people! :) I will leave a few comments on your code changes later and then we can have a discussion here. |
.gitignore
Outdated
@@ -1,6 +1,13 @@ | |||
.DS_Store | |||
.idea | |||
.vscode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to have the .vscode
folder in the git repo because it contains the debug configurations.
Okay, but I think there was nothing changes, because I am using Jetbrains IDE. |
@@ -1,6 +1,7 @@ | |||
export class OpenUrlWithDefaultBrowserCommandBuilder { | |||
public static buildWindowsCommand(url: string): string { | |||
return `start explorer "${url}"`; | |||
// return `start explorer "${url}"`; | |||
return `start "${url}"`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some people have problems when executing this command (#42). This is why I changed it to
start explorer ${url}
And by the way I would remove comments like this because it has no use.
src/ts/helpers/ueli-helpers.ts
Outdated
@@ -1,10 +1,11 @@ | |||
import { join } from "path"; | |||
import { homedir } from "os"; | |||
// import { homedir } from "os"; | |||
import { cwd } from "process"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also useless comment
src/ts/helpers/ueli-helpers.ts
Outdated
|
||
export class UeliHelpers { | ||
public static readonly productName = "ueli"; | ||
public static readonly ueliCommandPrefix = "ueli:"; | ||
public static readonly countFilePath = join(homedir(), "ueli.count.json"); | ||
public static readonly countFilePath = join(cwd(), "ueli.count.json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also should be in the home directory of the user in my opinion.
@@ -13,19 +13,19 @@ export const windowsSystemCommands: OperatingSystemCommand[] = [ | |||
executionArgument: `${WindowsSettingsHelpers.windowsSettingsPrefix}shutdown -r -t 0`, | |||
icon: restartIcon, | |||
name: "Restart", | |||
tags: ["reboot"], | |||
tags: ["reboot", "neu starten"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think multi language support should be done in a nicer way.
@@ -51,7 +51,7 @@ export class FilePathSearcher implements Searcher { | |||
executionArgument: filePath, | |||
icon: lstatSync(filePath).isDirectory() | |||
? this.iconSet.folderIcon | |||
: this.iconSet.fileIcon, | |||
: this.iconSet.fileIcon, /* TODO differ icons */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 'to dos' in the code please.
src/ts/user-config/default-config.ts
Outdated
import { OperatingSystem } from "./../operating-system"; | ||
import { WindowsIconSet } from "./../icon-sets/windows-icon-set"; | ||
import { MacOsIconSet } from "./../icon-sets/mac-os-icon-set"; | ||
import { platform, release } from "os"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an unused import?
Okay, I see. The ueli.config and ueli.count are in current working dir, because I am using the App on USB. Perhaps it would be nice to add a folder like portable, usb or any thing else. And of corse I've forgotten to remove my testing translations and TODO-comments. The "release" imported from "os" is required for later testing against versions of Microsoft Windows. Some commands and features are not available on e.g. Windows 7. The command "start url" instead of "start explorer url" was discused in a Windows-Forum and I've read, that "start url" would be more better. Perhaps that discus does not affect the electron app. Perhabs this should be configurable. I can and would be able to fix your suggestions tomorrow. I've forgotten to explain, that I am debugging and developping on Windows 7 and Windows 10 (64bit). For some os commands checks against version and architecture would be needed. |
If you want to change the location of your config file, you can change it in the app settings (see #48). And why is Regarding Windows 7: Because this is only a fun project I don't want to spend too much time on supporting a rather old OS. For me it's OK to provide basic funtionality for Windows 7 and make sure that ueli does not crash. But I don't want the effort for Windows 7 support to slow down the development process for ueli ;) |
Okay, I see.
I've not said, it should be switched back. I have some cmd-batches here and read about this in batch programming. For me, it's okay to leave it as it is.
For me it's fun too, and of corse I like Ueli :) Here's a screenshot of an example command on Windows 7 wich results in error: |
Oh what I frogot to say: PR's will only be merged into my dev branch. |
package.json
Outdated
"@types/electron-is-dev": "^0.3.0", | ||
"@types/electron-store": "^1.3.0", | ||
"@types/jest": "^23.3.1", | ||
"@types/mathjs": "^4.4.1", | ||
"@types/mocha": "^5.2.5", | ||
"@types/node": "^10.12.0", | ||
"chai": "^4.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is chai used?
package.json
Outdated
"husky": "^0.15.0-rc.8", | ||
"jest": "^23.5.0", | ||
"mocha": "^5.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need mocha, when we have jest?
"electron-is-dev": "^0.3.0", | ||
"electron-store": "^2.0.0", | ||
"electron-updater": "^3.1.2", | ||
"fuse.js": "^3.2.1", | ||
"mathjs": "^5.1.1", | ||
"minimist": "^1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has to do with language and i18n testings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If its not used in the code, then this should be removed
Hello again, I've checked out the development branch. The app is opened in full screen mode. How can I resolve this? Or do I have a misstake in my "dev"-branch? Many thanks. |
Can you show me your config? |
Of course, its the default created: {
"allowMouseInteraction": false,
"alwaysShowOnPrimaryDisplay": false,
"applicationFileExtensions": [
".lnk",
".appref-ms",
".url",
".exe"
],
"applicationFolders": [
"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs",
"C:\\Users\\mkeck\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu",
"C:\\Users\\mkeck\\Desktop"
],
"autoStartApp": true,
"colorTheme": "dark",
"customCommands": [],
"fallbackWebSearches": [],
"features": {
"calculator": true,
"commandLine": true,
"customCommands": true,
"email": true,
"environmentVariables": false,
"fileBrowser": false,
"fileSearch": true,
"operatingSystemCommands": false,
"operatingSystemSettings": false,
"programs": true,
"shortcuts": true,
"ueliCommands": true,
"webSearch": true,
"webUrl": true
},
"fileSearchBlackList": [
"vendor",
"node_modules",
"jspm_packages",
"bower_components"
],
"fileSearchOptions": [
{
"folderPath": "C:\\Users\\mkeck",
"recursive": false
}
],
"hotKey": "alt+space",
"iconSet": {
// [...]
},
"language": "auto",
"logExecution": true,
"maxSearchResultCount": 8,
"osLanguage": "de_DE",
"rescanInterval": 60,
"searchEngineLimit": 16,
"searchEngineThreshold": 0.4,
"searchResultDescriptionFontSize": 14,
"searchResultHeight": 60,
"searchResultNameFontSize": 20,
"shortcuts": [],
"showSearchResultNumber": true,
"showTrayIcon": true,
"smoothScrolling": false,
"userInputFontSize": 36,
"userInputHeight": 80,
"userStylesheet": "",
"webSearches": [
// [...]
],
"windowMaxHeight": 560,
"windowWidth": 860
} |
Hmm no idea.. does this only appear when you are on dev? |
No ;(. Both in Master and Dev. I think it has something todo with updated electron / node / yarn? |
Hello again, in function createMainWindow mainWindow = new BrowserWindow({
// [...]
resizable: true,
// [...]
}); solves the problem. But I think it is not correct way? |
For me it works just fine. Try this: mainWindow = new BrowserWindow({
autoHideMenuBar: true,
backgroundColor: "#00000000",
center: true,
frame: false,
height: WindowHelpers.calculateMaxWindowHeight(config.userInputHeight, config.maxSearchResultCount, config.searchResultHeight),
resizable: true,
show: false,
skipTaskbar: true,
width: config.windowWidth,
+ fullscreen: false
}); |
Yes but only with |
I cloned your repo and everything worked fine (master and dev). What happens if you revert the versions in package.json and yarn.lock to the same as my dev? |
I've copied version infos: Works like expected: ueli: 6.1.2 Electron: 2.0.11 Chrome: 61.0.3163.100 Node: 8.9.3 V8: 6.1.534.41 Index size: 153 Works only with my fix: ueli: 6.1.2 Electron: 2.0.12 Chrome: 61.0.3163.100 Node: 8.9.3 V8: 6.1.534.41 Index size: 153 |
Does this resolve my problem? Or is there a problem with my suggested fix? |
In the release notes of electron However, your fix allows the user to resize the window and I don't want that. The user can control the window size through the settings ( |
Have you seen my fix in dev? There I am setting reiszable to true, resize the app window and at the end I set resizable to false. With this fix, the app behaves like it should. |
Didn't see that, this is OK. |
@@ -25,7 +25,7 @@ export const windowsSystemCommands: OperatingSystemCommand[] = [ | |||
executionArgument: `${WindowsSettingsHelpers.windowsSettingsPrefix}rundll32 user32.dll,LockWorkStation`, | |||
icon: lockIcon, | |||
name: "Lock computer", | |||
tags: [], | |||
tags: ["lock"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tag is redundant. The word "lock" is already in the name.
I suggest you split this PR up in multiple but smaller PRs. I'd rather have small diffs to have a better overview. |
@mkkeck ? |
Hi, how can I make this, in smaller PRs? |
This pull request is quite big. 49 files and 5400+ lines changed. I would like you to close this pull request and make multiple new ones which are smaller. Maybe one for updating dependencies and one for refactoring/simplifying code, etc. Do you understand what I mean? |
Yes I understand. But how could i do? Have I build for each change a new branch? |
Yes. |
Hi,
I like your project, that's why I've forked and made some changes.
What I miss:
I've tried to start I18N, but I don't know how to start. I18Next seems to be good, but I don't need to ship translation for MacOs from Windows and vice versa and of corse the same with other things.
Perhabs, do you have a solution or an good starting point?
Kind Regards