Skip to content

Show every Discourse post w/ excerpt#302

Merged
toolness merged 3 commits into
masterfrom
show-all-discourse-post-excerpts
Mar 23, 2016
Merged

Show every Discourse post w/ excerpt#302
toolness merged 3 commits into
masterfrom
show-all-discourse-post-excerpts

Conversation

@toolness

Copy link
Copy Markdown
Contributor

This fixes #301.

Screenshot:

discourse-activity-feed

Notable limitations:

  • It looks like the cooked attribute of posts has relative links, so e.g. if someone mentions @batu, Discourse will turn this into <a href="/users/batu">@batu</a>, which will 404 on NoI. So we might need to rebase the URLs or remove them entirely or something. We now rebase the URLs.
  • For that matter, I have no idea what really fancy HTML in posts might look like, e.g. oneboxes.
  • Text like "Read 3 replies on Discuss" no longer makes sense because it's showing the number of replies to the whole topic, not the particular post being shown, so now we always just say "Read more on Discuss". Might want to just go ahead and drop posts_count from the model because it's not useful anymore.
  • The code currently deals with the case in which post_number is null, which is useful for migrating existing deployments. However, since "existing deployments" just means noi-demo.thegovlab.org and that's fully under our control, it might be easier to just simplify the code and require post_number to be non-null.

@toolness

Copy link
Copy Markdown
Contributor Author

Given that this feature is still evolving, I'm going to merge this PR now and we'll see how well it works in practice.

@toolness toolness changed the title [WIP] Show every Discourse post w/ excerpt Show every Discourse post w/ excerpt Mar 23, 2016
@toolness
toolness merged commit c2d52af into master Mar 23, 2016
@toolness toolness added this to the Hoffmancer milestone Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity feed should show every Discourse post w/ excerpt

1 participant