Page MenuHomePhabricator

Continue modernizing application access to user preferences
ClosedPublic

Authored by epriestley on Jun 3 2016, 12:56 AM.
Tags
None
Referenced Files
F14062705: D16015.diff
Mon, Nov 18, 1:45 PM
F14046798: D16015.diff
Wed, Nov 13, 11:46 PM
F14033699: D16015.diff
Sat, Nov 9, 7:26 PM
F14021978: D16015.diff
Wed, Nov 6, 2:14 PM
F14014985: D16015.id38569.diff
Sun, Nov 3, 11:38 AM
F14001385: D16015.id38569.diff
Fri, Oct 25, 7:13 AM
Unknown Object (File)
Oct 2 2024, 8:14 AM
Unknown Object (File)
Sep 14 2024, 3:33 AM
Subscribers
None

Details

Summary

Ref T4103. This is just incremental cleanup:

  • Add "internal" settings, which aren't editable via the UI. They can still do validation and run through the normal pathway. Move a couple settings to use this.
  • Remove getPreference() on PhabricatorUser, which was a sort of prototype version of getUserSetting().
  • Make getUserSetting() validate setting values before returning them, to improve robustness if we change allowable values later.
  • Add a user setting cache, since reading user settings was getting fairly expensive on Calendar.
  • Improve performance of setting validation for timezone setting (don't require building/computing all timezone offsets).
  • Since we have the cache anyway, make the timezone override a little more general in its approach.
  • Move editor stuff to use getUserSetting().
Test Plan
  • Changed search scopes.
  • Reconciled local and server timezone settings by ignoring and changing timezones.
  • Changed date/time settings, browsed Calendar, queried date ranges.
  • Verified editor links generate properly in Diffusion.
  • Browsed around with time/date settings looking at timestamps.
  • Grepped for getPreference(), nuked all the ones coming off $user or $viewer that I could find.
  • Changed accessiblity to high-contrast colors.
  • Ran all unit tests.
  • Grepped for removed constants.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Continue modernizing application access to user preferences.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/applications/people/storage/PhabricatorUser.php
861–863

This change is pretty much what this comment was anticipating.

src/view/form/control/AphrontFormDateControl.php
116

This fixes a bug with initial values in date controls with 24-hour time.

chad edited edge metadata.
This revision is now accepted and ready to land.Jun 3 2016, 1:37 AM
codeforuk edited edge metadata.
This revision was automatically updated to reflect the committed changes.