#231 Add My Stream page
Merged by atelic. Opened by atelic.
atelic/fedora-hubs feature/mystream  into  develop

Download 231.patch

Screenshots:

  • Updated card layout: http://i.imgur.com/nGqIohd.png

  • http://i.imgur.com/MbWrigg.png

  • http://i.imgur.com/xkalDVX.png
  • http://i.imgur.com/KopoZq8.png
  • http://i.imgur.com/yPazsKd.png
  • http://i.imgur.com/1lQvsdF.png

This is what I still have the biggest concern about. Right now it's faking a json representation of a response from fmn to use as the rule. It would be ideal to:
- Make a request to only fetch a specific 'A particular user' filter.
- If it doesn't exist, create one and use it.

This is a temporary file that represents fake data for the My Mentions tab. This is for the sake of the Flock demo and will be removed once the mentions feature is figured out.

1 new commit added

  • Add SavedNotifications tests

rebased

1 new commit added

  • Major improvements for Feed UI

rebased

was this purposefully removed?

Yes, it was moved here: https://pagure.io/fork/atelic/fedora-hubs/blob/feature/mystream/f/hubs/templates/hubs.html#_6

for the following reasons:
- Having it in the master template meant that we had the nav bar on every page in the app rather than on hubs pages.
- It overlapped the jumbotron on stream.html
- The stream mockup does not have a nav bar so it makes sense to only have it where it is needed

I get a 404 on url

http://localhost:5000/skrzepto/stream/

this is with a fresh db and repopulated

after clearing cookies

its throwing this

OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused

for the url http://localhost:5000/skrzepto/stream/

but http://localhost:5000/skrzepto loads fine

The above was fixed by

sudo systemctl start postgresql

From Line 31 to Line 130.

Could we add this functionality to a seperate class? and just do something like this

@app.route('/<name>/stream')
@app.route('/<name>/stream/')
@login_required
def stream(name):
    actions = stream()
    return flask.render_template(
     'stream.html',
     hub=hub,
     saved=json.dumps(saved),
     actions=actions
)

I say this because this will likely get replaced with something in fmn.lib and this will make replacing it after flock much easier

look at my comment on line 31 in this file

2 new commits added

  • Respond to code review
  • Fix failing test, add on dropdown for feed nodes

do we need feed widget here? thought we replaced it with sse?

Much better :)

Whats going on here?

1 new commit added

  • Explain the save tagging loop

rebased

how likely is it that a new notification will pop up and was saved?

how many notifications are we showing in the stream?

what does

rel="nofollow"

rebased

Very likely. Since most of these streams aren't pulled from SSE but rather are brought in from the db, they persist over refresh so it's possible for a user to hit save, see the save feedback, refresh and see the save button again. It also prevents the save button from showing up in the saved stream

1 new commit added

  • Escape html in fedmsgs to avoid breaking components

'More' button doesnt drop down in stream page

15 new commits added

  • Escape html in fedmsgs and remove More dropdown
  • Update README regarding Stream and Feed setup
  • Adjust to removal of feed.py code.
  • Explain the save tagging loop
  • Respond to code review
  • Fix failing test, add on dropdown for feed nodes
  • Major improvements for Feed UI
  • Add SavedNotifications tests
  • Add widget ability to my stream page
  • Hide save button if notif has already been saved..
  • Make stream code more readable, improve save
  • Real data for actions and stream tab
  • Fake data for My Mentions for Flock demo
  • Front and back ends for SavedNotifications
  • Naive implementaion of stream prototype

I've removed it for now since bootstrap dropdowns and cards don't seem to play nice. It looks like this now.

15 new commits added

  • Escape html in fedmsgs and remove More dropdown
  • Update README regarding Stream and Feed setup
  • Adjust to removal of feed.py code.
  • Explain the save tagging loop
  • Respond to code review
  • Fix failing test, add on dropdown for feed nodes
  • Major improvements for Feed UI
  • Add SavedNotifications tests
  • Add widget ability to my stream page
  • Hide save button if notif has already been saved..
  • Make stream code more readable, improve save
  • Real data for actions and stream tab
  • Fake data for My Mentions for Flock demo
  • Front and back ends for SavedNotifications
  • Naive implementaion of stream prototype

1 new commit added

  • Add DELETE for saved notifications

should we add @login_required

16 new commits added

  • Add DELETE for saved notifications
  • Escape html in fedmsgs and remove More dropdown
  • Update README regarding Stream and Feed setup
  • Adjust to removal of feed.py code.
  • Explain the save tagging loop
  • Respond to code review
  • Fix failing test, add on dropdown for feed nodes
  • Major improvements for Feed UI
  • Add SavedNotifications tests
  • Add widget ability to my stream page
  • Hide save button if notif has already been saved..
  • Make stream code more readable, improve save
  • Real data for actions and stream tab
  • Fake data for My Mentions for Flock demo
  • Front and back ends for SavedNotifications
  • Naive implementaion of stream prototype

Definitely

16 new commits added

  • Add DELETE for saved notifications
  • Escape html in fedmsgs and remove More dropdown
  • Update README regarding Stream and Feed setup
  • Adjust to removal of feed.py code.
  • Explain the save tagging loop
  • Respond to code review
  • Fix failing test, add on dropdown for feed nodes
  • Major improvements for Feed UI
  • Add SavedNotifications tests
  • Add widget ability to my stream page
  • Hide save button if notif has already been saved..
  • Make stream code more readable, improve save
  • Real data for actions and stream tab
  • Fake data for My Mentions for Flock demo
  • Front and back ends for SavedNotifications
  • Naive implementaion of stream prototype

Should we keep this file if dropdown doesnt work?

Right now it conditionally renders the Save/Delete buttons. Hopefully we will figure out the markup for a correct dropdown after Flock and this file will wrap those buttons in that markup. It's not the most idiomatically named file right now but I'm hoping the dropdown will come

thanks for the explanation :)

LGTM :thumbsup:

1 new commit added

  • Fix small bugs from refactoring Feed js

rebased

since the demo is over, I dont think we should add this file. Could we just returned a preset JSON messages for now? and then we could look into fmn and see what possibilities we can do for this

rebased

Removed in favor of passing a file of JSON messages for now. This is going to introduce some thrashing so I'll need to rebase a lot of this.

1 new commit added

  • Remove stream.py in favor of JSON messages

make this a method or a class, pretend that the fmn is working and we received a json array. This implementation is very specific and will need a rewrite of this route once the fmn service is put online. If we made a new method/class and had a method called get_json all we need to do is adjust that method instead of this route? it seperates the logic and makes for future adjustments easier https://en.wikipedia.org/wiki/Single_responsibility_principle

15 new commits added

  • Modify stream.py to fake JSON messages
  • Fix bugs created by refactoring Feed js
  • Add DELETE for saved notifications
  • Escape html in fedmsgs and remove More dropdown
  • Update README regarding Stream and Feed setup
  • Readability, README, and comment improvements
  • Fix failing test, add on dropdown for feed nodes
  • Major improvements for Feed UI
  • Add SavedNotifications tests
  • Add widget ability to my stream page
  • Hide save button if notif has already been saved..
  • Make stream code more readable, improve save
  • Data for Mentions, stream, and actions
  • Front and back ends for SavedNotifications
  • Naive implementaion of stream prototype

rebased

:thumbsup: for me

Pull-Request has been merged by atelic

Metadata