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

Improve PlayerCard UI #38

Merged
merged 2 commits into from
May 31, 2024
Merged

Improve PlayerCard UI #38

merged 2 commits into from
May 31, 2024

Conversation

sookmax
Copy link
Contributor

@sookmax sookmax commented May 31, 2024

Related to the discussions: #34 (comment), #34 (comment)

I added flex-shrink: 0; to fundStyle and I hope it's okay..? since if I don't have it, the collapsed UI would look like:

Screenshot 2024-05-31 at 10 11 19 PM

whereas if I have flex-shrink: 0;:

Screenshot 2024-05-31 at 10 11 03 PM

And when the card is expanded, the data is arranged in a way that the funds (funds & funds per turn) are left-aligned and all the other info (which is wrapped in a <Stack>) is right-aligned:

Screenshot 2024-05-31 at 10 05 31 PM

Lastly, the added condition to the winConditions.filter()!condition.completed?.has(player.id))—ensures that optional objectives are not shown on the screen once completed.

P.S. Sorry, the generated diff looks very unintuitive 😅

@cpojer
Copy link
Contributor

cpojer commented May 31, 2024

Thank you! I removed the key props since they aren't necessary in those two places.

@cpojer cpojer merged commit 9be55e8 into nkzw-tech:main May 31, 2024
2 checks passed
@sookmax
Copy link
Contributor Author

sookmax commented Jun 1, 2024

Ah right, the funds and the other info are not the same level anymore! Thanks 😁

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.

2 participants