Page MenuHomePhabricator

Some formatting changes for showing auth provider config guidance
ClosedPublic

Authored by amckinley on Thu, Apr 11, 8:16 PM.

Details

Summary

Ref T7667. On the road to locking the auth config, also clean up some minor UI issues:

  • Only show the warning about not Phacility instance auth if the user isn't a manager (see next diff).
  • When rendering more than one warning in the guidance, add bullets.
  • I didn't like the text in the auth.config-lock config setting.
Test Plan

Loaded the page, saw more reasonable-looking guidance:

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

amckinley created this revision.Thu, Apr 11, 8:16 PM
amckinley requested review of this revision.Thu, Apr 11, 8:17 PM
amckinley added inline comments.Thu, Apr 11, 8:18 PM
webroot/rsrc/css/phui/phui-info-view.css
77–79

epriestley accepted this revision.Thu, Apr 11, 8:20 PM

This probably adds bullets all over the place, i.e. not only if there are multiple items. Try creating a task with no title, for example?

src/applications/config/option/PhabricatorAuthenticationConfigOptions.php
88–94

Missing space after "to".

This revision is now accepted and ready to land.Thu, Apr 11, 8:20 PM
amckinley updated this revision to Diff 48681.Thu, Apr 11, 8:23 PM

Oh whoops, I was editing the PhabricatorAuthProvidersGuidanceEngineExtension in rSERVICES.

epriestley added inline comments.Thu, Apr 11, 8:25 PM
src/applications/auth/guidance/PhabricatorAuthProvidersGuidanceEngineExtension.php
107

This should not be translated: el-autho.locky-configa is not a valid setting.

107

(The key won't actually translate but %s'ing the value is pointless.)

This probably adds bullets all over the place, i.e. not only if there are multiple items. Try creating a task with no title, for example?

PHUIInfoView does this, which seems to be working:

if (count($errors) > 1) {
  $list = array();
  foreach ($errors as $error) {
    $list[] = phutil_tag(
      'li',
      array(),
      $error);
  }
  $list = phutil_tag(
    'ul',
    array(
      'class' => 'phui-info-view-list',
    ),
    $list);
} else if (count($errors) == 1) {
  $list = head($this->errors);
} else {
  $list = null;
}

I tried making the guidance show a single message and that looked right. Making a task with an empty title doesn't show the bullet either.

PHUIInfoView does this, which seems to be working:

Oh, neat. I had no idea!

amckinley updated this revision to Diff 48682.Thu, Apr 11, 8:27 PM

Less el-autho.

amckinley marked 3 inline comments as done.Thu, Apr 11, 8:32 PM
This revision was automatically updated to reflect the committed changes.