Build the gate legs by attaching an inboard gate leg, outboard gate leg, & 3 rails. The tops of the legs should extend 3/4" above the top rail. The outboard leg should be 3/4" longer at the bottom than the inboard. Use FF biscuits and glue to hold it together. Use a rasp or handsaw to knock a little bit of material off of the front corner of the inboard leg so it will clear the piano hinge. You'll see why when you fit it later.
Drill 3/8" holes in the gate legs 3/8" deep centered in each end of the leg's inboard side. Cut some dowels to hold the gate legs in place. The top one should be about 3/4" long, and the bottom one should be about 1-1/2". Fit it together to see how it works.
Carefully dry-fit the legs and make sure you like the way they operate. When you have it fit the way you want, put a dab of glue on the bottom end of the bottom dowel and put it all in place. Hold it with a little tape until the glue dries. Cut any excess dowel flush with the bottom of the box. Once this goes together, the only way to get the gate legs out is to cut them, so fit carefully.
Install the table feet. I put 4 on the bottom of the box, plus one on each gate leg.
Fill and sand the brad holes. Sand everything smooth, particularly the tabletop. Prime & paint it and you're done.
This makes a very spacious desk that you can set up to work from home for a day then stow away when you're done. I tried it.
If I had it to do over...
I'd use heavier material for the top. The 3/4" poplar just isn't very beefy when you lean on the edge of the table. Maybe a nice 5/4" birch plywood top with some hardwood tacked to the edge.
I'd at least make the tabletop out of boards that run lengthwise, not side-to-side. I think that's giving me even more bend and stress on the biscuit joints.
Eh. Next time.