Skip to content

Commit 8a906b0

Browse files
author
epriestley
committedDec 11, 2015
Remove skins from Phame
Summary: Ref T9897. Purge a bunch of stuff: - Remove skins. - Remove all custom sites for skin resources. - Remove "framed", "notlive", "preview", separate "live" controllers (see below). - Merge "publish" and "unpublish" controllers into one. New behavior: - Blogs and posts have three views: - "View": Internal view URI, which is a normal detail page. - "Internal Live": Internal view URI which is a little prettier. - "External Live": External view URI for an external domain. Right now, the differences are pretty minor (basically, different crumbs/chrome). This mostly gives us room to put some milder flavor of skins back later (photography or more "presentation" elements, for example). This removes 9 million lines of code so I probably missed a couple of things, but I think it's like 95% of the way there. Test Plan: Here are some examples of what the "view", "internal" and "external" views look like for blogs (posts are similar): "View": Unchanged {F1021634} "Internal": No chrome or footer. Still write actions (edit, post commments). Has crumbs to get back into Phame. {F1021635} "External": No chrome or footer. No write actions. No Phabricator crumbs. No policy/status information. {F1021638} I figure we'll probably tweak these a bit to figure out what makes sense (like: maybe no actions on "internal, live"? and "external, live" probably needs a way to set a root "Company >" crumb?) but that they're reasonable-ish as a first cut? Reviewers: chad Reviewed By: chad Maniphest Tasks: T9897 Differential Revision: https://secure.phabricator.com/D14740
1 parent c62e0a1 commit 8a906b0

35 files changed

+450
-1731
lines changed
 

‎externals/skins/oblivious/404.php

-1
This file was deleted.

‎externals/skins/oblivious/css/oblivious.css

-76
This file was deleted.

‎externals/skins/oblivious/footer.php

-3
This file was deleted.

‎externals/skins/oblivious/header.php

-18
This file was deleted.
-1.8 KB
Binary file not shown.

‎externals/skins/oblivious/post-detail.php

-1
This file was deleted.

‎externals/skins/oblivious/post-list.php

-13
This file was deleted.

‎externals/skins/oblivious/skin.json

-3
This file was deleted.

‎src/__phutil_library_map__.php

+4-28
Original file line numberDiff line numberDiff line change
@@ -2928,7 +2928,6 @@
29282928
'PhabricatorRepositoryVCSPassword' => 'applications/repository/storage/PhabricatorRepositoryVCSPassword.php',
29292929
'PhabricatorRepositoryVersion' => 'applications/repository/constants/PhabricatorRepositoryVersion.php',
29302930
'PhabricatorRequestExceptionHandler' => 'aphront/handler/PhabricatorRequestExceptionHandler.php',
2931-
'PhabricatorResourceSite' => 'aphront/site/PhabricatorResourceSite.php',
29322931
'PhabricatorRobotsController' => 'applications/system/controller/PhabricatorRobotsController.php',
29332932
'PhabricatorS3FileStorageEngine' => 'applications/files/engine/PhabricatorS3FileStorageEngine.php',
29342933
'PhabricatorSMS' => 'infrastructure/sms/storage/PhabricatorSMS.php',
@@ -3308,8 +3307,6 @@
33083307
'PhabricatorXHProfSample' => 'applications/xhprof/storage/PhabricatorXHProfSample.php',
33093308
'PhabricatorXHProfSampleListController' => 'applications/xhprof/controller/PhabricatorXHProfSampleListController.php',
33103309
'PhabricatorYoutubeRemarkupRule' => 'infrastructure/markup/rule/PhabricatorYoutubeRemarkupRule.php',
3311-
'PhameBasicBlogSkin' => 'applications/phame/skins/PhameBasicBlogSkin.php',
3312-
'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php',
33133310
'PhameBlog' => 'applications/phame/storage/PhameBlog.php',
33143311
'PhameBlogArchiveController' => 'applications/phame/controller/blog/PhameBlogArchiveController.php',
33153312
'PhameBlogController' => 'applications/phame/controller/blog/PhameBlogController.php',
@@ -3318,55 +3315,46 @@
33183315
'PhameBlogEditor' => 'applications/phame/editor/PhameBlogEditor.php',
33193316
'PhameBlogFeedController' => 'applications/phame/controller/blog/PhameBlogFeedController.php',
33203317
'PhameBlogListController' => 'applications/phame/controller/blog/PhameBlogListController.php',
3321-
'PhameBlogLiveController' => 'applications/phame/controller/blog/PhameBlogLiveController.php',
33223318
'PhameBlogManageController' => 'applications/phame/controller/blog/PhameBlogManageController.php',
33233319
'PhameBlogProfilePictureController' => 'applications/phame/controller/blog/PhameBlogProfilePictureController.php',
33243320
'PhameBlogQuery' => 'applications/phame/query/PhameBlogQuery.php',
33253321
'PhameBlogReplyHandler' => 'applications/phame/mail/PhameBlogReplyHandler.php',
33263322
'PhameBlogSearchEngine' => 'applications/phame/query/PhameBlogSearchEngine.php',
33273323
'PhameBlogSite' => 'applications/phame/site/PhameBlogSite.php',
3328-
'PhameBlogSkin' => 'applications/phame/skins/PhameBlogSkin.php',
33293324
'PhameBlogTransaction' => 'applications/phame/storage/PhameBlogTransaction.php',
33303325
'PhameBlogTransactionQuery' => 'applications/phame/query/PhameBlogTransactionQuery.php',
33313326
'PhameBlogViewController' => 'applications/phame/controller/blog/PhameBlogViewController.php',
3332-
'PhameCelerityResources' => 'applications/phame/celerity/PhameCelerityResources.php',
33333327
'PhameConduitAPIMethod' => 'applications/phame/conduit/PhameConduitAPIMethod.php',
33343328
'PhameConstants' => 'applications/phame/constants/PhameConstants.php',
33353329
'PhameController' => 'applications/phame/controller/PhameController.php',
33363330
'PhameCreatePostConduitAPIMethod' => 'applications/phame/conduit/PhameCreatePostConduitAPIMethod.php',
33373331
'PhameDAO' => 'applications/phame/storage/PhameDAO.php',
33383332
'PhameDescriptionView' => 'applications/phame/view/PhameDescriptionView.php',
33393333
'PhameHomeController' => 'applications/phame/controller/PhameHomeController.php',
3334+
'PhameLiveController' => 'applications/phame/controller/PhameLiveController.php',
33403335
'PhamePost' => 'applications/phame/storage/PhamePost.php',
33413336
'PhamePostCommentController' => 'applications/phame/controller/post/PhamePostCommentController.php',
33423337
'PhamePostController' => 'applications/phame/controller/post/PhamePostController.php',
33433338
'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php',
33443339
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
3345-
'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php',
33463340
'PhamePostHistoryController' => 'applications/phame/controller/post/PhamePostHistoryController.php',
33473341
'PhamePostListController' => 'applications/phame/controller/post/PhamePostListController.php',
33483342
'PhamePostListView' => 'applications/phame/view/PhamePostListView.php',
33493343
'PhamePostMailReceiver' => 'applications/phame/mail/PhamePostMailReceiver.php',
33503344
'PhamePostMoveController' => 'applications/phame/controller/post/PhamePostMoveController.php',
33513345
'PhamePostNewController' => 'applications/phame/controller/post/PhamePostNewController.php',
3352-
'PhamePostNotLiveController' => 'applications/phame/controller/post/PhamePostNotLiveController.php',
3353-
'PhamePostPreviewController' => 'applications/phame/controller/post/PhamePostPreviewController.php',
33543346
'PhamePostPublishController' => 'applications/phame/controller/post/PhamePostPublishController.php',
33553347
'PhamePostQuery' => 'applications/phame/query/PhamePostQuery.php',
33563348
'PhamePostReplyHandler' => 'applications/phame/mail/PhamePostReplyHandler.php',
33573349
'PhamePostSearchEngine' => 'applications/phame/query/PhamePostSearchEngine.php',
33583350
'PhamePostTransaction' => 'applications/phame/storage/PhamePostTransaction.php',
33593351
'PhamePostTransactionComment' => 'applications/phame/storage/PhamePostTransactionComment.php',
33603352
'PhamePostTransactionQuery' => 'applications/phame/query/PhamePostTransactionQuery.php',
3361-
'PhamePostUnpublishController' => 'applications/phame/controller/post/PhamePostUnpublishController.php',
3362-
'PhamePostView' => 'applications/phame/view/PhamePostView.php',
33633353
'PhamePostViewController' => 'applications/phame/controller/post/PhamePostViewController.php',
33643354
'PhameQueryConduitAPIMethod' => 'applications/phame/conduit/PhameQueryConduitAPIMethod.php',
33653355
'PhameQueryPostsConduitAPIMethod' => 'applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php',
3366-
'PhameResourceController' => 'applications/phame/controller/PhameResourceController.php',
33673356
'PhameSchemaSpec' => 'applications/phame/storage/PhameSchemaSpec.php',
33683357
'PhameSite' => 'applications/phame/site/PhameSite.php',
3369-
'PhameSkinSpecification' => 'applications/phame/skins/PhameSkinSpecification.php',
33703358
'PhluxController' => 'applications/phlux/controller/PhluxController.php',
33713359
'PhluxDAO' => 'applications/phlux/storage/PhluxDAO.php',
33723360
'PhluxEditController' => 'applications/phlux/controller/PhluxEditController.php',
@@ -7222,7 +7210,6 @@
72227210
'PhabricatorRepositoryVCSPassword' => 'PhabricatorRepositoryDAO',
72237211
'PhabricatorRepositoryVersion' => 'Phobject',
72247212
'PhabricatorRequestExceptionHandler' => 'AphrontRequestExceptionHandler',
7225-
'PhabricatorResourceSite' => 'PhabricatorSite',
72267213
'PhabricatorRobotsController' => 'PhabricatorController',
72277214
'PhabricatorS3FileStorageEngine' => 'PhabricatorFileStorageEngine',
72287215
'PhabricatorSMS' => 'PhabricatorSMSDAO',
@@ -7650,8 +7637,6 @@
76507637
'PhabricatorXHProfSample' => 'PhabricatorXHProfDAO',
76517638
'PhabricatorXHProfSampleListController' => 'PhabricatorXHProfController',
76527639
'PhabricatorYoutubeRemarkupRule' => 'PhutilRemarkupRule',
7653-
'PhameBasicBlogSkin' => 'PhameBlogSkin',
7654-
'PhameBasicTemplateBlogSkin' => 'PhameBasicBlogSkin',
76557640
'PhameBlog' => array(
76567641
'PhameDAO',
76577642
'PhabricatorPolicyInterface',
@@ -7669,25 +7654,23 @@
76697654
'PhameBlogEditor' => 'PhabricatorApplicationTransactionEditor',
76707655
'PhameBlogFeedController' => 'PhameBlogController',
76717656
'PhameBlogListController' => 'PhameBlogController',
7672-
'PhameBlogLiveController' => 'PhameBlogController',
76737657
'PhameBlogManageController' => 'PhameBlogController',
76747658
'PhameBlogProfilePictureController' => 'PhameBlogController',
76757659
'PhameBlogQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
76767660
'PhameBlogReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
76777661
'PhameBlogSearchEngine' => 'PhabricatorApplicationSearchEngine',
76787662
'PhameBlogSite' => 'PhameSite',
7679-
'PhameBlogSkin' => 'PhabricatorController',
76807663
'PhameBlogTransaction' => 'PhabricatorApplicationTransaction',
76817664
'PhameBlogTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
7682-
'PhameBlogViewController' => 'PhameBlogController',
7683-
'PhameCelerityResources' => 'CelerityResources',
7665+
'PhameBlogViewController' => 'PhameLiveController',
76847666
'PhameConduitAPIMethod' => 'ConduitAPIMethod',
76857667
'PhameConstants' => 'Phobject',
76867668
'PhameController' => 'PhabricatorController',
76877669
'PhameCreatePostConduitAPIMethod' => 'PhameConduitAPIMethod',
76887670
'PhameDAO' => 'PhabricatorLiskDAO',
76897671
'PhameDescriptionView' => 'AphrontTagView',
76907672
'PhameHomeController' => 'PhamePostController',
7673+
'PhameLiveController' => 'PhameController',
76917674
'PhamePost' => array(
76927675
'PhameDAO',
76937676
'PhabricatorPolicyInterface',
@@ -7703,31 +7686,24 @@
77037686
'PhamePostController' => 'PhameController',
77047687
'PhamePostEditController' => 'PhamePostController',
77057688
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
7706-
'PhamePostFramedController' => 'PhamePostController',
77077689
'PhamePostHistoryController' => 'PhamePostController',
77087690
'PhamePostListController' => 'PhamePostController',
77097691
'PhamePostListView' => 'AphrontTagView',
77107692
'PhamePostMailReceiver' => 'PhabricatorObjectMailReceiver',
77117693
'PhamePostMoveController' => 'PhamePostController',
77127694
'PhamePostNewController' => 'PhamePostController',
7713-
'PhamePostNotLiveController' => 'PhamePostController',
7714-
'PhamePostPreviewController' => 'PhamePostController',
77157695
'PhamePostPublishController' => 'PhamePostController',
77167696
'PhamePostQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
77177697
'PhamePostReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
77187698
'PhamePostSearchEngine' => 'PhabricatorApplicationSearchEngine',
77197699
'PhamePostTransaction' => 'PhabricatorApplicationTransaction',
77207700
'PhamePostTransactionComment' => 'PhabricatorApplicationTransactionComment',
77217701
'PhamePostTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
7722-
'PhamePostUnpublishController' => 'PhamePostController',
7723-
'PhamePostView' => 'AphrontView',
7724-
'PhamePostViewController' => 'PhamePostController',
7702+
'PhamePostViewController' => 'PhameLiveController',
77257703
'PhameQueryConduitAPIMethod' => 'PhameConduitAPIMethod',
77267704
'PhameQueryPostsConduitAPIMethod' => 'PhameConduitAPIMethod',
7727-
'PhameResourceController' => 'CelerityResourceController',
77287705
'PhameSchemaSpec' => 'PhabricatorConfigSchemaSpec',
77297706
'PhameSite' => 'PhabricatorSite',
7730-
'PhameSkinSpecification' => 'Phobject',
77317707
'PhluxController' => 'PhabricatorController',
77327708
'PhluxDAO' => 'PhabricatorLiskDAO',
77337709
'PhluxEditController' => 'PhluxController',

‎src/aphront/site/PhabricatorResourceSite.php

-41
This file was deleted.

‎src/applications/phame/application/PhabricatorPhameApplication.php

+13-16
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,30 @@ public function getRoutes() {
3939
return array(
4040
'/phame/' => array(
4141
'' => 'PhameHomeController',
42-
'live/(?P<id>[^/]+)/(?P<more>.*)' => 'PhameBlogLiveController',
42+
43+
// NOTE: The live routes include an initial "/", so leave it off
44+
// this route.
45+
'(?P<live>live)/(?P<blogID>[^/]+)' => $this->getLiveRoutes(),
4346
'post/' => array(
44-
'(?:(?P<filter>draft|all)/)?' => 'PhamePostListController',
4547
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhamePostListController',
4648
'blogger/(?P<bloggername>[\w\.-_]+)/' => 'PhamePostListController',
4749
'edit/(?:(?P<id>[^/]+)/)?' => 'PhamePostEditController',
4850
'history/(?P<id>\d+)/' => 'PhamePostHistoryController',
49-
'view/(?P<id>\d+)/' => 'PhamePostViewController',
50-
'view/(?P<id>\d+)/(?P<slug>[^/]+)/' => 'PhamePostViewController',
51-
'publish/(?P<id>\d+)/' => 'PhamePostPublishController',
51+
'view/(?P<id>\d+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
52+
'(?P<action>publish|unpublish)/(?P<id>\d+)/'
53+
=> 'PhamePostPublishController',
5254
'preview/(?P<id>\d+)/' => 'PhamePostPreviewController',
53-
'unpublish/(?P<id>\d+)/' => 'PhamePostUnpublishController',
54-
'notlive/(?P<id>\d+)/' => 'PhamePostNotLiveController',
5555
'preview/' => 'PhabricatorMarkupPreviewController',
5656
'framed/(?P<id>\d+)/' => 'PhamePostFramedController',
5757
'new/' => 'PhamePostNewController',
5858
'move/(?P<id>\d+)/' => 'PhamePostMoveController',
5959
'comment/(?P<id>[1-9]\d*)/' => 'PhamePostCommentController',
6060
),
6161
'blog/' => array(
62-
'(?:(?P<filter>user|all)/)?' => 'PhameBlogListController',
6362
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhameBlogListController',
6463
'archive/(?P<id>[^/]+)/' => 'PhameBlogArchiveController',
6564
'edit/(?P<id>[^/]+)/' => 'PhameBlogEditController',
66-
'view/(?P<id>[^/]+)/' => 'PhameBlogViewController',
65+
'view/(?P<blogID>[^/]+)/' => 'PhameBlogViewController',
6766
'manage/(?P<id>[^/]+)/' => 'PhameBlogManageController',
6867
'feed/(?P<id>[^/]+)/' => 'PhameBlogFeedController',
6968
'new/' => 'PhameBlogEditController',
@@ -87,16 +86,14 @@ private function getResourceSubroutes() {
8786
}
8887

8988
public function getBlogRoutes() {
90-
return array(
91-
'/(?P<more>.*)' => 'PhameBlogLiveController',
92-
);
89+
return $this->getLiveRoutes();
9390
}
9491

95-
public function getBlogCDNRoutes() {
92+
private function getLiveRoutes() {
9693
return array(
97-
'/phame/' => array(
98-
'r/(?P<id>\d+)/(?P<hash>[^/]+)/(?P<name>.*)' =>
99-
'PhameResourceController',
94+
'/' => array(
95+
'' => 'PhameBlogViewController',
96+
'post/(?P<id>[^/]+)/(?:(?P<slug>[^/]+)/)?' => 'PhamePostViewController',
10097
),
10198
);
10299
}

0 commit comments

Comments
 (0)
Failed to load comments.