Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T4558: Make Diviner useful for third-parties
This doesn't quite work yet.
Diff Detail
- Repository
- rP Phabricator
- Branch
- master
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 6705 Build 6727: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
I'm not sure if this is actually valuable, I was just mucking around with various pieces of infrastructure.
Generally looks good to me. Probably needs a Query integration (withIsArchived(null|true|false) or withStatuses($statuses)?) and a SearchEngine integration (there's some new infrastructure here, check Paste/Macro/People if you want to try modernizing).
resources/sql/autopatches/20150612.diviner.status.sql | ||
---|---|---|
2 | Use {$COLLATE_TEXT} instead of literal utf8mb4_bin. | |
4–6 | I think IS NULL will match nothing since the column is NOT NULL -- you can use = "" instead. | |
src/applications/diviner/constants/DivinerBookStatus.php | ||
5–6 |
| |
src/applications/diviner/controller/DivinerBookArchiveController.php | ||
57–64 | Can be slightly simplified with return $this->newDialog()->... |
There is also the question of what it means for a book to be archived...
- Is an archived book still rendered for display?
- Can an archived book be updated with diviner generate?
- Are links to archived book (or symbols from archived books) rendered differently?
Offhand, I'd say:
- Hide archived books from /diviner/ by default.
- Oh, although I guess there's no way to query for books, per se, right now. Not clear if there should be eventually (maybe?). Maybe just put the archived books at the bottom in grey for now?
- Ideally, hide symbols in archived books from /diviner/query/ by default (but provide a way to find them). Not sure how much of a mess this is.
- When looking at something in an archived book (like /book/phabricator/), show that somehow, to communicate to the user that whatever they're looking at might be obsolete.
You can query for books in global search. I was considering allowing DivinerAtomSearchEngine to return books as well as atoms, but this seems messy and I soon decided that it was a bad idea.
src/applications/diviner/query/DivinerBookQuery.php | ||
---|---|---|
163 ↗ | (On Diff #32375) | This doesn't feel right to me |