Just a small touch up to move this to edit engine.
Details
Details
- Reviewers
epriestley - Commits
- rPd467a9e3378c: Modernize PonderQuestion with EditEngine
- Create a question
- Edit a question
- Close question
- Test NUX state
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- ponder-answer-feed (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 16757 Build 22356: Run Core Tests Build 22355: arc lint + arc unit
Event Timeline
Comment Actions
I can't get this to work, obviously every conversion comes with little bugs. Specifically I get "bad setter call getEditPolicy" which isn't set because we use a moderator policy for Ponder. It's automatically being set on the EditEngine and I'm not sure how to decline setting it.
Comment Actions
I think the issue is that PonderQuestionEditor->getTransactionTypes() currently looks like this:
public function getTransactionTypes() {
$types = parent::getTransactionTypes();
$types[] = PhabricatorTransactions::TYPE_COMMENT;
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
$types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
$types[] = PhabricatorTransactions::TYPE_SPACE;
return $types;
}I believe:
- COMMENT and SPACE get determined automatically by using instanceof to identify interfaces the object implements, and can be removed.
- EDIT is wrong (you can not edit the edit policy of a question) and should be removed.
- VIEW is correct.
Removing EDIT should fix the getEditPolicy() issue, I think.
| src/applications/ponder/editor/PonderQuestionEditor.php | ||
|---|---|---|
| 76 | Comment also still needed, not modernized. | |
Comment Actions
I considered trying to vet this thoroughly locally but I imagine I'll just hit 200 pre-existing bugs and we're better off not knowing they exist.