Roughly, if user isn't in any rooms, search for joinable ones. If no results, show big NUX banner.
Details
Details
- Reviewers
epriestley - Commits
- rP28201bf2b554: New NUX states for Conpherence
Left all rooms, got fallback, joined room, left room. Create new instance, see new NUX. Set instance to public, visit Conpherence with and without public rooms.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- conph-nux (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 13749 Build 17754: Run Core Tests Build 17753: arc lint + arc unit
Event Timeline
Comment Actions
This looks/works fine, but the empty state is always rendered, even if the user has joined a room -- and this makes it much more expensive to render, since we unconditionally load and render 10 threads. In my sandbox, this makes loading a /Z123 thread page (as a fully-active user who has already joined a bunch of rooms) about 15% slower.
I think we can fix this like this, by only building the expensive NUX if $this->thread is not set:
$results = array(); if (!$this->thread) { // If we aren't looking at a thread... $results = <all the query logic>; } if ($results) { // render "join a room NUX" } else { // render "Welcome" NUX }
Slightly simpler would probably be adding this at the top:
if ($this->thread) { // User is looking at a thread, so we definitely aren't going to render NUX. return null; }
But I'm not sure if that causes any issues.