#486 Remove some options from user config dialog
Merged 6 years ago by abompard. Opened 6 years ago by ryanlerch.
ryanlerch/fedora-hubs remove-avatar-from-user-config  into  develop

@@ -93,34 +93,41 @@ 

              globalConfig={this.props.globalConfig}

              tabTitle={<FormattedMessage {...messages.general} />}

              handleChange={this.props.onConfigChange}

+             hub={this.props.hub}

              />

-           <UserPanel

-             users={this.props.users.owner}

-             globalConfig={this.props.globalConfig}

-             role="owner"

-             handleChange={this.props.onUserChange}

-             tabTitle={<FormattedMessage {...messages.owners} />}

-             urls={this.props.urls}

-             currentUser={this.props.currentUser}

-             />

-           <UserPanel

-             users={this.props.users.member}

-             globalConfig={this.props.globalConfig}

-             role="member"

-             handleChange={this.props.onUserChange}

-             tabTitle={<FormattedMessage {...messages.members} />}

-             urls={this.props.urls}

-             currentUser={this.props.currentUser}

-             />

-           <ChatPanel

-             hubConfig={this.props.hubConfig}

-             globalConfig={this.props.globalConfig}

-             tabTitle={<FormattedMessage {...messages.chat} />}

-             handleChange={this.props.onConfigChange}

-             />

-           <NotImplementedPanel

+           {!this.props.hub.user_hub &&

+             <UserPanel

+               users={this.props.users.owner}

+               globalConfig={this.props.globalConfig}

+               role="owner"

+               handleChange={this.props.onUserChange}

+               tabTitle={<FormattedMessage {...messages.owners} />}

+               urls={this.props.urls}

+               currentUser={this.props.currentUser}

+               />

+           }

+           {!this.props.hub.user_hub &&

+             <UserPanel

+               users={this.props.users.member}

+               globalConfig={this.props.globalConfig}

+               role="member"

+               handleChange={this.props.onUserChange}

+               tabTitle={<FormattedMessage {...messages.members} />}

+               urls={this.props.urls}

+               currentUser={this.props.currentUser}

+               />

+           }

+           {!this.props.hub.user_hub &&

+             <ChatPanel

+               hubConfig={this.props.hubConfig}

+               globalConfig={this.props.globalConfig}

+               tabTitle={<FormattedMessage {...messages.chat} />}

+               handleChange={this.props.onConfigChange}

+               />

+           }

+           {/*<NotImplementedPanel

              tabTitle={<FormattedMessage {...messages.other} />}

-             />

+             />*/}

          </TabSet>

        </Modal>

      );

@@ -100,6 +100,7 @@ 

                />

            </p>

          </div>

+         {!this.props.hub.user_hub &&

          <div className="form-group row">

            <label htmlFor="hub-settings-general-visibility">

              <FormattedMessage {...messages.visibility} />
@@ -120,6 +121,8 @@ 

              <FormattedHTMLMessage {...messages.visibility_help} />

            </p>

          </div>

+         }

+         {!this.props.hub.user_hub &&

          <div className="form-group row">

            <label htmlFor="hub-settings-general-avatar">

              <FormattedMessage {...messages.avatar} />
@@ -135,6 +138,7 @@ 

              <FormattedMessage {...messages.avatar_help} />

            </p>

          </div>

+         }

        </form>

      );

    }

@@ -101,6 +101,7 @@ 

              onUserChange={this.doUserChange}

              urls={this.props.urls}

              currentUser={this.props.currentUser}

+             hub={this.props.hub}

              />

          }

        </div>

@@ -20,6 +20,7 @@ 

  

    render() {

      var tabLinks = this.props.children.map(function(panel, index) {

+       if (!panel){return null;}

        return (

          <Tab active={this.state.activeTab === index}

               linkClicked={(e) => this.linkClicked(e, index)}
@@ -30,6 +31,7 @@ 

      }.bind(this));

  

      var tabPanels = this.props.children.map(function(panel, index) {

+       if (!panel){return null;}

        return (

          <TabPanel

            active={this.state.activeTab === index}

  • remove the avatar option in userhub config #470
  • remove hub visibility option from userhub config #484
  • remove user management tabs from userhubs config #483
  • comment out the other tab that said it wasnt implemented #485

Signed-off-by: Ryan Lerch rlerch@redhat.com

On a user hub, there's only the General and IRC tabs left. Do you think the IRC tab is relevant for a user hub, or should it be left for team hubs too?

yeah, i wasnt sure about this one, i'll remove it for now.

that will leave a single tab on the user one, but with the future config changes we discussed last night, i assume the user config will get more than one tab in the future. So i wont bother removing the tab sidebar in that modal for now.

rebased onto 8977948

6 years ago

rebased and edited the commit.

I thought the exact same thing. Thanks, looks good :-)

Pull-Request has been merged by abompard

6 years ago