-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin stream (formerly "star stream") #819
Conversation
Automated message from Dropbox CLA bot @krtkmj, it looks like you've already signed the Dropbox CLA. Thanks! |
Looks like this is failing tests? Regardless @neerajwahi @acrefoot can one of you take a look? |
@krtkmj taking a look at this, in the meantime please fix the failing tests. |
587e7cb
to
e64761d
Compare
@neerajwahi all tests passing now. |
@krtkmj There are some bugs here. For instance, try starring stream Verona in your dev VM and notice that the threads under Verona are always visible despite switching away to another stream. I also noticed an intermittent issue where the threads underneath a starred stream get doubled up (look at Verona below): |
@neerajwahi I guess the purpose of starring stream is that it remains open irrespective of narrowed to any other stream. I also mentioned that in commit message. And, I am looking for doubled topic list. |
@timabbott The current behavior of this diff is to keep the stream uncollapsed (and the list of threads showing) when a stream is starred regardless of whether that stream is selected. There's discussion around it here: #292 What are your thoughts on this behavior? I personally think it's confusing and makes the starred stream section too cluttered. I initially thought it was a bug until @krtkmj pointed out that it was by design. |
I think the intent of the current feature is just to sort the pinned streams at the top of the list of streams, and not to keep them always expanded; I agree that we should not combine this feature with the idea in #292. I think #292 probably makes sense to be an independent setting if we were to add that feature, since some users may want one and the not the other behavior.. |
@timabbott @neerajwahi shall we have another button which will be responsible for keeping the stream open? This won't take much time and can add this feature in this pr itself. |
No, I'd prefer to have that be feature idea be a separate PR and discussion -- let's get this working completely correctly as described, so we can merge it. As a general rule, it's usually easier to merge multiple features one at a time. |
@neerajwahi updated the pull request. Please review. |
@krtkmj I think we should remove the settings icon next to the 'Starred' section. It doesn't do what I expect -- control only starred streams -- and the functionality is currently duplicated across both sections. @timabbott Do you think that starring a stream should remove it from the 'Streams' section, or duplicate it into both sections (acting as more of a shortcut)? |
Hmm, interesting question. I could see good reason to do it either way. I'd probably start with having it remove it from the "Streams" section, since I think that may be more intuitive, and we can always change that based on feedback. |
(Also, I think that will be easier to implement, because with the alternative, we'd have to deal with only doing the topics list expansion in one of the two copies if the user narrows to the stream). |
@@ -153,14 +184,15 @@ exports.set_in_home_view = function (stream, in_home) { | |||
} | |||
}; | |||
|
|||
function build_stream_sidebar_row(name) { | |||
function build_stream_sidebar_row (name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added an inadvertent space here. It's a good habit to go through and review the diff yourself before pushing. I usually just run git diff
in the console and look through it before I create a PR
@krtkmj Added some inline comments |
@timabbott I agree with @neerajwahi but removing settings icon next to "STREAM" may seem like we don't have a settings page for normal streams. Or we can have something like this |
@krtkmj I'm not sure what you mean by "removing settings icon next to stream" but the design in that screenshot is what I had mind for showing the streams themselves. [edit] Oh, maybe what you're asking is where to put the settings gear? Good question! I would probably just put it next to STARRED and not include |
@timabbott I guess settings gear just in front of starred stream might be confusing as @neerajwahi commented earlier. |
That seems reasonable to me. |
After thinking about this more, I have a a new proposals for how to do the display:
What do you think @krtkmj and @neerajwahi? I think this would be a clean way to implement this feature without cluttering the UI. |
I think this will make more sense along with cleaner UI. |
@timabbott This is how it looks now. Pretty decent now. Any suggestion? |
That looks pretty reasonable to me at a high level; I think we could potentially make it nicer by changing the styling (e.g. maybe there's too 2x much space above/below the horizontal line?). |
// If no stream filter box is there, | ||
// return all streams. | ||
return streams; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed? Seems like it is kinda its own change related to the stream filter box functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In file frontend_tests.node_tests.stream_list.js
, function test_sort_pin_to_top_streams
does not add .stream-list-filter
to body. Hence, search_box.expectOne()
in line number 31 fails.
So, I added this code if no filter box is detected then return streams without filtering.
Or I can just append .stream-list-filter
in body and remove this part of code. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is just for the Node tests, yeah, I'd just create this in the Node test code...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krtkmj looks like you haven't addressed this in your latest update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is now resolved.
Cool, I posted a few comments. Once those are resolved, I think this should be ready to merge from a code perspective. It would be great to clean up the history for this. What I'd love to see is individual commits for the changes whose purpose as part of the "pin streams" feature isn't clear (most of those I posted a question about in my comments above, e.g. some of the CSS and test framework changes), and then rest of the changes squashed together as a single large commit that adds this feature. Does that make sense @krtkmj? |
@timabbott updated this PR. Have some doubts that I posted in inline comments. |
… streams by horizontal line.
@krtkmj Added some inline comments |
@krtkmj can you fix your git author name to be "Kartik Maji", not your username? |
I merged the subscriber list sorting as a32167d. |
{{else}} | ||
{{t Pin to top }} | ||
{{/if}} | ||
stream <b>{{stream.name}}</b> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
word stream
here should also be tagged for translations.
Noticed a few other display bugs while trying to merge this; since I need to head home I'm posting my working branch. |
OK, that ended up being all I needed to do (and in fact, the CSS piece was no longer needed), so I merged this. Huge thanks @krtkmj and @laurenzlong for building this!!! |
Awesome!! Thanks for all your support Tim! On Thu, Jun 30, 2016, 10:28 PM Tim Abbott notifications@github.com wrote:
|
Star favourite or important streams.
Starred streams will be sorted at the top of Left side stream list.
@neerajwahi