@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use new Guide layout in Config->Welcome

Summary: Ref T11132, swaps in new UI for welcome page using guide modules

Test Plan: Test instance and non instance guides. Test each setting. Unclear on how to test people / Phacility. Just change the URL link?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11132

Differential Revision: https://secure.phabricator.com/D16482

+171 -597
-2
resources/celerity/map.php
··· 42 42 'rsrc/css/application/config/config-options.css' => '0ede4c9b', 43 43 'rsrc/css/application/config/config-page.css' => '8798e14f', 44 44 'rsrc/css/application/config/config-template.css' => '8e6c6fcd', 45 - 'rsrc/css/application/config/config-welcome.css' => '035aa483', 46 45 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 47 46 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 48 47 'rsrc/css/application/conpherence/durable-column.css' => '86396117', ··· 549 548 'conduit-api-css' => '7bc725c4', 550 549 'config-options-css' => '0ede4c9b', 551 550 'config-page-css' => '8798e14f', 552 - 'config-welcome-css' => '035aa483', 553 551 'conpherence-durable-column-view' => '86396117', 554 552 'conpherence-menu-css' => '90bdf85c', 555 553 'conpherence-message-pane-css' => '5c7b7b17',
-4
src/__phutil_library_map__.php
··· 2210 2210 'PhabricatorConfigTransactionQuery' => 'applications/config/query/PhabricatorConfigTransactionQuery.php', 2211 2211 'PhabricatorConfigValidationException' => 'applications/config/exception/PhabricatorConfigValidationException.php', 2212 2212 'PhabricatorConfigVersionController' => 'applications/config/controller/PhabricatorConfigVersionController.php', 2213 - 'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php', 2214 2213 'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php', 2215 2214 'PhabricatorConpherenceColumnVisibleSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnVisibleSetting.php', 2216 2215 'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php', ··· 2646 2645 'PhabricatorGuideModule' => 'applications/guides/module/PhabricatorGuideModule.php', 2647 2646 'PhabricatorGuideModuleController' => 'applications/guides/controller/PhabricatorGuideModuleController.php', 2648 2647 'PhabricatorGuideQuickStartModule' => 'applications/guides/module/PhabricatorGuideQuickStartModule.php', 2649 - 'PhabricatorGuideWelcomeModule' => 'applications/guides/module/PhabricatorGuideWelcomeModule.php', 2650 2648 'PhabricatorHTTPParameterTypeTableView' => 'applications/config/view/PhabricatorHTTPParameterTypeTableView.php', 2651 2649 'PhabricatorHandleList' => 'applications/phid/handle/pool/PhabricatorHandleList.php', 2652 2650 'PhabricatorHandleObjectSelectorDataView' => 'applications/phid/handle/view/PhabricatorHandleObjectSelectorDataView.php', ··· 6964 6962 'PhabricatorConfigTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 6965 6963 'PhabricatorConfigValidationException' => 'Exception', 6966 6964 'PhabricatorConfigVersionController' => 'PhabricatorConfigController', 6967 - 'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController', 6968 6965 'PhabricatorConpherenceApplication' => 'PhabricatorApplication', 6969 6966 'PhabricatorConpherenceColumnVisibleSetting' => 'PhabricatorInternalSetting', 6970 6967 'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting', ··· 7464 7461 'PhabricatorGuideModule' => 'Phobject', 7465 7462 'PhabricatorGuideModuleController' => 'PhabricatorGuideController', 7466 7463 'PhabricatorGuideQuickStartModule' => 'PhabricatorGuideModule', 7467 - 'PhabricatorGuideWelcomeModule' => 'PhabricatorGuideModule', 7468 7464 'PhabricatorHTTPParameterTypeTableView' => 'AphrontView', 7469 7465 'PhabricatorHandleList' => array( 7470 7466 'Phobject',
-1
src/applications/config/application/PhabricatorConfigApplication.php
··· 44 44 'edit/(?P<key>[\w\.\-]+)/' => 'PhabricatorConfigEditController', 45 45 'group/(?P<key>[^/]+)/' => 'PhabricatorConfigGroupController', 46 46 'version/' => 'PhabricatorConfigVersionController', 47 - 'welcome/' => 'PhabricatorConfigWelcomeController', 48 47 'database/'. 49 48 '(?:(?P<database>[^/]+)/'. 50 49 '(?:(?P<table>[^/]+)/'.
+29 -15
src/applications/config/controller/PhabricatorConfigController.php
··· 7 7 } 8 8 9 9 public function buildSideNavView($filter = null, $for_app = false) { 10 - $user = $this->getRequest()->getUser(); 11 10 11 + $guide_href = new PhutilURI('/guides/'); 12 12 $nav = new AphrontSideNavFilterView(); 13 13 $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 14 14 $nav->addLabel(pht('Configuration')); 15 - $nav->addFilter('/', pht('Core Settings')); 16 - $nav->addFilter('application/', pht('Application Settings')); 17 - $nav->addFilter('history/', pht('Settings History')); 18 - $nav->addFilter('version/', pht('Version Information')); 19 - $nav->addFilter('all/', pht('All Settings')); 15 + $nav->addFilter('/', 16 + pht('Core Settings'), null, 'fa-gear'); 17 + $nav->addFilter('application/', 18 + pht('Application Settings'), null, 'fa-globe'); 19 + $nav->addFilter('history/', 20 + pht('Settings History'), null, 'fa-history'); 21 + $nav->addFilter('version/', 22 + pht('Version Information'), null, 'fa-download'); 23 + $nav->addFilter('all/', 24 + pht('All Settings'), null, 'fa-list-ul'); 20 25 $nav->addLabel(pht('Setup')); 21 - $nav->addFilter('issue/', pht('Setup Issues')); 22 - $nav->addFilter('welcome/', pht('Installation Guide')); 26 + $nav->addFilter('issue/', 27 + pht('Setup Issues'), null, 'fa-warning'); 28 + $nav->addFilter(null, 29 + pht('Installation Guide'), $guide_href, 'fa-book'); 23 30 $nav->addLabel(pht('Database')); 24 - $nav->addFilter('database/', pht('Database Status')); 25 - $nav->addFilter('dbissue/', pht('Database Issues')); 31 + $nav->addFilter('database/', 32 + pht('Database Status'), null, 'fa-heartbeat'); 33 + $nav->addFilter('dbissue/', 34 + pht('Database Issues'), null, 'fa-exclamation-circle'); 26 35 $nav->addLabel(pht('Cache')); 27 - $nav->addFilter('cache/', pht('Cache Status')); 36 + $nav->addFilter('cache/', 37 + pht('Cache Status'), null, 'fa-home'); 28 38 $nav->addLabel(pht('Cluster')); 29 - $nav->addFilter('cluster/databases/', pht('Database Servers')); 30 - $nav->addFilter('cluster/notifications/', pht('Notification Servers')); 31 - $nav->addFilter('cluster/repositories/', pht('Repository Servers')); 39 + $nav->addFilter('cluster/databases/', 40 + pht('Database Servers'), null, 'fa-database'); 41 + $nav->addFilter('cluster/notifications/', 42 + pht('Notification Servers'), null, 'fa-bell-o'); 43 + $nav->addFilter('cluster/repositories/', 44 + pht('Repository Servers'), null, 'fa-code'); 32 45 $nav->addLabel(pht('Modules')); 33 46 34 47 $modules = PhabricatorConfigModule::getAllModules(); 35 48 foreach ($modules as $key => $module) { 36 - $nav->addFilter('module/'.$key.'/', $module->getModuleName()); 49 + $nav->addFilter('module/'.$key.'/', 50 + $module->getModuleName(), null, 'fa-puzzle-piece'); 37 51 } 38 52 39 53 return $nav;
-411
src/applications/config/controller/PhabricatorConfigWelcomeController.php
··· 1 - <?php 2 - 3 - final class PhabricatorConfigWelcomeController 4 - extends PhabricatorConfigController { 5 - 6 - public function handleRequest(AphrontRequest $request) { 7 - $viewer = $request->getViewer(); 8 - 9 - $nav = $this->buildSideNavView(); 10 - $nav->selectFilter('welcome/'); 11 - 12 - $title = pht('Installation Guide'); 13 - 14 - $header = id(new PHUIHeaderView()) 15 - ->setHeader($title) 16 - ->setProfileHeader(true); 17 - 18 - $crumbs = $this 19 - ->buildApplicationCrumbs() 20 - ->addTextCrumb($title) 21 - ->setBorder(true); 22 - 23 - $content = id(new PhabricatorConfigPageView()) 24 - ->setHeader($header) 25 - ->setContent($this->buildWelcomeScreen($request)); 26 - 27 - return $this->newPage() 28 - ->setTitle($title) 29 - ->setCrumbs($crumbs) 30 - ->setNavigation($nav) 31 - ->appendChild($content) 32 - ->addClass('white-background'); 33 - } 34 - 35 - public function buildWelcomeScreen(AphrontRequest $request) { 36 - $viewer = $request->getUser(); 37 - $this->requireResource('config-welcome-css'); 38 - 39 - $content = pht( 40 - "=== Install Phabricator ===\n\n". 41 - "You have successfully installed Phabricator. This screen will guide ". 42 - "you through configuration and orientation. ". 43 - "These steps are optional, and you can go through them in any order. ". 44 - "If you want to get back to this screen later on, you can find it in ". 45 - "the **Config** application under **Welcome Screen**."); 46 - 47 - $setup = array(); 48 - 49 - $setup[] = $this->newItem( 50 - $request, 51 - 'fa-check-square-o green', 52 - $content); 53 - 54 - $issues_resolved = !PhabricatorSetupCheck::getOpenSetupIssueKeys(); 55 - 56 - $setup_href = PhabricatorEnv::getURI('/config/issue/'); 57 - if ($issues_resolved) { 58 - $content = pht( 59 - "=== Resolve Setup Issues ===\n\n". 60 - "You've resolved (or ignored) all outstanding setup issues. ". 61 - "You can review issues in the **Config** application, under ". 62 - "**[[ %s | Setup Issues ]]**.", 63 - $setup_href); 64 - $icon = 'fa-check-square-o green'; 65 - } else { 66 - $content = pht( 67 - "=== Resolve Setup Issues ===\n\n". 68 - "You have some unresolved setup issues to take care of. Click ". 69 - "the link in the yellow banner at the top of the screen to see ". 70 - "them, or find them in the **Config** application under ". 71 - "**[[ %s | Setup Issues ]]**. ". 72 - "Although most setup issues should be resolved, sometimes an issue ". 73 - "is not applicable to an install. ". 74 - "If you don't intend to fix a setup issue (or don't want to fix ". 75 - "it for now), you can use the \"Ignore\" action to mark it as ". 76 - "something you don't plan to deal with.", 77 - $setup_href); 78 - $icon = 'fa-warning red'; 79 - } 80 - 81 - $setup[] = $this->newItem( 82 - $request, 83 - $icon, 84 - $content); 85 - 86 - $configs = id(new PhabricatorAuthProviderConfigQuery()) 87 - ->setViewer(PhabricatorUser::getOmnipotentUser()) 88 - ->execute(); 89 - 90 - $auth_href = PhabricatorEnv::getURI('/auth/'); 91 - $have_auth = (bool)$configs; 92 - if ($have_auth) { 93 - $content = pht( 94 - "=== Login and Registration ===\n\n". 95 - "You've configured at least one authentication provider, so users ". 96 - "can register or log in. ". 97 - "To configure more providers or adjust settings, use the ". 98 - "**[[ %s | Auth Application ]]**.", 99 - $auth_href); 100 - $icon = 'fa-check-square-o green'; 101 - } else { 102 - $content = pht( 103 - "=== Login and Registration ===\n\n". 104 - "You haven't configured any authentication providers yet. ". 105 - "Authentication providers allow users to register accounts and ". 106 - "log in to Phabricator. You can configure Phabricator to accept ". 107 - "credentials like username and password, LDAP, or Google OAuth. ". 108 - "You can configure authentication using the ". 109 - "**[[ %s | Auth Application ]]**.", 110 - $auth_href); 111 - $icon = 'fa-warning red'; 112 - } 113 - 114 - $setup[] = $this->newItem( 115 - $request, 116 - $icon, 117 - $content); 118 - 119 - $config_href = PhabricatorEnv::getURI('/config/'); 120 - 121 - // Just load any config value at all; if one exists the install has figured 122 - // out how to configure things. 123 - $have_config = (bool)id(new PhabricatorConfigEntry())->loadAllWhere( 124 - '1 = 1 LIMIT 1'); 125 - 126 - if ($have_config) { 127 - $content = pht( 128 - "=== Configure Phabricator Settings ===\n\n". 129 - "You've configured at least one setting from the web interface. ". 130 - "To configure more settings later, use the ". 131 - "**[[ %s | Config Application ]]**.", 132 - $config_href); 133 - $icon = 'fa-check-square-o green'; 134 - } else { 135 - $content = pht( 136 - "=== Configure Phabricator Settings ===\n\n". 137 - 'Many aspects of Phabricator are configurable. To explore and '. 138 - 'adjust settings, use the **[[ %s | Config Application ]]**.', 139 - $config_href); 140 - $icon = 'fa-info-circle'; 141 - } 142 - 143 - $setup[] = $this->newItem( 144 - $request, 145 - $icon, 146 - $content); 147 - 148 - $settings_href = PhabricatorEnv::getURI('/settings/'); 149 - 150 - $preferences = id(new PhabricatorUserPreferencesQuery()) 151 - ->setViewer($viewer) 152 - ->withUsers(array($viewer)) 153 - ->executeOne(); 154 - 155 - $have_settings = ($preferences && $preferences->getPreferences()); 156 - 157 - if ($have_settings) { 158 - $content = pht( 159 - "=== Adjust Account Settings ===\n\n". 160 - "You've adjusted at least one setting on your account. ". 161 - "To make more adjustments, visit the ". 162 - "**[[ %s | Settings Application ]]**.", 163 - $settings_href); 164 - $icon = 'fa-check-square-o green'; 165 - } else { 166 - $content = pht( 167 - "=== Adjust Account Settings ===\n\n". 168 - 'You can configure settings for your account by clicking the '. 169 - 'wrench icon in the main menu bar, or visiting the '. 170 - '**[[ %s | Settings Application ]]** directly.', 171 - $settings_href); 172 - $icon = 'fa-info-circle'; 173 - } 174 - 175 - $setup[] = $this->newItem( 176 - $request, 177 - $icon, 178 - $content); 179 - 180 - $dashboard_href = PhabricatorEnv::getURI('/dashboard/'); 181 - $have_dashboard = (bool)PhabricatorDashboardInstall::getDashboard( 182 - $viewer, 183 - PhabricatorHomeApplication::DASHBOARD_DEFAULT, 184 - 'PhabricatorHomeApplication'); 185 - if ($have_dashboard) { 186 - $content = pht( 187 - "=== Customize Home Page ===\n\n". 188 - "You've installed a default dashboard to replace this welcome screen ". 189 - "on the home page. ". 190 - "You can still visit the welcome screen here at any time if you ". 191 - "have steps you want to complete later, or if you feel lonely. ". 192 - "If you've changed your mind about the dashboard you installed, ". 193 - "you can install a different default dashboard with the ". 194 - "**[[ %s | Dashboards Application ]]**.", 195 - $dashboard_href); 196 - $icon = 'fa-check-square-o green'; 197 - } else { 198 - $content = pht( 199 - "=== Customize Home Page ===\n\n". 200 - "When you're done setting things up, you can create a custom ". 201 - "dashboard and install it. Your dashboard will replace this ". 202 - "welcome screen on the Phabricator home page. ". 203 - "Dashboards can show users the information that's most important to ". 204 - "your organization. You can configure them to display things like: ". 205 - "a custom welcome message, a feed of recent activity, or a list of ". 206 - "open tasks, waiting reviews, recent commits, and so on. ". 207 - "After you install a default dashboard, it will replace this page. ". 208 - "You can find this page later by visiting the **Config** ". 209 - "application, under **Welcome Page**. ". 210 - "To get started building a dashboard, use the ". 211 - "**[[ %s | Dashboards Application ]]**. ", 212 - $dashboard_href); 213 - $icon = 'fa-info-circle'; 214 - } 215 - 216 - $setup[] = $this->newItem( 217 - $request, 218 - $icon, 219 - $content); 220 - 221 - $apps_href = PhabricatorEnv::getURI('/applications/'); 222 - $content = pht( 223 - "=== Explore Applications ===\n\n". 224 - "Phabricator is a large suite of applications that work together to ". 225 - "help you develop software, manage tasks, and communicate. A few of ". 226 - "the most commonly used applications are pinned to the left navigation ". 227 - "bar by default.\n\n". 228 - "To explore all of the Phabricator applications, adjust settings, or ". 229 - "uninstall applications you don't plan to use, visit the ". 230 - "**[[ %s | Applications Application ]]**. You can also click the ". 231 - "**Applications** button in the left navigation menu, or search for an ". 232 - "application by name in the main menu bar. ", 233 - $apps_href); 234 - 235 - $explore = array(); 236 - $explore[] = $this->newItem( 237 - $request, 238 - 'fa-globe', 239 - $content); 240 - 241 - // TODO: Restore some sort of "Support" link here, but just nuke it for 242 - // now as we figure stuff out. 243 - 244 - $differential_uri = PhabricatorEnv::getURI('/differential/'); 245 - $differential_create_uri = PhabricatorEnv::getURI( 246 - '/differential/diff/create/'); 247 - $differential_all_uri = PhabricatorEnv::getURI('/differential/query/all/'); 248 - 249 - $differential_user_guide = PhabricatorEnv::getDoclink( 250 - 'Differential User Guide'); 251 - $differential_vs_uri = PhabricatorEnv::getDoclink( 252 - 'User Guide: Review vs Audit'); 253 - 254 - $quick = array(); 255 - $quick[] = $this->newItem( 256 - $request, 257 - 'fa-gear', 258 - pht( 259 - "=== Quick Start: Code Review ===\n\n". 260 - "Review code with **[[ %s | Differential ]]**. ". 261 - "Engineers can use Differential to share, review, and approve ". 262 - "changes to source code. ". 263 - "To get started with code review:\n\n". 264 - " - **[[ %s | Create a Revision ]]** //(Copy and paste a diff from ". 265 - " the command line into the web UI to quickly get a feel for ". 266 - " review.)//\n". 267 - " - **[[ %s | View All Revisions ]]**\n\n". 268 - "For more information, see these articles in the documentation:\n\n". 269 - " - **[[ %s | Differential User Guide ]]**, for a general overview ". 270 - " of Differential.\n". 271 - " - **[[ %s | User Guide: Review vs Audit ]]**, for a discussion ". 272 - " of different code review workflows.", 273 - $differential_uri, 274 - $differential_create_uri, 275 - $differential_all_uri, 276 - $differential_user_guide, 277 - $differential_vs_uri)); 278 - 279 - 280 - $maniphest_uri = PhabricatorEnv::getURI('/maniphest/'); 281 - $maniphest_create_uri = PhabricatorEnv::getURI('/maniphest/task/edit/'); 282 - $maniphest_all_uri = PhabricatorEnv::getURI('/maniphest/query/all/'); 283 - $quick[] = $this->newItem( 284 - $request, 285 - 'fa-anchor', 286 - pht( 287 - "=== Quick Start: Bugs and Tasks ===\n\n". 288 - "Track bugs and tasks in Phabricator with ". 289 - "**[[ %s | Maniphest ]]**. ". 290 - "Users in all roles can use Maniphest to manage current and ". 291 - "planned work and to track bugs and issues. ". 292 - "To get started with bugs and tasks:\n\n". 293 - " - **[[ %s | Create a Task ]]**\n". 294 - " - **[[ %s | View All Tasks ]]**\n", 295 - $maniphest_uri, 296 - $maniphest_create_uri, 297 - $maniphest_all_uri)); 298 - 299 - 300 - $pholio_uri = PhabricatorEnv::getURI('/pholio/'); 301 - $pholio_create_uri = PhabricatorEnv::getURI('/pholio/new/'); 302 - $pholio_all_uri = PhabricatorEnv::getURI('/pholio/query/all/'); 303 - 304 - $quick[] = $this->newItem( 305 - $request, 306 - 'fa-camera-retro', 307 - pht( 308 - "=== Quick Start: Design Review ===\n\n". 309 - "Review proposed designs with **[[ %s | Pholio ]]**. ". 310 - "Designers can use Pholio to share images of what they're working on ". 311 - "and show off things they've made. ". 312 - "To get started with design review:\n\n". 313 - " - **[[ %s | Create a Mock ]]**\n". 314 - " - **[[ %s | View All Mocks ]]**", 315 - $pholio_uri, 316 - $pholio_create_uri, 317 - $pholio_all_uri)); 318 - 319 - 320 - $diffusion_uri = PhabricatorEnv::getURI('/diffusion/edit/'); 321 - $diffusion_create_uri = PhabricatorEnv::getURI('/diffusion/create/'); 322 - $diffusion_all_uri = PhabricatorEnv::getURI('/diffusion/query/all/'); 323 - 324 - $diffusion_user_guide = PhabricatorEnv::getDoclink('Diffusion User Guide'); 325 - $diffusion_setup_guide = PhabricatorEnv::getDoclink( 326 - 'Diffusion User Guide: Repository Hosting'); 327 - 328 - $quick[] = $this->newItem( 329 - $request, 330 - 'fa-code', 331 - pht( 332 - "=== Quick Start: Repositories ===\n\n". 333 - "Manage and browse source code repositories with ". 334 - "**[[ %s | Diffusion ]]**. ". 335 - "Engineers can use Diffusion to browse and audit source code. ". 336 - "You can configure Phabricator to host repositories, or have it ". 337 - "track existing repositories hosted elsewhere (like GitHub, ". 338 - "Bitbucket, or an internal server). ". 339 - "To get started with repositories:\n\n". 340 - " - **[[ %s | Create a New Repository ]]**\n". 341 - " - **[[ %s | View All Repositories ]]**\n\n". 342 - "For more information, see these articles in the documentation:\n\n". 343 - " - **[[ %s | Diffusion User Guide ]]**, for a general overview of ". 344 - " Diffusion.\n". 345 - " - **[[ %s | Diffusion User Guide: Repository Hosting ]]**, ". 346 - " for instructions on configuring repository hosting.\n\n". 347 - "Phabricator supports Git, Mercurial and Subversion.", 348 - $diffusion_uri, 349 - $diffusion_create_uri, 350 - $diffusion_all_uri, 351 - $diffusion_user_guide, 352 - $diffusion_setup_guide)); 353 - 354 - $setup_header = new PHUIRemarkupView( 355 - $viewer, pht('=Setup and Configuration')); 356 - 357 - $explore_header = new PHUIRemarkupView( 358 - $viewer, pht('=Explore Phabricator')); 359 - 360 - $quick_header = new PHUIRemarkupView( 361 - $viewer, pht('=Quick Start Guide')); 362 - 363 - $document = id(new PHUIDocumentViewPro()) 364 - ->setFluid(true) 365 - ->appendChild($setup_header) 366 - ->appendChild($setup) 367 - ->appendChild($explore_header) 368 - ->appendChild($explore) 369 - ->appendChild($quick_header) 370 - ->appendChild($quick); 371 - 372 - return id(new PHUIBoxView()) 373 - ->appendChild($document); 374 - } 375 - 376 - private function newItem(AphrontRequest $request, $icon, $content) { 377 - $viewer = $request->getUser(); 378 - 379 - $icon = id(new PHUIIconView()) 380 - ->setIcon($icon.' fa-2x'); 381 - 382 - $content = new PHUIRemarkupView($viewer, $content); 383 - 384 - $icon = phutil_tag( 385 - 'div', 386 - array( 387 - 'class' => 'config-welcome-icon', 388 - ), 389 - $icon); 390 - 391 - $content = phutil_tag( 392 - 'div', 393 - array( 394 - 'class' => 'config-welcome-content', 395 - ), 396 - $content); 397 - 398 - $view = phutil_tag( 399 - 'div', 400 - array( 401 - 'class' => 'config-welcome-box grouped', 402 - ), 403 - array( 404 - $icon, 405 - $content, 406 - )); 407 - 408 - return $view; 409 - } 410 - 411 - }
-4
src/applications/guides/application/PhabricatorGuideApplication.php
··· 18 18 return 'fa-map-o'; 19 19 } 20 20 21 - public function isPrototype() { 22 - return true; 23 - } 24 - 25 21 public function getApplicationGroup() { 26 22 return self::GROUP_UTILITIES; 27 23 }
+1 -1
src/applications/guides/controller/PhabricatorGuideController.php
··· 8 8 $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 9 9 $nav->addLabel(pht('Guides')); 10 10 11 - $modules = PhabricatorGuideModule::getAllModules(); 11 + $modules = PhabricatorGuideModule::getEnabledModules(); 12 12 foreach ($modules as $key => $module) { 13 13 $nav->addFilter($key.'/', $module->getModuleName()); 14 14 }
+3 -2
src/applications/guides/controller/PhabricatorGuideModuleController.php
··· 7 7 $viewer = $this->getViewer(); 8 8 $key = $request->getURIData('module'); 9 9 10 + $all_modules = PhabricatorGuideModule::getEnabledModules(); 11 + 10 12 if (!$key) { 11 - $key = 'welcome'; 13 + $key = key($all_modules); 12 14 } 13 - $all_modules = PhabricatorGuideModule::getAllModules(); 14 15 15 16 $nav = $this->buildSideNavView(); 16 17 $nav->selectFilter($key.'/');
+22 -19
src/applications/guides/module/PhabricatorGuideInstallModule.php
··· 14 14 return 20; 15 15 } 16 16 17 + public function getIsModuleEnabled() { 18 + if (PhabricatorEnv::getEnvConfig('cluster.instance')) { 19 + return false; 20 + } 21 + return true; 22 + } 23 + 17 24 public function renderModuleStatus(AphrontRequest $request) { 18 25 $viewer = $request->getViewer(); 19 26 ··· 25 32 if ($issues_resolved) { 26 33 $icon = 'fa-check'; 27 34 $icon_bg = 'bg-green'; 28 - $skip = null; 29 35 $description = pht( 30 36 "You've resolved (or ignored) all outstanding setup issues."); 31 37 } else { 32 38 $icon = 'fa-warning'; 33 39 $icon_bg = 'bg-red'; 34 - $skip = '#'; 35 40 $description = 36 41 pht('You have some unresolved setup issues to take care of.'); 37 42 } ··· 41 46 ->setHref($href) 42 47 ->setIcon($icon) 43 48 ->setIconBackground($icon_bg) 44 - ->setSkipHref($skip) 45 49 ->setDescription($description); 46 50 $guide_items->addItem($item); 47 51 ··· 55 59 if ($have_auth) { 56 60 $icon = 'fa-check'; 57 61 $icon_bg = 'bg-green'; 58 - $skip = null; 59 62 $description = pht( 60 63 "You've configured at least one authentication provider."); 61 64 } else { 62 65 $icon = 'fa-key'; 63 66 $icon_bg = 'bg-sky'; 64 - $skip = '#'; 65 67 $description = pht( 66 68 'Authentication providers allow users to register accounts and '. 67 69 'log in to Phabricator.'); ··· 72 74 ->setHref($href) 73 75 ->setIcon($icon) 74 76 ->setIconBackground($icon_bg) 75 - ->setSkipHref($skip) 76 77 ->setDescription($description); 77 78 $guide_items->addItem($item); 78 79 ··· 88 89 if ($have_config) { 89 90 $icon = 'fa-check'; 90 91 $icon_bg = 'bg-green'; 91 - $skip = null; 92 92 $description = pht( 93 93 "You've configured at least one setting from the web interface."); 94 94 } else { 95 95 $icon = 'fa-sliders'; 96 96 $icon_bg = 'bg-sky'; 97 - $skip = '#'; 98 97 $description = pht( 99 98 'Learn how to configure mail and other options in Phabricator.'); 100 99 } ··· 104 103 ->setHref($href) 105 104 ->setIcon($icon) 106 105 ->setIconBackground($icon_bg) 107 - ->setSkipHref($skip) 108 106 ->setDescription($description); 109 107 $guide_items->addItem($item); 110 108 ··· 120 118 if ($have_settings) { 121 119 $icon = 'fa-check'; 122 120 $icon_bg = 'bg-green'; 123 - $skip = null; 124 121 $description = pht( 125 122 "You've adjusted at least one setting on your account."); 126 123 } else { 127 124 $icon = 'fa-wrench'; 128 125 $icon_bg = 'bg-sky'; 129 - $skip = '#'; 130 126 $description = pht( 131 127 'Configure account settings for all users, or just yourself'); 132 128 } ··· 136 132 ->setHref($href) 137 133 ->setIcon($icon) 138 134 ->setIconBackground($icon_bg) 139 - ->setSkipHref($skip) 140 135 ->setDescription($description); 141 136 $guide_items->addItem($item); 142 137 143 138 144 139 $title = pht('Notification Server'); 145 - $href = PhabricatorEnv::getURI('/config/notifications/'); 146 - // TODO: Wire up a notifications check 147 - $have_notifications = false; 140 + $href = PhabricatorEnv::getURI('/config/edit/notification.servers/'); 141 + $have_notifications = PhabricatorEnv::getEnvConfig('notification.servers'); 148 142 if ($have_notifications) { 149 143 $icon = 'fa-check'; 150 144 $icon_bg = 'bg-green'; 151 - $skip = null; 152 145 $description = pht( 153 146 "You've set up a real-time notification server."); 154 147 } else { 155 148 $icon = 'fa-bell'; 156 149 $icon_bg = 'bg-sky'; 157 - $skip = '#'; 158 150 $description = pht( 159 151 'Phabricator can deliver notifications in real-time with WebSockets.'); 160 152 } ··· 164 156 ->setHref($href) 165 157 ->setIcon($icon) 166 158 ->setIconBackground($icon_bg) 167 - ->setSkipHref($skip) 168 159 ->setDescription($description); 169 160 170 161 $guide_items->addItem($item); 171 162 172 - return $guide_items; 163 + $intro = pht( 164 + 'Phabricator has been successfully installed. These next guides will '. 165 + 'take you through configuration and new user orientation. '. 166 + 'These steps are optional, and you can go through them in any order. '. 167 + 'If you want to get back to this guide later on, you can find it in '. 168 + '{icon globe} **Applications** under {icon map-o} **Guides**.'); 169 + 170 + $intro = new PHUIRemarkupView($viewer, $intro); 171 + 172 + $intro = id(new PHUIDocumentViewPro()) 173 + ->appendChild($intro); 174 + 175 + return array($intro, $guide_items); 173 176 174 177 } 175 178
+10
src/applications/guides/module/PhabricatorGuideModule.php
··· 5 5 abstract public function getModuleKey(); 6 6 abstract public function getModuleName(); 7 7 abstract public function getModulePosition(); 8 + abstract public function getIsModuleEnabled(); 8 9 abstract public function renderModuleStatus(AphrontRequest $request); 9 10 10 11 final public static function getAllModules() { ··· 12 13 ->setAncestorClass(__CLASS__) 13 14 ->setUniqueMethod('getModuleKey') 14 15 ->setSortMethod('getModulePosition') 16 + ->execute(); 17 + } 18 + 19 + final public static function getEnabledModules() { 20 + return id(new PhutilClassMapQuery()) 21 + ->setAncestorClass(__CLASS__) 22 + ->setUniqueMethod('getModuleKey') 23 + ->setSortMethod('getModulePosition') 24 + ->setFilterMethod('getIsModuleEnabled') 15 25 ->execute(); 16 26 } 17 27
+97 -71
src/applications/guides/module/PhabricatorGuideQuickStartModule.php
··· 14 14 return 30; 15 15 } 16 16 17 + public function getIsModuleEnabled() { 18 + return true; 19 + } 20 + 17 21 public function renderModuleStatus(AphrontRequest $request) { 18 22 $viewer = $request->getViewer(); 23 + $instance = PhabricatorEnv::getEnvConfig('cluster.instance'); 19 24 20 25 $guide_items = new PhabricatorGuideListView(); 21 26 22 - $title = pht('Configure Applications'); 23 - $apps_check = true; 24 - $href = PhabricatorEnv::getURI('/applications/'); 25 - if ($apps_check) { 27 + $title = pht('Create a Repository'); 28 + $repository_check = id(new PhabricatorRepositoryQuery()) 29 + ->setViewer($viewer) 30 + ->execute(); 31 + $href = PhabricatorEnv::getURI('/diffusion/'); 32 + if ($repository_check) { 26 33 $icon = 'fa-check'; 27 34 $icon_bg = 'bg-green'; 28 - $skip = null; 29 35 $description = pht( 30 - "You've uninstalled any unneeded applications for now."); 36 + "You've created at least one repository."); 31 37 } else { 32 - $icon = 'fa-globe'; 38 + $icon = 'fa-code'; 33 39 $icon_bg = 'bg-sky'; 34 - $skip = '#'; 35 40 $description = 36 - pht('Use all our applications, or uninstall the ones you don\'t want.'); 41 + pht('If you are here for code review, let\'s set up your first '. 42 + 'repository.'); 37 43 } 38 44 39 45 $item = id(new PhabricatorGuideItemView()) ··· 41 47 ->setHref($href) 42 48 ->setIcon($icon) 43 49 ->setIconBackground($icon_bg) 44 - ->setSkipHref($skip) 45 50 ->setDescription($description); 46 51 $guide_items->addItem($item); 47 52 48 53 49 - $title = pht('Invite Collaborators'); 50 - $people_check = true; 51 - $href = PhabricatorEnv::getURI('/people/invite/'); 52 - if ($people_check) { 54 + $title = pht('Create a Project'); 55 + $project_check = id(new PhabricatorProjectQuery()) 56 + ->setViewer($viewer) 57 + ->execute(); 58 + $href = PhabricatorEnv::getURI('/project/'); 59 + if ($project_check) { 53 60 $icon = 'fa-check'; 54 61 $icon_bg = 'bg-green'; 55 - $skip = null; 56 62 $description = pht( 57 - 'You will not be alone on this journey.'); 63 + "You've created at least one project."); 58 64 } else { 59 - $icon = 'fa-group'; 65 + $icon = 'fa-briefcase'; 60 66 $icon_bg = 'bg-sky'; 61 - $skip = '#'; 62 67 $description = 63 - pht('Invite the rest of your team to get started on Phabricator.'); 68 + pht('Project tags define everything. Create them for teams, tags, '. 69 + 'or actual projects.'); 64 70 } 65 71 66 72 $item = id(new PhabricatorGuideItemView()) ··· 68 74 ->setHref($href) 69 75 ->setIcon($icon) 70 76 ->setIconBackground($icon_bg) 71 - ->setSkipHref($skip) 72 77 ->setDescription($description); 73 78 $guide_items->addItem($item); 74 79 75 80 76 - $title = pht('Create a Repository'); 77 - $repository_check = true; 78 - $href = PhabricatorEnv::getURI('/diffusion/'); 79 - if ($repository_check) { 81 + $title = pht('Create a Task'); 82 + $task_check = id(new ManiphestTaskQuery()) 83 + ->setViewer($viewer) 84 + ->execute(); 85 + $href = PhabricatorEnv::getURI('/maniphest/'); 86 + if ($task_check) { 80 87 $icon = 'fa-check'; 81 88 $icon_bg = 'bg-green'; 82 - $skip = null; 83 89 $description = pht( 84 - "You've created at least one repository."); 90 + "You've created at least one task."); 85 91 } else { 86 - $icon = 'fa-code'; 92 + $icon = 'fa-anchor'; 87 93 $icon_bg = 'bg-sky'; 88 - $skip = '#'; 89 94 $description = 90 - pht('If you are here for code review, let\'s set up your first '. 91 - 'repository.'); 95 + pht('Create some work for the interns in Maniphest.'); 92 96 } 93 97 94 98 $item = id(new PhabricatorGuideItemView()) ··· 96 100 ->setHref($href) 97 101 ->setIcon($icon) 98 102 ->setIconBackground($icon_bg) 99 - ->setSkipHref($skip) 100 103 ->setDescription($description); 101 104 $guide_items->addItem($item); 102 105 103 - 104 - $title = pht('Create a Project'); 105 - $project_check = true; 106 - $href = PhabricatorEnv::getURI('/project/'); 107 - if ($project_check) { 106 + $title = pht('Build a Dashboard'); 107 + $have_dashboard = (bool)PhabricatorDashboardInstall::getDashboard( 108 + $viewer, 109 + PhabricatorHomeApplication::DASHBOARD_DEFAULT, 110 + 'PhabricatorHomeApplication'); 111 + $href = PhabricatorEnv::getURI('/dashboard/'); 112 + if ($have_dashboard) { 108 113 $icon = 'fa-check'; 109 114 $icon_bg = 'bg-green'; 110 - $skip = null; 111 115 $description = pht( 112 - "You've created at least one project."); 116 + "You've created at least one dashboard."); 113 117 } else { 114 - $icon = 'fa-briefcase'; 118 + $icon = 'fa-dashboard'; 115 119 $icon_bg = 'bg-sky'; 116 - $skip = '#'; 117 120 $description = 118 - pht('Project tags define everything. Create them for teams, tags, '. 119 - 'or actual projects.'); 121 + pht('Customize the default homepage layout and items.'); 120 122 } 121 123 122 124 $item = id(new PhabricatorGuideItemView()) ··· 124 126 ->setHref($href) 125 127 ->setIcon($icon) 126 128 ->setIconBackground($icon_bg) 127 - ->setSkipHref($skip) 128 129 ->setDescription($description); 129 130 $guide_items->addItem($item); 130 131 131 132 132 - $title = pht('Build a Dashboard'); 133 - $dashboard_check = true; 134 - $href = PhabricatorEnv::getURI('/dashboard/'); 135 - if ($dashboard_check) { 133 + $title = pht('Personalize your Install'); 134 + $wordmark = PhabricatorEnv::getEnvConfig('ui.logo'); 135 + $href = PhabricatorEnv::getURI('/config/edit/ui.logo/'); 136 + if ($wordmark) { 136 137 $icon = 'fa-check'; 137 138 $icon_bg = 'bg-green'; 138 - $skip = null; 139 139 $description = pht( 140 - "You've created at least one dashboard."); 140 + 'It looks amazing, good work. Home Sweet Home.'); 141 141 } else { 142 - $icon = 'fa-dashboard'; 142 + $icon = 'fa-home'; 143 143 $icon_bg = 'bg-sky'; 144 - $skip = '#'; 145 144 $description = 146 - pht('Customize the default homepage layout and items.'); 145 + pht('Change the name and add your company logo, just to give it a '. 146 + 'little extra polish.'); 147 147 } 148 148 149 149 $item = id(new PhabricatorGuideItemView()) ··· 151 151 ->setHref($href) 152 152 ->setIcon($icon) 153 153 ->setIconBackground($icon_bg) 154 - ->setSkipHref($skip) 155 154 ->setDescription($description); 156 155 $guide_items->addItem($item); 157 156 157 + $title = pht('Explore Applications'); 158 + $href = PhabricatorEnv::getURI('/applications/'); 159 + $icon = 'fa-globe'; 160 + $icon_bg = 'bg-sky'; 161 + $description = 162 + pht('See all the applications included in Phabricator.'); 158 163 159 - $title = pht('Personalize your Install'); 160 - $ui_check = true; 161 - $href = PhabricatorEnv::getURI('/config/group/ui/'); 162 - if ($dashboard_check) { 163 - $icon = 'fa-check'; 164 - $icon_bg = 'bg-green'; 165 - $skip = null; 166 - $description = pht( 167 - 'It looks amazing, good work. Home Sweet Home.'); 168 - } else { 169 - $icon = 'fa-home'; 170 - $icon_bg = 'bg-sky'; 171 - $skip = '#'; 172 - $description = 173 - pht('Change the name and add your company logo, just to give it a '. 174 - 'little extra polish.'); 164 + $item = id(new PhabricatorGuideItemView()) 165 + ->setTitle($title) 166 + ->setHref($href) 167 + ->setIcon($icon) 168 + ->setIconBackground($icon_bg) 169 + ->setDescription($description); 170 + $guide_items->addItem($item); 171 + 172 + if (!$instance) { 173 + $title = pht('Invite Collaborators'); 174 + $people_check = id(new PhabricatorPeopleQuery()) 175 + ->setViewer($viewer) 176 + ->execute(); 177 + $people = count($people_check); 178 + $href = PhabricatorEnv::getURI('/people/invite/send/'); 179 + if ($people > 1) { 180 + $icon = 'fa-check'; 181 + $icon_bg = 'bg-green'; 182 + $description = pht( 183 + 'Your invitations have been accepted. You will not be alone on '. 184 + 'this journey.'); 185 + } else { 186 + $icon = 'fa-group'; 187 + $icon_bg = 'bg-sky'; 188 + $description = 189 + pht('Invite the rest of your team to get started on Phabricator.'); 190 + } 175 191 } 176 192 177 193 $item = id(new PhabricatorGuideItemView()) ··· 179 195 ->setHref($href) 180 196 ->setIcon($icon) 181 197 ->setIconBackground($icon_bg) 182 - ->setSkipHref($skip) 183 198 ->setDescription($description); 184 199 $guide_items->addItem($item); 185 200 186 - return $guide_items; 201 + $intro = pht( 202 + 'If your new to Phabricator, these optional steps can help you learn '. 203 + 'the basics. Conceptually, Phabricator is structured as a graph, and '. 204 + 'repositories, tasks, and projects are all independent from each other. '. 205 + 'Feel free to set up Phabricator for how you work best, and explore '. 206 + 'these features at your own pace.'); 207 + 208 + $intro = new PHUIRemarkupView($viewer, $intro); 209 + $intro = id(new PHUIDocumentViewPro()) 210 + ->appendChild($intro); 211 + 212 + return array($intro, $guide_items); 187 213 188 214 } 189 215
-34
src/applications/guides/module/PhabricatorGuideWelcomeModule.php
··· 1 - <?php 2 - 3 - final class PhabricatorGuideWelcomeModule extends PhabricatorGuideModule { 4 - 5 - public function getModuleKey() { 6 - return 'welcome'; 7 - } 8 - 9 - public function getModuleName() { 10 - return pht('Welcome'); 11 - } 12 - 13 - public function getModulePosition() { 14 - return 10; 15 - } 16 - 17 - public function renderModuleStatus(AphrontRequest $request) { 18 - $viewer = $request->getViewer(); 19 - 20 - $content = pht( 21 - 'You have successfully installed Phabricator. These next guides will '. 22 - 'take you through configuration and new user orientation. '. 23 - 'These steps are optional, and you can go through them in any order. '. 24 - 'If you want to get back to this guide later on, you can find it in '. 25 - 'the **Config** application under **Welcome Guide**.'); 26 - 27 - $content = new PHUIRemarkupView($viewer, $content); 28 - 29 - return id(new PHUIDocumentViewPro()) 30 - ->appendChild($content); 31 - 32 - } 33 - 34 - }
+2 -2
src/applications/home/controller/PhabricatorHomeMainController.php
··· 209 209 $content = pht(<<<EOT 210 210 Welcome to Phabricator, here are some links to get you started: 211 211 - [[ /config/ | Configure Phabricator ]] 212 - - [[ /config/welcome/ | Quick Start Guide ]] 212 + - [[ /guides/ | Quick Start Guide ]] 213 213 - [[ /diffusion/ | Create a Repository ]] 214 214 - [[ /people/invite/send/ | Invite People ]] 215 215 - [[ https://twitter.com/phabricator/ | Follow us on Twitter ]] ··· 218 218 } else { 219 219 $content = pht(<<<EOT 220 220 Welcome to Phabricator, here are some links to get you started: 221 - - [[ /config/welcome/ | Quick Start Guide ]] 221 + - [[ /guides/ | Quick Start Guide ]] 222 222 - [[ /diffusion/ | Create a Repository ]] 223 223 - [[ https://twitter.com/phabricator/ | Follow us on Twitter ]] 224 224 EOT
+7 -3
src/view/layout/AphrontSideNavFilterView.php
··· 95 95 return $this->menu; 96 96 } 97 97 98 - public function addFilter($key, $name, $uri = null) { 98 + public function addFilter($key, $name, $uri = null, $icon = null) { 99 99 return $this->addThing( 100 - $key, $name, $uri, PHUIListItemView::TYPE_LINK); 100 + $key, $name, $uri, PHUIListItemView::TYPE_LINK, $icon); 101 101 } 102 102 103 103 public function addButton($key, $name, $uri = null) { ··· 105 105 $key, $name, $uri, PHUIListItemView::TYPE_BUTTON); 106 106 } 107 107 108 - private function addThing($key, $name, $uri, $type) { 108 + private function addThing($key, $name, $uri, $type, $icon) { 109 109 $item = id(new PHUIListItemView()) 110 110 ->setName($name) 111 111 ->setType($type); 112 + 113 + if (strlen($icon)) { 114 + $item->setIcon($icon); 115 + } 112 116 113 117 114 118 if (strlen($key)) {
-28
webroot/rsrc/css/application/config/config-welcome.css
··· 1 - /** 2 - * @provides config-welcome-css 3 - */ 4 - 5 - .phui-document-content .config-welcome-box .phabricator-remarkup { 6 - padding: 0 16px 16px; 7 - position: relative; 8 - } 9 - 10 - .config-welcome-box { 11 - padding: 8px 0; 12 - } 13 - 14 - .config-welcome-content { 15 - margin-left: 44px; 16 - } 17 - 18 - .config-welcome-box .config-welcome-icon { 19 - width: 32px; 20 - float: left; 21 - text-align: center; 22 - } 23 - 24 - .phui-document-view-pro .phui-document-content .config-welcome-box 25 - .phabricator-remarkup { 26 - margin: 0; 27 - padding: 0; 28 - }