Skip to content

Commit

Permalink
random refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Jul 2, 2024
1 parent 424da8f commit 29c8c40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions jest.config.base.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = (dir, env = 'jsdom') => {
const package = require(`${dir}/package.json`);
const pkg = require(`${dir}/package.json`);
return {
clearMocks: true,
collectCoverage: true,
testEnvironment: env,
roots: [`<rootDir>`],
rootDir: dir,
displayName: package.name,
displayName: pkg.name,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
}

ngOnInit() {
if (this.detectBrowser() === 'firefox') {
this.fixFirefox();
}
const handleInputTimeout = setTimeout(() => {
this.handleInput();
clearTimeout(handleInputTimeout);
Expand All @@ -126,10 +123,7 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
const ranges = this.getRanges(val, VARIABLE_REGEX);
const unstaggeredRanges = this.removeStaggeredRanges(ranges);
const boundaries = this.getBoundaries(unstaggeredRanges);
this.highlightData.sections = this.generateHighlightSections(
val,
boundaries
);
this.highlightData.sections = this.generateHighlightSections(val, boundaries);
this.updateHighlighterScroll();
}
handleScroll() {
Expand All @@ -148,7 +142,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
handleSubmit() {
this.submitChange.next(this.innerValue);
}
blockContainerScroll() {}
detectBrowser() {
const ua = window.navigator.userAgent.toLowerCase();
if (ua.indexOf('firefox') !== -1) {
Expand All @@ -165,7 +158,6 @@ export class FancyInputComponent implements ControlValueAccessor, OnInit {
return 'other';
}
}
fixFirefox() {}
getRanges(val: string, highlight: RegExp) {
const ranges: Range[] = [];
let match;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from '@angular/core';
import { FileVariable } from 'altair-graphql-core/build/types/state/variable.interfaces';
import { StorageService } from '../../services';
import * as fromVariables from '../../store/variables/variables.reducer';
import { truncateText } from '../../utils';

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

isValidFileData(fileVariable: FileVariable) {}

updateLocalState(fileVariable: FileVariable) {
this.validFileData = Array.isArray(fileVariable.data)
? fileVariable.data.filter((data) => data instanceof File)
Expand Down

0 comments on commit 29c8c40

Please sign in to comment.