Skip to content

Feature settings #606

Merged
timotheeguerin merged 27 commits intomasterfrom
feature/settings
Aug 31, 2017
Merged

Feature settings #606
timotheeguerin merged 27 commits intomasterfrom
feature/settings

Conversation

@timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Aug 9, 2017

fix #472
image

@paselem
Copy link
Contributor

paselem commented Aug 10, 2017

This is missing a milestone.

@timotheeguerin timotheeguerin added this to the 0.7.0 milestone Aug 10, 2017
this.changeDetector.markForCheck();
});

setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you be discarding this timeout when you navigate away from the component?

// [FileType.log]: ["txt", "log"],
// [FileType.image]: ["png", "jpg", "gif"],
// [FileType.code]: ["json", "ts2", "js", "java", "cs", "cpp", "h", "hpp", "py", "xml", "sh", "cmd", "bat"],
// };
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove?


public userSettingsEditorConfig: CodeMirror.EditorConfiguration = {
lineNumbers: true,
mode: "application/javascript",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we using json above, but javascript here?

gutters: ["CodeMirror-lint-markers"],
lint: true,
extraKeys: {
"Ctrl-S": this.save,
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw above you were adding Ctrl-/ in code. Should it be added here?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah ctrl+/ is added for all language but the save depends on the usage of the editor


@autobind()
private _validJsonConfig(c: FormControl): Promise<any> {
clearTimeout(this._validateDebounceTimeout);
Copy link
Contributor

Choose a reason for hiding this comment

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

does clearTimeout() care if this._validateDebounceTimeout is undefined?

Copy link
Member Author

Choose a reason for hiding this comment

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

nope

@@ -1,8 +1,8 @@
export interface Settings {
homePage: "account" | "home" | "job";
export enum Theme {
Copy link
Contributor

Choose a reason for hiding this comment

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

While this looks nice to have in the settings, is it worth exposing if we only have 1??

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess we can remove it

if (!JSON.minify) {
JSON.minify = (json) => {

let tokenizer = /"|(\/\*)|(\*\/)|(\/\/)|\n|\r/g;
Copy link
Contributor

Choose a reason for hiding this comment

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

??? What? Please add some comments describing what this does.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed it and used strip-json-comments library

@timotheeguerin timotheeguerin merged commit 3d07c4d into master Aug 31, 2017
@timotheeguerin timotheeguerin deleted the feature/settings branch August 31, 2017 22:36
dpwatrous added a commit that referenced this pull request Oct 27, 2021
cRui861 pushed a commit that referenced this pull request Nov 12, 2021
cRui861 pushed a commit that referenced this pull request Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings page

3 participants