@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.

Randomsauce - make the align-rightness of PhabricatorDropdownMenu configurable

Summary: using this for the Conpherence drop down menu and it should be left aligned. This makes that work.

Test Plan: using it in conpherence and it aligns how I want it. also still aligns right in other existing usage spot - differential

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

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

+16 -4
+16 -4
webroot/rsrc/js/core/DropdownMenu.js
··· 45 45 _menu : null, 46 46 _open : false, 47 47 _items : null, 48 + _alignRight : true, 49 + 50 + // By default, the dropdown will have its right edge aligned with the 51 + // right edge of _node. Making this false does left edge alignment 52 + toggleAlignDropdownRight : function (bool) { 53 + this._alignRight = bool; 54 + }, 48 55 49 56 open : function() { 50 57 if (this._open) { ··· 127 134 128 135 var m = JX.Vector.getDim(this._menu); 129 136 130 - JX.$V(this._node) 131 - .add(JX.Vector.getDim(this._node)) 132 - .add(JX.$V(-m.x, 0)) 133 - .setPos(this._menu); 137 + var v = JX.$V(this._node); 138 + var d = JX.Vector.getDim(this._node); 139 + if (this._alignRight) { 140 + v = v.add(d) 141 + .add(JX.$V(-m.x, 0)); 142 + } else { 143 + v = v.add(0, d.y); 144 + } 145 + v.setPos(this._menu); 134 146 135 147 JX.DOM.alterClass(this._node, 'dropdown-open', true); 136 148 },