-
Notifications
You must be signed in to change notification settings - Fork 191
Custom Backgrounds #335
Custom Backgrounds #335
Conversation
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.
We should consider deciding on a standard for logging so log level can be set or manipulated when need. Whether it's trace/debug/info/critical logs we want to see. This'll prevent a lot of noise from console logs everywhere.
filters: [ | ||
{ name: 'Images', extensions: ['jpg', 'png', 'gif'] } | ||
], | ||
properties: ["openFile"], |
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.
Unnecessary comma here
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 personally don't see a problem with this. It's valid syntax see here. Also, it means it's 1 less line on a diff when an additional value is added at the end of the object.
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.
The syntax is valid, however, the linter which we are trying to move to (StandardJS) flags it by default. See Trailing commas not allowed. here: https://standardjs.com/rules.html#javascript-standard-style
That being said, I do kind of like the idea of keeping the diff a bit cleaner.
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'm all for a standard, so in that case I agree 😄
I've always done trailing commas on arrays to save on the diffs. I can't argue with standards though xD
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 went ahead and removed the comma. I wasn't aware of the StandardJS style (and honestly I put it there on accident lol). Thanks guys!
properties: ["openFile"], | ||
}; | ||
var userPath = 'assets/images/user/' | ||
var dirPath = path.resolve(__dirname, userPath); |
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.
Semicolon consistency (Need that linter ASAP @j-a-m-l )
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.
Added the semicolon. That was my bad. Thanks!
return; | ||
}); | ||
writeStream.on("close", function(ex) { | ||
$mdToast.show( |
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.
Probably a good idea to pull the toast logic into its own method where you pass in the text to be displayed
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.
Thanks for the feedback. I went ahead and made a showToast function. Now the toasts are all made with either showToast or formatAndToastError. I also removed my unnecessary log statements. Thanks!
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.
there are already a few Toast function, but it is not rational:
- https://github.com/ArkEcosystem/ark-desktop/blob/master/client/app/src/accounts/account.controller.js#L278
- https://github.com/ArkEcosystem/ark-desktop/blob/master/client/app/src/accounts/account.controller.js#L338
Would be nice to revamp the toast management into a single identified service instead
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.
would be for another PR
Nice, I'll upload many gifs 😁
|
@luciorubeens Thanks for the suggestions! I went ahead and implemented all of them. One issue though is that when clicking the delete button, which is now on the image grid tile, the image is selected for a split second before it is deleted. Do you know how I could fix this? |
Hmm I did not noticed but I added |
Allow the user to upload custom backgrounds. Resolves #320