Page MenuHomePhabricator

Some formatting changes for showing auth provider config guidance
ClosedPublic

Authored by amckinley on Apr 11 2019, 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

webroot/rsrc/css/phui/phui-info-view.css
77–79

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.Apr 11 2019, 8:20 PM

Oh whoops, I was editing the PhabricatorAuthProvidersGuidanceEngineExtension in rSERVICES.

src/applications/auth/guidance/PhabricatorAuthProvidersGuidanceEngineExtension.php
106

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

106

(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!

This revision was automatically updated to reflect the committed changes.