Page MenuHomePhabricator

Implements Spaces application in Slowvote
ClosedPublic

Authored by SalmonKiller on Jul 2 2015, 11:38 PM.

Details

Reviewers
epriestley
lpriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rPa40437a5310a: Implements Spaces application in Slowvote
Summary

Implements T8733

Test Plan

Verify that spaces policies can be implemented in the creation and editing of polls.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SalmonKiller retitled this revision from to Implements Spaces application in Slowvote.
SalmonKiller updated this object.
SalmonKiller edited the test plan for this revision. (Show Details)
epriestley edited edge metadata.
  • Does the Slowvote list view correctly show spaces?
  • Does the Slowvote detail view correctly show spaces?

Specifically, the space name should be shown like this ("Dark Secrets") in those views for objects in a non-default space:

src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
48

Prefer $v_space for consistency. ("v" = "value", i.e. these get passed to setNewValue() later).

src/applications/slowvote/storage/PhabricatorSlowvotePoll.php
206

Shorten by 2 characters.

This revision now requires changes to proceed.Jul 3 2015, 12:02 AM
SalmonKiller edited edge metadata.

Implemented changes suggested by epriestley.

epriestley edited edge metadata.

Two really minor things. Specifically, the behavior we want is:

  • Select a space (say, S123).
  • Make an error filling out the form (say, forget to provide a title).
  • Hit submit.

Desired behavior:

  • Form comes back with an error, but your selection (S123) is preserved, so you don't need to re-select it: you only need to fix your error.

Expected behavior under this change:

  • Form comes back with an error, but also loses your space selection.

The two inlines will fix this so the user's choice is preserved even if they make a mistake somewhere else on the form.

src/applications/slowvote/controller/PhabricatorSlowvoteEditController.php
63

Should be $v_space.

255

This should setSpacePHID($v_space).

This revision now requires changes to proceed.Jul 6 2015, 7:20 PM
SalmonKiller edited edge metadata.

Implemented changes suggested by epriestley

This revision is now accepted and ready to land.Jul 14 2015, 2:45 PM
This revision was automatically updated to reflect the committed changes.