Page MenuHomePhabricator

All area
Open, Needs TriagePublic

Description

Add ability to fetch all active posts from any area for "all/random" area
Should not be able to post to this area

Details

Differential Revisions
D234: Create All Area

Related Objects

Event Timeline

WyldBot created this task.Jul 13 2018, 1:31 AM
WyldBot assigned this task to Info-Screen.
WyldBot added projects: Server API, Web, Client.
WyldBot added a subscriber: Info-Screen.

Might be better to implement this fully on the client side.

This would also allow the user to say only subscribe to a limited number of areas (for example all but the WildFyre area.

Are you suggesting the client fetches all areas and then randomizes them?

Might be something we could add to T290 so the client can request posts form multiple areas at once.

But yes the client could do the randomization.

WyldBot added a comment.EditedJan 20 2019, 3:07 PM

Yes it should be done in 1 request rather than n areas(Which could be very costly in the future)

Just some future ideas:
Take 10 and mod it by the current number of areas.
I.e. 10 % 3 = (3 r=1)
Get 3 posts from each area
Create new area named all
Assign posts to all area (Which wouldnt exist !/areas/all/<id>)

We would need to figure out client side how we would show the area to a user if the all area is currently selected
We would have to restrict to the all area to only userposts/notification archive/home

In T232#4971, @WyldBot wrote:

Just some future ideas:
Take 10 and mod it by the current number of areas.
I.e. 10 % 3 = (3 r=1)
Get 3 posts from each area

You are probably referring to floor division.

>>> 10 % 3   # mod
1
>>> 10 // 3  # floor div
3

But I don't think the client should assign the posts to a virtual all area (because that would make creating links harder) the client could just normally fetch all selected and to view a post the client just randomly selects a stack to pop the post from (out of the selected areas).

WyldBot edited projects, added Client; removed Web.Mar 17 2019, 6:05 PM
WyldBot claimed this task.Mar 28 2019, 3:58 PM
WyldBot moved this task from Backlog to Implementing Now on the Client board.