Skip to content

Commit

Permalink
Fix: some filters/finetunes names are changed on saving the image in …
Browse files Browse the repository at this point in the history
…prod. code
  • Loading branch information
AhmeeedMostafa committed Nov 14, 2022
1 parent cdfd80c commit 4d5256a
Show file tree
Hide file tree
Showing 44 changed files with 90 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ function Aden(imageData) {
}
}

Aden.filterName = 'Aden'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Aden;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Amaro(imageData) {
}
}

Amaro.filterName = 'Amaro'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Amaro;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Ashby(imageData) {
}
}

Ashby.filterName = 'Ashby'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Ashby;
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ function BlackAndWhite(imageData) {
}
}

BlackAndWhite.filterName = 'BlackAndWhite'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default BlackAndWhite;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Brannan(imageData) {
}
}

Brannan.filterName = 'Brannan'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Brannan;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Brooklyn(imageData) {
}
}

Brooklyn.filterName = 'Brooklyn'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Brooklyn;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Charmes(imageData) {
}
}

Charmes.filterName = 'Charmes'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Charmes;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Clarendon(imageData) {
}
}

Clarendon.filterName = 'Clarendon'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Clarendon;
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ function Crema(imageData) {
}
}

Crema.filterName = 'Crema'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Crema;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Dogpatch(imageData) {
}
}

Dogpatch.filterName = 'Dogpatch'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Dogpatch;
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ function Earlybird(imageData) {
}
}

Earlybird.filterName = 'Earlybird'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Earlybird;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Gingham(imageData) {
}
}

Gingham.filterName = 'Gingham'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Gingham;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Ginza(imageData) {
}
}

Ginza.filterName = 'Ginza'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Ginza;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Hefe(imageData) {
}
}

Hefe.filterName = 'Hefe'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Hefe;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Helena(imageData) {
}
}

Helena.filterName = 'Helena'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Helena;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Hudson(imageData) {
}
}

Hudson.filterName = 'Hudson'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Hudson;
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ function Juno(imageData) {
}
}

Juno.filterName = 'Juno'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Juno;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Kelvin(imageData) {
}
}

Kelvin.filterName = 'Kelvin'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Kelvin;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Lark(imageData) {
}
}

Lark.filterName = 'Lark'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Lark;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function LoFi(imageData) {
}
}

LoFi.filterName = 'LoFi'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default LoFi;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Ludwig(imageData) {
}
}

Ludwig.filterName = 'Ludwig'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Ludwig;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Maven(imageData) {
}
}

Maven.filterName = 'Maven'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Maven;
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ function Mayfair(imageData) {
}
}

Mayfair.filterName = 'Mayfair'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Mayfair;
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ function Moon(imageData) {
}
}

Moon.filterName = 'Moon'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Moon;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Nashville(imageData) {
}
}

Nashville.filterName = 'Nashville'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Nashville;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function NinteenSeventySeven(imageData) {
}
}

NinteenSeventySeven.filterName = 'NinteenSeventySeven'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default NinteenSeventySeven;
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ function Perpetua(imageData) {
}
}

Perpetua.filterName = 'Perpetua'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Perpetua;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Reyes(imageData) {
}
}

Reyes.filterName = 'Reyes'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Reyes;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Rise(imageData) {
}
}

Rise.filterName = 'Rise'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Rise;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Sierra(imageData) {
}
}

Sierra.filterName = 'Sierra'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Sierra;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Skyline(imageData) {
}
}

Skyline.filterName = 'Skyline'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Skyline;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Slumber(imageData) {
}
}

Slumber.filterName = 'Slumber'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Slumber;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Stinson(imageData) {
}
}

Stinson.filterName = 'Stinson'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Stinson;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Sutro(imageData) {
}
}

Sutro.filterName = 'Sutro'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Sutro;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Toaster(imageData) {
}
}

Toaster.filterName = 'Toaster'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Toaster;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Valencia(imageData) {
}
}

Valencia.filterName = 'Valencia'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Valencia;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Vesper(imageData) {
}
}

Vesper.filterName = 'Vesper'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Vesper;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ function Walden(imageData) {
}
}

Walden.filterName = 'Walden'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Walden;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function Willow(imageData) {
}
}

Willow.filterName = 'Willow'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Willow;
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ function XPro2(imageData) {
}
}

XPro2.filterName = 'XPro2'; // We assign the filter name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default XPro2;
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function CustomThreshold(imageData) {
}
}

CustomThreshold.finetuneName = 'CustomThreshold'; // We assign the finetune name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default CustomThreshold;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function Warmth(imageData) {
}
}

Warmth.finetuneName = 'Warmth'; // We assign the finetune name here instead of using the fn. name as on prod. code the fn. name is optimized that might cause bug in that case.

export default Warmth;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ const useTransformedImgData = () => {
},
};
if (finalImgDesignState.filter) {
finalImgDesignState.filter = finalImgDesignState.filter.name;
finalImgDesignState.filter =
finalImgDesignState.filter.filterName ||
finalImgDesignState.filter.name;
}
finalImgDesignState.finetunes = finalImgDesignState.finetunes.map(
(finetuneFn) => finetuneFn.name,
(finetuneFn) => finetuneFn.finetuneName || finetuneFn.name,
);
Object.keys(finalImgDesignState.annotations).forEach((k) => {
const annotation = finalImgDesignState.annotations[k];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ const generateFinetuneQuery = (finetunes, finetunesProps = {}) => {
const queryParams = [];
finetunes.forEach((finetuneFn) => {
const finetuneParamInfo =
finetuneFn.name && finetuneNameToParamInfo[finetuneFn.name];
(finetuneFn.finetuneName || finetuneFn.name) &&
finetuneNameToParamInfo[finetuneFn.finetuneName || finetuneFn.name];
if (finetuneParamInfo) {
const finetuneCloudimageVal = toPrecisedFloat(
mapNumber(
Expand Down

0 comments on commit 4d5256a

Please sign in to comment.