hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

Implement sidebar on Group Profile Page #12

Closed ajpeddakotla closed 7 years ago

ajpeddakotla commented 7 years ago

User Story for Group Profile page As a Hypothesis user, specifically a user of hypothesis that belongs to an annotation group, I want to be able to view all the information about my group in one centralized location, so that I can manage my group's members from one location, and see how much they are annotating.

Description of the sidebar The sidebar on the group profile page aims to serve as a point of reference, allowing the user to view the following information:

Work completed when

screen shot 2016-10-12 at 3 38 59 pm
dwhly commented 7 years ago

I notice that the users are in frequency order w/ no control to switch sort. Should we implement a similar control to mirror tags? Some groups will have very long member lists. I can imagine alpha order would be helpful as an option there.

For the "Leave this group" we should make sure there is a confirmation on that step, otherwise too easy to click by accident.

sean-roberts commented 7 years ago
dwhly commented 7 years ago

Clicking of that link slides in the content.

I like that... could be an icon of some sort, as are typically used to slide in another menu / context on mobile, and then slide it back out.

ghost commented 7 years ago

@dwhly Yes, that is a fine observation. I had added these controls to some of the 3rd party accounts admin pages with this in mind. Perhaps we could just do this now? To discuss.

@sean-roberts

Multiple groups in search. group:A group:B

The only thing visible in the sidebar would be the tags module (if there are any - same as other searches). Although it would be nice to perhaps provide a link to each of the group’s pages. (to discuss)

Search results has only one group on the results but they did not search for a group specifically

There is no group facet so the sidebar would only show the tags module.

What are the expectations of the mobile UI?

I had imagined we would use the same truncation that we use elsewhere in our products. (see below)

truncation

Accommodating it for mobile could be, only show a link on mobile - at the top of the page before the results. Clicking of that link slides in the content.

Would like to hear more about the effort required for this approach vs. truncation

seanh commented 7 years ago

Ok, I need to specify this a little more precisely and limit the scope somewhat in order to get started implementing it. At least for the first version that I'm going to implement to start with, I'm going to make a few assumptions when implementing this:

seanh commented 7 years ago

Multiple groups in search. group:A group:B

The only thing visible in the sidebar would be the tags module (if there are any - same as other searches). Although it would be nice to perhaps provide a link to each of the group’s pages. (to discuss)

I'm going to assume that this is something to be done separately, and not something that I'm going to do as part of implementing this sidebar (at least not for the first pass).

My rule:

The group sidebar shown in this card is going to be shown on the group's search page, that is the /groups/xyz123/search page and any subpages thereof (/groups/xyz123/search?q=user%3Aseanh+foo+bar and so on). Any URL that starts with /groups/xyz123/search will have group xyz123's sidebar on it.

The current behaviour on production is:

  1. Go to /search and search for a group, type "group:xyz123" into the search bar and hit Enter.
  2. You get redirected to /groups/xyz123/search?q=.
  3. Now on this page, add a second group to the search: type "group:abc456" into the search bar. You will still be on group xyz123's search page, but the search is faceted by group abc456 as well: /groups/xyz123/search?q=group:abc456. Clearly there's an issue here but I think it's one that we should solve separately from implementing this sidebar.

The solution is probably that if you are on /groups/xyz123/search and you add a second group into the search terms you should be sent to /search?q=group:xyz123&group:abc456. This would be a search page that searches all annotations from either xyz123 or abc456, but it is not the "group search" page of either group. (And as Conor says this would show the tags sidebar module but not any group sidebar module.)

seanh commented 7 years ago

@conordelahunty I think I need more information about how the truncation-based approach to this sidebar on mobile would work. There isn't currently any space for a sidebar on mobile as the documents and annotations take up the full width of the screen:

screenshot from 2016-10-25 18-17-10

Do you mean that the sidebar should still appear to the right of the documents, but that it should be (entirely?) off screen? Should there be a horizontal scrollbar?

dwhly commented 7 years ago

I think the URLs here are getting strange. I know this is late in the game, but worth asking.

Why are we implementing a URL of the format /groups/xyz123/search

Why don't we keep this simple and have URLs of the following structure: /search?q=group:xyz123 for the explicit search syntax. /groups/xyz123/my-test-group for the invite link, and after you've joined the group as an alias for /search?q=group:xyz123

But: /groups/xyz123/search?q=tag:foo For what is essentially: /search?q=group:xyz123&tag:foo

Just seems odd to me. I don't get the reasoning behind it.

The activity page will be the home for the group. So special case /search?q=group:xyz123 and show /groups/xyz123/my-test-group instead.

If the person then clicks on a tag, switch to the multiple search term format: /search?q=group:xyz123&tag:foo

sean-roberts commented 7 years ago

Do you mean that the sidebar should still appear to the right of the documents, but that it should be (entirely?) off screen? Should there be a horizontal scrollbar?

Check out his comment: https://github.com/hypothesis/product-backlog/issues/12#issuecomment-254552636

it has a screenshot of what he's thinking. Basically, the content needs to be above the actual results on mobile. But it will only be partially visible and will change visibility when you click more - which slides down the bottom, making the rest of the content visible

seanh commented 7 years ago

Ah right, I just finally realized what that screenshot is showing:

truncation

So on small screens the sidebar will appear above the timeframes/documents/annotations and will be vertically truncated with a -More- line. I'll find the existing implementation of this in the client to see how it's done.

seanh commented 7 years ago

The design asks for group links to be shown:

screenshot from 2016-10-27 19-10-12

But groups don't actually have links yet. Here's what the group create/edit form looks like:

screenshot from 2016-10-27 19-11-18

No group links in the database either. Not sure if there's an existing Trello card somewhere to add links to groups and let people enter them. So I'm not going to put group links into this sidebar, will assume it will be done later as part of a different card.

sean-roberts commented 7 years ago

isn't the link a derived link? Like /groups/xyz123/edit if they have access to edit that group?

seanh commented 7 years ago

The Edit group link is derived (also Leave this group) but the Link: mr-edision.com/english-101 looks like it's supposed to be a third-party link that users can give when they create/edit their group.

seanh commented 7 years ago

Discussion of the responsive layout for this in Slack.

I'm going to back off a bit for now and get a fully functional version of this sidebar for desktop-sized windows working, without any responsive layout, get that merged then do the responsive layout separately.

But when I do get to it, my plan is now to implement this version:

sliding_panel_1024

(Though note that some of the controls and icons etc in that mockup are new parts that I won't be implementing as part of this card - just the layout.)

When the screen gets too small the sidebar will disappear and the group name and More info button will appear at the top. The More info button is a simple link to /groups/abc123/search?q=...&more-info, full page reload, loads a version of the page that shows the sidebar fullscreen instead of the search results (and with a Back button). This will be simple to implement without any JavaScript or fancy CSS hacks.

I think that what Conor actually wants is that when you click More info this second "panel" does an animated slide-in, without doing a full page reload. I think that can be implemented as a JavaScript enhancement later, if/when we have time. When we do implement that, the initial full-page-load version of it can remain and be used as the fallback when JavaScript isn't available or fails to load (we should have such a fallback for any solution anyway, imo).

My personal suspicion is that a full page load implementation will be plenty good enough for a first MVP of the activity pages feature that we can ship (full page load sounds bad but it should happen really quickly, if it doesn't then we already have a problem anyway and we should make our page load times faster). JS enhancement will be a very much optional extra.

seanh commented 7 years ago

As discussed with @conordelahunty and @dwhly the invite component:

screenshot from 2016-10-28 18-38-17

is gonna have the text changed from "Invite people to join this group using the link below:" to "Sharing the link below lets people join this group:" and the Twitter, Facebook and email icons are going to be removed (because Conor said they were too loud, but the link including clipboard button will remain). I'll send a PR first to make this change on the classic group pages, then I can reuse the component from those pages on the new sidebar.

dwhly commented 7 years ago

Thanks @seanh!

seanh commented 7 years ago

Interesting note: currently the Edit group and Leave this group links will never be shown at the same time, as in the mockup. Only the creator of a group can edit the group, but the creator can't leave the group. So the creator sees Edit group only, whereas all other members see Leave this group only.