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: EntityDescription is not displayed on the first time entity selection #518

Merged
merged 3 commits into from
Oct 18, 2021

Conversation

zblcool
Copy link
Contributor

@zblcool zblcool commented Oct 7, 2021

HI Resium Team,

This is Ash. I enjoyed using Resium for a while and it is an amazing library. I found this bug (same with #512 ) that is affecting the display logic of EntityDescription ( It won't show when you click on the first clickable entity. Even in the examples you gave, you can easily notice this bug.). You can find the detailed explanation I gave in issue #512 . And I was just provided one approach for solving this bug. Feel free to reach out!
I hope it helps!

Ash

@rot1024 rot1024 changed the title fix(EntityDescription): fix the logic of removing bodyless class fix: EntityDescription is not displayed on the first time entity selection Oct 8, 2021
Copy link
Member

@rot1024 rot1024 left a comment

Choose a reason for hiding this comment

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

Thank you for PR.

I tried your code at storybook (Entity/Description) but it doesn't seem to have necessarily been resolved the issue. It seems that there are cases where the infobox does not continue to appear.

image

src/EntityDescription/EntityDescription.ts Outdated Show resolved Hide resolved
@zblcool zblcool requested a review from rot1024 October 8, 2021 06:09
@zblcool
Copy link
Contributor Author

zblcool commented Oct 10, 2021

Thank you! I just tried it on my side and you are right. I was focus on the "first click" issue and did not notice this one. And I figure out the reason why it did not continue to appear.

Use the storybook as an example. The yellow dot is an Entity tag with a "description" attribute to display the content. and three other dots (entities) are actually an Entity tag surrounding a Description tag. If you click on the yellow one first and then click on any other. The infobox will be missing. I believe this is the case you were referring to.
Screen Recording 2021-10-08 at 3 38 45 pm

Screen Shot 2021-10-08 at 3 55 16 pm

So. I made some changes and the display of the descriptions should work fine regardless of the order you click it and regardless of how you create the entity now.
See the result below.
I will push a new commit. also will follow the Prettier rules. Please try on your side and let me know if any.
ant btw Thank you so much for your reply!
Screen Recording 2021-10-08 at 3 39 24 pm

@nickgrealy
Copy link

nickgrealy commented Oct 10, 2021

Nice work! When can we get this merged?

Fixes: #512

@rot1024
Copy link
Member

rot1024 commented Oct 18, 2021

Nice. Thank you!

@rot1024 rot1024 merged commit 737b285 into reearth:main Oct 18, 2021
@rot1024
Copy link
Member

rot1024 commented Oct 18, 2021

v1.14.3 released!

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.

3 participants