Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Public stream archives #8135
Conversation
zulipbot
added
size: L
size: XL
and removed
size: L
labels
Jan 22, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adnrs96
Feb 6, 2018
Collaborator
Steps for testing this out after pulling locally:
- Run provisioning using
tools/provision - Open up
dbshellin a terminal by using the command./manage dbshell - Query the DB for stream names and id's using
select id, name from zerver_stream;query. - Note down the id for streams you wanna make public. Lets say we have a stream
Scotlandwith id3 - Open up another terminal and use it to open
shellusing the command./manage shell - In this shell execute the following lines
x = [comma separated list of id's which you wanna make web public goes here]
for id in x:
a = Stream.objects.get(id=id)
do_change_stream_global_public(a, True)
- Visit the link of following nature
http://localhost:9991/archive/streams/<stream_id>/topic/<topic_name>
Example:
http://localhost:9991/archive/streams/3/topic/Scotland2
|
Steps for testing this out after pulling locally:
x = [comma separated list of id's which you wanna make web public goes here]
for id in x:
a = Stream.objects.get(id=id)
do_change_stream_global_public(a, True)
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adnrs96
Feb 6, 2018
Collaborator
Note: I am temporarily using the global_public DB changes here which are essentially useful for testing this out.
Ideally we will have another PR introducing DB changes for this feature and get that PR merged before this.
|
Note: I am temporarily using the global_public DB changes here which are essentially useful for testing this out. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adnrs96
added some commits
Feb 3, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I merged the first 5 commits, since those look great. |
| </p> | ||
| {% else %} | ||
| <p> | ||
| This stream does not exist. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
timabbott
May 2, 2018
Member
I think we should make this error message clear about the possibilities: "This stream either does not exist or is not publicly archived to the web.".
timabbott
May 2, 2018
Member
I think we should make this error message clear about the possibilities: "This stream either does not exist or is not publicly archived to the web.".
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| </div> | ||
| {% elif is_web_public %} | ||
| <p> | ||
| This topic does not exist. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
timabbott
May 2, 2018
Member
I think "No messages have been sent to this topic within the publicly archived stream #%(stream_name)s".
timabbott
May 2, 2018
Member
I think "No messages have been sent to this topic within the publicly archived stream #%(stream_name)s".
| @@ -9,7 +9,7 @@ def test_non_existant_stream_id(self) -> None: | ||
| # Here we use a relatively big number as stream id assumming such an id | ||
| # won't exist in the test DB. | ||
| result = self.client_get("/archive/streams/100000000/topic/TopicGlobal") | ||
| self.assert_json_error(result, 'Invalid stream id') | ||
| self.assert_in_success_response(["This stream does not exist."], result) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
timabbott
May 2, 2018
Member
Once we merge the main infra commits, I think we can split off a project to make a better error page for this case; I think we'll want to show a list of the public streams in the organization.
timabbott
May 2, 2018
Member
Once we merge the main infra commits, I think we can split off a project to make a better error page for this case; I think we'll want to show a list of the public streams in the organization.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
timabbott
May 2, 2018
Member
I went ahead and merged this, since it doesn't break anything, and it'll be easier to iterate from here, I think. Some notes on immediate follow-ups:
- Let's fix the error message items I noticed above.
- We're going to want to make the "left sidebar" equivalent for this feature (which I would consider building as its own page, rather than actually placing it as a sidebar). I would probably start with just building an endpoint to get the metadata and list of topics in a web-public stream (you can borrow some logic from the existing
/topicsendpoint), sorted by time. This feels pretty independent of whatever we're doing with message rendering. - Similarly, we probably will also want to make a
/archivehomepage for a realm, that just has the realm's banner, and a list of the web-public streams in the organization that you can click on, to get to the per-stream pages. - I think we can refactor
test_web_public_stream_topicto use theRomestream; as we add more tests, I think it'll be nicer to be building on top of the existing stream with this setting.
|
I went ahead and merged this, since it doesn't break anything, and it'll be easier to iterate from here, I think. Some notes on immediate follow-ups:
|
adnrs96 commentedJan 22, 2018
This PR will track our progress on getting #4817 ready.
The first commit introduces changes so that we don't supply user emails in the rendered content of messages having user mentions. Second commit introduces DB changes in the Stream table so that we can call some of the streams global-public i.e. they are visible to the world without having to login.
Discussion on this is being tracked by https://chat.zulip.org/#narrow/stream/backend/topic/global-public.20streams