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

CurrentSite: fix loading state. #1609

Merged
merged 1 commit into from Dec 15, 2015
Merged

Conversation

mtias
Copy link
Member

@mtias mtias commented Dec 15, 2015

Before:
image

After:
image

@mtias mtias added Sites [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR Sidebar labels Dec 15, 2015
{ hasOneSite
? this.addNewWordPressButton()
: <span className="current-site__switch-sites" />
: <span className="current-site__switch-sites">&nbsp;</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't React render this as plain-text &nbsp; ? Should this be a space character instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's rendering it fine for me.

Copy link
Member Author

Choose a reason for hiding this comment

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

@aduth you can insert HTML entities within literal text in JSX, the problem is if you wrap it in { }

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh... I wasn't sure, disabled javascript during this state to inspect to see what happens, and it renders as a space.
space

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, upon double-checking the docs, @mtias is right and this only affects dynamic content - https://facebook.github.io/react/docs/jsx-gotchas.html#html-entities

@rralian
Copy link
Contributor

rralian commented Dec 15, 2015

:shipit:

@rralian rralian added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 15, 2015
mtias added a commit that referenced this pull request Dec 15, 2015
@mtias mtias merged commit ae5c580 into master Dec 15, 2015
@mtias mtias deleted the fix/current-site-loading-state branch December 15, 2015 15:44
@lancewillett lancewillett removed the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants