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

Improving UX for ignoring timezone conflicts

Summary:
When there is a new timezone conflict, you will be able to ignore it with a checkbox.
Fix T15349

Preview:

{F343198}

Test Plan: Having a conflicting timezone, click the notification so the usual popup appears. There is a checkbox, leave it checked to ignore the current conflict, uncheck to manually resolve the conflict by selecting one of the available timezones.

Reviewers: O1 Blessed Committers, valerio.bozzolan, avivey

Reviewed By: O1 Blessed Committers, valerio.bozzolan, avivey

Subscribers: speck, waldyrious, avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15349

Differential Revision: https://we.phorge.it/D25420

+16 -6
+16 -6
src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
··· 31 31 $did_calibrate = false; 32 32 if ($request->isFormPost()) { 33 33 $timezone = $request->getStr('timezone'); 34 + $ignore_conflict_checkbox = $request->getInt('ignoreConflict'); 34 35 35 36 $pref_ignore = PhabricatorTimezoneIgnoreOffsetSetting::SETTINGKEY; 36 37 $pref_timezone = PhabricatorTimezoneSetting::SETTINGKEY; 37 38 38 - if ($timezone == 'ignore') { 39 + if ($timezone === 'ignore' || $ignore_conflict_checkbox) { 39 40 $this->writeSettings( 40 41 array( 41 42 $pref_ignore => $client_offset, ··· 83 84 $guess = 'ignore'; 84 85 } 85 86 86 - $current_zone = $viewer->getTimezoneIdentifier(); 87 - $current_zone = phutil_tag('strong', array(), $current_zone); 87 + $current_zone_identifier = $viewer->getTimezoneIdentifier(); 88 + $current_zone_formatted = phutil_tag( 89 + 'strong', 90 + array(), 91 + $current_zone_identifier); 88 92 89 93 $form = id(new AphrontFormView()) 90 94 ->appendChild( 91 95 id(new AphrontFormMarkupControl()) 92 96 ->setLabel(pht('Current Setting')) 93 - ->setValue($current_zone)) 97 + ->setValue($current_zone_formatted)) 94 98 ->appendChild( 95 99 id(new AphrontFormSelectControl()) 96 100 ->setName('timezone') 97 101 ->setLabel(pht('New Setting')) 98 102 ->setOptions($options) 99 - ->setValue($guess)); 103 + ->setValue($guess)) 104 + ->appendChild(id(new AphrontFormCheckboxControl()) 105 + ->addCheckbox( 106 + 'ignoreConflict', 107 + 1, 108 + pht('Ignore New Setting and Keep %s', $current_zone_identifier))); 109 + 100 110 101 111 return $this->newDialog() 102 112 ->setTitle(pht('Adjust Timezone')) ··· 110 120 $this->formatOffset($server_offset))) 111 121 ->appendForm($form) 112 122 ->addCancelButton(pht('Cancel')) 113 - ->addSubmitButton(pht('Change Timezone')); 123 + ->addSubmitButton(pht('Confirm')); 114 124 } 115 125 116 126 private function formatOffset($offset) {