Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve narrow-view character component image layout #32

Merged
merged 1 commit into from
May 12, 2024

Conversation

marcustyphoon
Copy link
Collaborator

This improves the positioning and size of the character component's profession image when the component is rendered with a narrow width, allowing it to stay large and vertically positioned and letting it be partially hidden by the tables.

I picked 450px as a minimum size and 33% vertical positioning entirely arbitrarily; someone with a better design eye should tweak.

Only tested with gear optimizer. Should be tested with main site/new site.

(Ignore missing icons in after screenshots, that's because I tested with pnpm link).

before after
before after

@marcustyphoon marcustyphoon changed the title feat: improve character component image layout feat: improve narrow-view character component image layout May 12, 2024
@marcustyphoon
Copy link
Collaborator Author

Oh, this also requires:

      <Character
        attributes={{ profession, data: attributes }}
        armor={armorPropsAPI}
        weapon={weaponPropsAPI}
        backAndTrinket={backAndTrinketPropsAPI}
        consumables={{ foodId, utilityId, relicId }}
        skills={skillsPropsAPI}
        assumedBuffs={{ value: assumedBuffs }}
        imageElement={
          <img
-           style={{ width: '100%' }}
            src={`${
              import.meta.env.BASE_URL
            }images/professions/${specialization.toLowerCase()}.png`}
            alt="Profession"
          />
        }
        switchElement={CustomSwitch}
      />

in src/components/sections/results/ResultCharacter.jsx in the gear optimizer; presumably there is an equivalent in the main site/new site code.

@gw2princeps
Copy link
Member

excellent idea, thank you! will change the main site on the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants