Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

fix(advocates): display whole country name in advocate cards #3535

Conversation

jackoconnordev
Copy link
Contributor

Country names now display in full. A bad type led to the first letter of a string being unintentionally indexed instead of the first string in an array of length one.
Fixes #3526

Implementation details

advocate.country's type was string[]. I imagine someone in the past saw this and assumed because country is a singular noun that it was a string array of length one, and added the [0] to the end of the advocate.country prop.

This removes the unnecessary indexing from advocate.country which was only selecting the first letter and updates the types that led to the confusion.

How to read this PR

Start with if advocate.country should be a string or string[] type. Change to the component props follows.

Screenshots

Dev advocates page with the fix.

image

@jackoconnordev
Copy link
Contributor Author

In Verify Build (pull_request) checknuxt generate is failing. Could be due to differences in content generation between dev and production builds?

I don't believe this is related to anything I've done so not sure if people think that particular step succeeding should be mandatory for a small PR like this (if the proposed change is acceptable of course).

image

Copy link
Contributor

@HuangJunye HuangJunye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution. I am not a maintainer of this repo nor am I familiar with JavaScript 😅. I can see that the issues were potentially introduced in #3108. @eddybrando can you please have a look in this PR? It's important to fix this issue for the advocate page. Thank you.

jackoconnordev and others added 2 commits January 11, 2024 14:46
A bad type led to the first letter of a string being indexed instead of
the first string in an array of length one.
@eddybrando eddybrando force-pushed the 3526-include-more-than-first-letter-of-country-name branch from 9d12cf1 to dbce3d1 Compare January 11, 2024 13:48
@eddybrando eddybrando self-assigned this Jan 11, 2024
Copy link
Collaborator

@eddybrando eddybrando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot @jackoconnordev!

@eddybrando eddybrando merged commit cbe78bd into Qiskit:main Jan 12, 2024
5 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: The advocates page only displays the first letter of the country
3 participants