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

fix: erroneous booleans in feature tooltip #3219

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Dec 22, 2023

Changes

Fixes the issue illustrated in the screenshot below

image

This PR fixes this. I have a feeling there is a way to fix this with fewer lines of code but it's horrifically complicated to try and get the JS string formatting to play nicely here.

How did you test this code?

Ran the FE locally and verified that the tooltip shows the correct values given all combinations of description and isCompact. Illustrated by screenshots below.

image image image image

Copy link

vercel bot commented Dec 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2023 0:54am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2023 0:54am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2023 0:54am

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Dec 22, 2023
Copy link
Contributor

github-actions bot commented Dec 22, 2023

Uffizzi Preview deployment-43434 was deleted.

@matthewelwell matthewelwell added this pull request to the merge queue Dec 22, 2023
Merged via the queue into main with commit 3758d33 Dec 22, 2023
27 checks passed
@matthewelwell matthewelwell deleted the fix/feature-tooltip-text branch December 22, 2023 14:25
@kyle-ssg
Copy link
Member

Maybe the closest would have been

 {`${isCompact && description? `${description}<br/>`:''}Created ${moment(
                        created_date,
                      ).format('Do MMM YYYY HH:mma')}`}

@matthewelwell
Copy link
Contributor Author

Maybe the closest would have been

 {`${isCompact && description? `${description}<br/>`:''}Created ${moment(
                        created_date,
                      ).format('Do MMM YYYY HH:mma')}`}

I thought I tried that but might have made a small mistake somewhere.

@kyle-ssg
Copy link
Member

Yeah it's probably better to just separate these out than have turnaries everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants