Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-12056: Improve the state management for schema admin settings #1701

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

jespino
Copy link
Member

@jespino jespino commented Sep 13, 2018

Summary

Improve the state management for schema admin settings.

Based on the fix of MM-12056, I decide to simplify how
schema_admin_settings work, removing inheritance, and removing the
UNSAFE_complenteWillUpdate method.

In the future the AdminSettings class will be removed, when every single admin panel is using the declarative interface. So the code duplication will be temporary only.

Ticket Link

MM-12056

Checklist

  • Ran make check-style to check for style errors (required for all pull requests)
  • Ran make test to ensure unit and component tests passed

@@ -666,13 +688,144 @@ export default class SchemaAdminSettings extends AdminSettings {
);
}

closeTooltip = () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

All this is copied from AdminSettings class to remove the relationship (parent/child)

render = () => {
const schema = this.props.schema;

if (schema && schema.component) {
const CustomComponent = schema.component;
return (<CustomComponent {...this.props}/>);
}
return AdminSettings.prototype.render.call(this);
return (
Copy link
Member Author

Choose a reason for hiding this comment

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

All this is copied from AdminSettings class to remove the relationship (parent/child)

@jwilander jwilander added the 2: Dev Review Requires review by a core commiter label Sep 13, 2018
@grundleborg
Copy link
Contributor

@jespino I merged your SAML config changes so this now needs a rebase onto that.

@jespino
Copy link
Member Author

jespino commented Sep 14, 2018

Rebased :)

@jespino jespino force-pushed the MM-12056 branch 2 times, most recently from 211db18 to e7e1e2b Compare September 15, 2018 08:13
@jwilander jwilander added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Sep 17, 2018
@jwilander jwilander merged commit fee61c1 into mattermost:master Sep 17, 2018
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Sep 17, 2018
@DHaussermann DHaussermann added the Tests/Done Release tests have been written label Sep 21, 2018
fincha pushed a commit to fincha/mattermost-webapp that referenced this pull request Oct 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
5 participants