Skip to content

Commit 29c8c40

Browse files
committed
random refactors
1 parent 424da8f commit 29c8c40

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

jest.config.base.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = (dir, env = 'jsdom') => {
2-
const package = require(`${dir}/package.json`);
2+
const pkg = require(`${dir}/package.json`);
33
return {
44
clearMocks: true,
55
collectCoverage: true,
66
testEnvironment: env,
77
roots: [`<rootDir>`],
88
rootDir: dir,
9-
displayName: package.name,
9+
displayName: pkg.name,
1010
};
1111
};

packages/altair-app/src/app/modules/altair/components/fancy-input/fancy-input.component.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
112112
}
113113

114114
ngOnInit() {
115-
if (this.detectBrowser() === 'firefox') {
116-
this.fixFirefox();
117-
}
118115
const handleInputTimeout = setTimeout(() => {
119116
this.handleInput();
120117
clearTimeout(handleInputTimeout);
@@ -126,10 +123,7 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
126123
const ranges = this.getRanges(val, VARIABLE_REGEX);
127124
const unstaggeredRanges = this.removeStaggeredRanges(ranges);
128125
const boundaries = this.getBoundaries(unstaggeredRanges);
129-
this.highlightData.sections = this.generateHighlightSections(
130-
val,
131-
boundaries
132-
);
126+
this.highlightData.sections = this.generateHighlightSections(val, boundaries);
133127
this.updateHighlighterScroll();
134128
}
135129
handleScroll() {
@@ -148,7 +142,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
148142
handleSubmit() {
149143
this.submitChange.next(this.innerValue);
150144
}
151-
blockContainerScroll() {}
152145
detectBrowser() {
153146
const ua = window.navigator.userAgent.toLowerCase();
154147
if (ua.indexOf('firefox') !== -1) {
@@ -165,7 +158,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
165158
return 'other';
166159
}
167160
}
168-
fixFirefox() {}
169161
getRanges(val: string, highlight: RegExp) {
170162
const ranges: Range[] = [];
171163
let match;

packages/altair-app/src/app/modules/altair/components/variable-file-item/variable-file-item.component.ts

-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
} from '@angular/core';
1212
import { FileVariable } from 'altair-graphql-core/build/types/state/variable.interfaces';
1313
import { StorageService } from '../../services';
14-
import * as fromVariables from '../../store/variables/variables.reducer';
1514
import { truncateText } from '../../utils';
1615

1716
@Component({
@@ -78,8 +77,6 @@ export class VariableFileItemComponent implements OnInit, OnChanges {
7877
return this.fileVariableDataChange.emit({ files: Array.from(files) });
7978
}
8079

81-
isValidFileData(fileVariable: FileVariable) {}
82-
8380
updateLocalState(fileVariable: FileVariable) {
8481
this.validFileData = Array.isArray(fileVariable.data)
8582
? fileVariable.data.filter((data) => data instanceof File)

0 commit comments

Comments
 (0)