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

Settings: use form components in general section #1920

Merged
merged 1 commit into from
Dec 23, 2015

Conversation

roccotripaldi
Copy link
Member

As part of the end-of-year maintenance, I plan to clean up the settings section a bit, a task that has been on my list for too long. see #88

This PR aims to replace all form tags in the general settings section with their equivalent form component.

Here is a before / after image. As you can see, nothing changes in appearance, which is expected.

general-settings-before-after

In general settings, replace all form tags with their
equivalent form components.
@roccotripaldi roccotripaldi added [Feature] Site Settings All other general site settings. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 22, 2015
type="submit"

disabled={ this.state.fetchingSettings || this.state.submittingForm }>
? <Button
Copy link
Member

Choose a reason for hiding this comment

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

In cases with condition ? someThing : null I like to use && and have seen it in common use around Calypso.

{ config.isEnabled( 'manage/option_sync_non_public_post_stati' ) &&
    <Button
     
    />
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if a <ConfigurationGate key="manage/option..."><Button ... /> </ConfigurationGate> would make sense down the road...

Copy link
Contributor

Choose a reason for hiding this comment

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

Though I guess that would always instantiate the Button, (or children) even if they're not needed. hrm.

Either way, not relevant to this PR really. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Neat. i was not aware of <ConfigurationGate> Thanks for pointing it out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Neat. i was not aware of <ConfigurationGate> Thanks for pointing it out.

It doesn't exist. :) Just saying that maybe it ought to, but I think I talked myself out of it.

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't exist. :)

haha. Now it's a scandal!

Copy link
Member Author

Choose a reason for hiding this comment

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

ConfigurationGate sounds like a scandal ripped right from the headlines. :)

@dmsnell dmsnell 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 22, 2015
roccotripaldi added a commit that referenced this pull request Dec 23, 2015
…-components

Settings: use form components in general section
@roccotripaldi roccotripaldi merged commit 5d1c67f into master Dec 23, 2015
@lancewillett lancewillett deleted the update/general-settings-form-components branch December 30, 2015 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Settings All other general site settings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants