Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13963701
D10926.id26245.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D10926.id26245.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => '00cd55eb',
- 'core.pkg.js' => 'e64447dc',
+ 'core.pkg.js' => '404c3c02',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '8af45893',
'differential.pkg.js' => '42c10e78',
@@ -371,7 +371,6 @@
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '00861799',
'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492',
'rsrc/js/application/differential/behavior-populate.js' => 'bdb3e4d0',
- 'rsrc/js/application/differential/behavior-show-all-comments.js' => '7c273581',
'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf',
'rsrc/js/application/differential/behavior-show-more.js' => 'dd7e8ef5',
'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb',
@@ -624,7 +623,6 @@
'javelin-behavior-phabricator-remarkup-assist' => 'e32d14ab',
'javelin-behavior-phabricator-reveal-content' => '60821bc7',
'javelin-behavior-phabricator-search-typeahead' => '724b1247',
- 'javelin-behavior-phabricator-show-all-transactions' => '7c273581',
'javelin-behavior-phabricator-show-older-transactions' => 'c30ccda9',
'javelin-behavior-phabricator-tooltips' => '3ee3408b',
'javelin-behavior-phabricator-transaction-comment-form' => '9f7309fb',
@@ -1333,11 +1331,6 @@
'javelin-stratcom',
'javelin-util',
),
- '7c273581' => array(
- 'javelin-behavior',
- 'javelin-stratcom',
- 'javelin-dom',
- ),
'7cbe244b' => array(
'javelin-install',
'javelin-util',
@@ -2095,7 +2088,7 @@
'javelin-fx',
'phabricator-draggable-list',
'javelin-behavior-phabricator-transaction-list',
- 'javelin-behavior-phabricator-show-all-transactions',
+ 'javelin-behavior-phabricator-show-older-transactions',
'javelin-behavior-phui-timeline-dropdown-menu',
'javelin-behavior-doorkeeper-tag',
),
diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php
--- a/resources/celerity/packages.php
+++ b/resources/celerity/packages.php
@@ -66,7 +66,7 @@
'javelin-fx',
'phabricator-draggable-list',
'javelin-behavior-phabricator-transaction-list',
- 'javelin-behavior-phabricator-show-all-transactions',
+ 'javelin-behavior-phabricator-show-older-transactions',
'javelin-behavior-phui-timeline-dropdown-menu',
'javelin-behavior-doorkeeper-tag',
),
diff --git a/src/view/phui/PHUITimelineView.php b/src/view/phui/PHUITimelineView.php
--- a/src/view/phui/PHUITimelineView.php
+++ b/src/view/phui/PHUITimelineView.php
@@ -76,73 +76,25 @@
}
$events = array();
- if ($hide) {
- if ($this->getPager()) {
-
- $events[] = javelin_tag(
- 'div',
- array(
- 'sigil' => 'show-older-block',
- 'class' => 'phui-timeline-older-transactions-are-hidden',
- ),
- array(
- pht('Older changes are hidden. '),
- ' ',
- javelin_tag(
- 'a',
- array(
+ if ($hide && $this->getPager()) {
+ $events[] = javelin_tag(
+ 'div',
+ array(
+ 'sigil' => 'show-older-block',
+ 'class' => 'phui-timeline-older-transactions-are-hidden',
+ ),
+ array(
+ pht('Older changes are hidden. '),
+ ' ',
+ javelin_tag(
+ 'a',
+ array(
'href' => (string) $this->getPager()->getNextPageURI(),
'mustcapture' => true,
'sigil' => 'show-older-link',
),
pht('Show older changes.')),
- ));
-
- } else {
-
- $hidden = phutil_implode_html($spacer, $hide);
- $count = count($hide);
-
- $show_id = celerity_generate_unique_node_id();
- $hide_id = celerity_generate_unique_node_id();
- $link_id = celerity_generate_unique_node_id();
-
- Javelin::initBehavior(
- 'phabricator-show-all-transactions',
- array(
- 'anchors' => array_filter(mpull($hide, 'getAnchor')),
- 'linkID' => $link_id,
- 'hideID' => $hide_id,
- 'showID' => $show_id,
- ));
-
- $events[] = phutil_tag(
- 'div',
- array(
- 'id' => $hide_id,
- 'class' => 'phui-timeline-older-transactions-are-hidden',
- ),
- array(
- pht('%s older changes(s) are hidden.', new PhutilNumber($count)),
- ' ',
- javelin_tag(
- 'a',
- array(
- 'href' => '#',
- 'mustcapture' => true,
- 'id' => $link_id,
- ),
- pht('Show all changes.')),
- ));
-
- $events[] = phutil_tag(
- 'div',
- array(
- 'id' => $show_id,
- 'style' => 'display: none',
- ),
- $hidden);
- }
+ ));
}
if ($hide && $show) {
diff --git a/webroot/rsrc/js/application/differential/behavior-show-all-comments.js b/webroot/rsrc/js/application/differential/behavior-show-all-comments.js
deleted file mode 100644
--- a/webroot/rsrc/js/application/differential/behavior-show-all-comments.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @provides javelin-behavior-phabricator-show-all-transactions
- * @requires javelin-behavior
- * javelin-stratcom
- * javelin-dom
- */
-
-/**
- * Automatically show older transactions if the user follows an anchor to a
- * transaction which is hidden by the "N older changes are hidden." shield.
- */
-JX.behavior('phabricator-show-all-transactions', function(config) {
-
- var revealed = false;
-
- function get_hash() {
- return window.location.hash.replace(/^#/, '');
- }
-
- function hash_is_hidden() {
- var hash = get_hash();
- for (var ii = 0; ii < config.anchors.length; ii++) {
- if (config.anchors[ii] == hash) {
- return true;
- }
- }
- return false;
- }
-
- function reveal() {
- if (revealed) {
- return false;
- }
-
- JX.DOM.hide(JX.$(config.hideID));
- JX.DOM.show(JX.$(config.showID));
- revealed = true;
-
- return true;
- }
-
- function check_hash() {
- if (hash_is_hidden()) {
- if (reveal()) {
- try {
- var target = JX.$(get_hash());
- JX.DOM.scrollTo(target);
- } catch (ignored) {
- // We did our best.
- }
- }
- }
- }
-
- JX.DOM.listen(
- JX.$(config.linkID),
- 'click',
- null,
- function (e) {
- e.kill();
- reveal();
- });
-
- JX.Stratcom.listen('hashchange', null, check_hash);
- check_hash();
-});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 16 2024, 5:22 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718381
Default Alt Text
D10926.id26245.diff (6 KB)
Attached To
Mode
D10926: Transactions - kill the old "show all" code pathways
Attached
Detach File
Event Timeline
Log In to Comment