-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plugins Feature Gate #838
Plugins Feature Gate #838
Conversation
site: React.PropTypes.object.isRequired, | ||
plugin: React.PropTypes.object.isRequired, | ||
wporg: React.PropTypes.bool | ||
}, | ||
|
||
toggleAutoupdates: function() { | ||
if( this.props.isMock ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear this would complicate components by adding these early returns. What if we just do a css display: none for this limited use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I don't even need it, if I don't pass the mock site, it would not show this toggles... but if the point of the mocked-components is to show how the feature would work if active, I guess the interactive part is the most interesting one to show
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a space in if(
. I think showing the toggle is important. I wonder if we could capture the click event on the layer above. And not make it something that gets passed to the children under below. I am not sure if this approach would work as well because the user could tab into the toggle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the if(
. I agree that the toggles are important. They are pretty much all the point of this section ... I think being able to see that you could interact with your plugins from there would be the more important part of this preview.
About how to disable them without passing a prop... well, if we could do something like what you are saying, something in the parent component, what would be neat. But I can't really figure out how to do it in another way, so any idea would be more than welcome :)
The result is definitely more compelling. I think it may make sense if we encourage components to have a |
1ea1e29
to
a6f614b
Compare
I think that the overhead is fine. I think mock data should be minimally relavent. Even though we are duplicating the code. The code would only be loaded on the cases where we really need it. So plugins and the dev docs. I think this kind of optimization is not yet necessary. I left some notes on the other PR. The code above looks good to me. |
a6f614b
to
a85c0a2
Compare
About overhead ... if it's ok to reduce the examples to the most significative components of a view (like I did with this case, using only |
It looks good design-wise. @alternatekev is this the correct empty content image? Should it be the Jetpack logo? I also agree about setting a standard of having mock data in an example.json file. |
@rickybanister @johnHackworth Yes, it should be the Jetpack logo which is here: https://cloudup.com/ciQEft83LX3 |
@johnHackworth Instead of the gradient you've got, can we replace it with this:
|
@alternatekev hmmm, I think there was some problems uploading the jetpack logo... I only see a white square in that link: |
4fee71b
to
705bf3b
Compare
Looking good! @alternatekev @enejb if there isn't any big issue about anything, could we merge this PR so I can keep working in the ones that depends on it? Any change request could be added to a new issue |
Feature Example | ||
======= | ||
|
||
Feature Example is a component used to render an mocked example of any feature. It renders whatever childrens it receives, covered but a layer of gradiented opacity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence could be improved a bit.
Feature Example is a component used to render an mocked example of any feature. It renders whatever children it receives. The example is covered by a layer of fading gradient that gives the user a sense of UI that they are missing.
This PR adds a mocked example to the jetpack manage disabled warning in the plugins list. Also, creates a (dumb) component used to render a non clickable mocked example of any set of components, with some opacity gradient on top.
So, pretty much, transform this error screen:

Into this one:

How to test:
And now, we can discuss the pros and the cons of this approach, @alternatekev @rickybanister @mtias @enejb @ebinnion