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: replace div with span in SkeletonLoading component for html cons… #3271

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

Nortsova
Copy link
Contributor

@Nortsova Nortsova commented Oct 4, 2024

Description

Before:
image

Testing

Step 1. Check that there is no errors in the console
image

Step 2. Check that all Skeletons still shown correctly:
image

Resolves #3268

@Nortsova Nortsova requested review from a team as code owners October 4, 2024 13:15
@Nortsova Nortsova linked an issue Oct 4, 2024 that may be closed by this pull request
@iamsamgibbs
Copy link
Contributor

This looks like a sensible change! Can we do it on master rather than enhanced-dashboard? :)

@Nortsova Nortsova self-assigned this Oct 4, 2024
rdig
rdig previously approved these changes Oct 8, 2024
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

All good here. I approved it, but as @iamsamgibbs said, please change the base branch and do this change on master, not on the dashboard feature branch

iamsamgibbs
iamsamgibbs previously approved these changes Oct 11, 2024
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

All looks good! Let's get it merged into master.

Screenshot 2024-10-11 at 09 33 31

rumzledz
rumzledz previously approved these changes Oct 11, 2024
Copy link
Contributor

@rumzledz rumzledz left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure if I agree with this fix since the root issue is that FundsCardsSubTitle is written like this:

<p className="flex items-center gap-2">
  <LoadingSkeleton className="h-[27px] w-[90px] rounded" isLoading={isLoading}>
    <span>{value}</span>
  </LoadingSkeleton>

  <LoadingSkeleton isLoading={isLoading} className="h-5 w-[30px] rounded">
    <span className="uppercase text-1">{currency}</span>
  </LoadingSkeleton>
</p>

We could just simply replace p with div, keep the LoadingSkeleton as a div and tadaaa

no errors

But at the same time, I don't feel strongly about a component that only momentarily appears and this code update gets rid of the error as well anyway so I'm approving this. Great stuff @Nortsova 💯

@Nortsova Nortsova force-pushed the fix/3268-skeleton-component branch from 3b65cd1 to a4c36e7 Compare October 14, 2024 11:04
@Nortsova Nortsova changed the base branch from feat/enhanced-dashboard to master October 14, 2024 11:04
@Nortsova Nortsova dismissed stale reviews from rumzledz, iamsamgibbs, and rdig October 14, 2024 11:04

The base branch was changed.

@CLAassistant
Copy link

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

@Nortsova
Copy link
Contributor Author

Thank you all for the review! 🙌 I updated the base branch to master. ✨

Thank you @rumzledz for your comment! I really appreciate it 🙌 I considered that fix, but it really depends on our goal. I decided to implement a universal fix for the future, as I believe there could be other cases where we might want to place a Skeleton inside a <p> tag. While I think this will be a rare scenario, it's still possible.

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Thanks for the change! Still looking good.

Screenshot 2024-10-14 at 12 10 09

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

re-approving

@Nortsova Nortsova force-pushed the fix/3268-skeleton-component branch from a4c36e7 to 9fb49c7 Compare October 16, 2024 09:18
@Nortsova Nortsova merged commit 68710e9 into master Oct 16, 2024
4 of 6 checks passed
@Nortsova Nortsova deleted the fix/3268-skeleton-component branch October 16, 2024 09:24
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.

[Dashboard]: Console div inside p error
5 participants