Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Commit

Permalink
IMP - Unit icon style improvement
Browse files Browse the repository at this point in the history
Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed Jun 23, 2021
1 parent 5a3bf09 commit f2a62b0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions public/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ img {
max-height: 100%;

&.unitIcon {
margin: 0 0.2rem;
height: 1.6rem;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/process/text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Process text', () => {

const galaMymAnalysisLink = `[Gala Mym](${makePostPath(PostPath.ANALYSIS, {pid: 10550101, lang})})`;
const galaMymImageMd = `![Gala Mym](${DepotPaths.getCharaIconURL('100010_04_r05')}|unitIcon)`;
const galaMymMdTransformed = `${galaMymImageMd} ${galaMymAnalysisLink}`;
const galaMymMdTransformed = `${galaMymImageMd}${galaMymAnalysisLink}`;

beforeEach(() => {
// Mocking this because the fetching promises in `getUnitNameIdMap()` do not resolve
Expand Down
4 changes: 2 additions & 2 deletions src/utils/process/transformers/quickReference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const lang = SupportedLanguages.EN;

const galaMymAnalysisLink = `[Gala Mym](${makePostPath(PostPath.ANALYSIS, {pid: 10550101, lang})})`;
const galaMymImageMd = `![Gala Mym](${DepotPaths.getCharaIconURL('100010_04_r05')}|unitIcon)`;
const galaMymMdTransformed = `${galaMymImageMd} ${galaMymAnalysisLink}`;
const galaMymMdTransformed = `${galaMymImageMd}${galaMymAnalysisLink}`;

describe('Quick reference transformer (Quest/Misc/Mixed)', () => {
it('transforms quest post link', async () => {
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('Quick reference transformer (Analysis)', () => {
it('matches greedily', async () => {
const highBrunhildaAnalysisLink = `[High Brunhilda](${makePostPath(PostPath.ANALYSIS, {pid: 20050102, lang})})`;
const highBrunhildaImageMd = `![High Brunhilda](${DepotPaths.getDragonIconURL('210039_01')}|unitIcon)`;
const highBrunhildaMdTransformed = `${highBrunhildaImageMd} ${highBrunhildaAnalysisLink}`;
const highBrunhildaMdTransformed = `${highBrunhildaImageMd}${highBrunhildaAnalysisLink}`;

const text = 'High Brunhilda';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/process/transformers/quickReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const transformAnalysis: TextTransformer = async ({text, lang}) => {
const postPath = makePostPath(PostPath.ANALYSIS, {pid: unitInfo.id, lang});
const imageMd = `![${unitName}](${getImageURL(unitInfo)}|unitIcon)`;

return `${leftRemainder || ''}${imageMd} [${unitName}](${postPath})${rightRemainder}`;
return `${leftRemainder || ''}${imageMd}[${unitName}](${postPath})${rightRemainder}`;
},
);

Expand Down

0 comments on commit f2a62b0

Please sign in to comment.