Skip to content
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

Reader: Use SectionHeading on Manage Followed Sites #1391

Merged
merged 27 commits into from
Dec 18, 2015

Conversation

shaunandrews
Copy link
Contributor

Here's what follow management looks like on master:

screen shot 2015-12-08 at 2 12 06 pm

screen shot 2015-12-08 at 2 12 11 pm

The double input is really obnoxious, and I often find myself mixing up the add and search inputs. Also, the search result is a little loud.

Lets bring in the <SectionHeading> component and clean things up a bit:

screen shot 2015-12-08 at 2 11 22 pm

We bring back the once-upon-a-time subscription count, and hide the add input behind a button. Clicking/tapping the add button transitions to show a placeholder and the focused add input:

screen shot 2015-12-08 at 2 11 24 pm

Type a URL and you get the preview:

screen shot 2015-12-08 at 2 11 32 pm

Hitting follow (or enter) adds a placeholder to your list, which is then replaced by the actual site:

screen shot 2015-12-08 at 2 11 37 pm

There's also a new ellipsis icon which can be use to open a <Popover> with Import, Export, and Delivery Settings options that @blowery is working on.

@bluefuton I'd love it if you could take a look at this.

@shaunandrews shaunandrews added [Status] In Progress [Feature] Reader The reader site on Calypso. labels Dec 8, 2015
@shaunandrews shaunandrews self-assigned this Dec 8, 2015
debounce = require( 'lodash/function/debounce' );
debounce = require( 'lodash/function/debounce' ),
classnames = require( 'classnames' ),
assign = require( 'lodash/object/assign' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use Object.assign directly now, instead of pulling in lodash.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@bluefuton
Copy link
Contributor

This is a vast improvement over the double-input-box UI. Kudos @shaunandrews!

One small thing: I noticed that the sidebar doesn't seem to collapse away correctly and I can see part of the nav underneath the Manage Following content at smaller window sizes. This also means the MobileBackToSidebar link doesn't work as expected:

screen shot 2015-12-09 at 08 03 52

@rickybanister rickybanister mentioned this pull request Dec 8, 2015
5 tasks
@shaunandrews shaunandrews added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Dec 9, 2015
@bluefuton
Copy link
Contributor

Here's a screen recording of the odd sidebar behaviour: https://cloudup.com/iyMatVc96R3

@rickybanister
Copy link

I think this is much better.

It offers improved context (seeing the total number of sites), and a central place for all the related tools to preside over the interface. The search makes sense being attached to the list in this case.

I was worried that we're switching the order of the SectionNav (search) and the SectionHeader (toolbar) but the logic behind it in this case makes more sense.

The only note on the code will go away once #1358 gets merged (Search will use gridicons)


<FollowingEditSortControls onSelectChange={ this.handleSortOrderChange } sortOrder={ this.state.sortOrder } />

<SectionHeaderButton onClick={ this.toggleAddSite }>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SectionHeader button is deprecated, just using a regular Button inside it with the compact prop should be the same.

@mtias mtias added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 10, 2015
@bluefuton bluefuton force-pushed the update/reader-follow-manage-header branch from 0abfc02 to 63db848 Compare December 15, 2015 00:59
@bluefuton bluefuton added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Dec 15, 2015
},

getInitialState: function() {
return {
keyword: this.props.initialValue || ''
keyword: this.props.initialValue || '',
isOpen: this.props.isOpen || false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we prefer it, but isOpen: !! this.props.isOpen works as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Updated in 18b7b1d.

@gwwar
Copy link
Contributor

gwwar commented Dec 16, 2015

This is a great improvement. 👍 The double inputs were bothering me too. Just a few small things:

Maybe a smidgen of padding here:
padding

I feel like the top header could use a bit of work. The add button could stand out a bit more (I had to hunt for it) and what it does is a bit cryptic. As a user I wouldn't expect it to transform the mode. Not sure if the count pill is very useful here either. I kept expecting it to update with the search results, but it's static, so maybe some more descriptive text there.

I think it would be pretty interesting to get some users to test this, and see if they run into any trouble.
add

@@ -31,11 +31,11 @@ const FollowingEditSortControls = React.createClass( {
const sortOrder = this.props.sortOrder;

return (
<div className="following-edit-sort-controls">
<div className="following-edit__sort-controls">
<label htmlFor="sort-control-select">{ this.translate( 'Sort by' ) }</label>
<select id="sort-control-select" ref="sortControlSelect" className="is-compact" onChange={ this.handleSelectChange } value={ sortOrder }>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not necessary in this PR, but could we switch to using select dropdown instead of a select element here for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe segmented-control?

@rickybanister
Copy link

This placement and style of Add button is becoming a pattern across calypso, it just hasn't been put in place anywhere yet. Plugins and People will be the next sections to implement it, but I don't see any problem with its use here.

In the plans for those other sections we've been playing with the idea of an icon in conjunction with the button text. Also perhaps in this case it could stand to be a primary button, simply making it blue to stand out.

The count next to the SectionHeader title is another standard we're using elsewhere. It counts the number of sites you follow, not the number of sites returned by autocomplete.

@rralian
Copy link
Contributor

rralian commented Dec 16, 2015

The add button [...] is is a bit cryptic.

I would agree with that. I think the dropdown is a bit terse too. So while this is visually cleaner than what's in master, it doesn't seem as functionally clear to me. We have quite a bit of room though... could we be a bit more explicit with the "add" and "by date/by name" controls?

@shaunandrews
Copy link
Contributor Author

I made the add button a little more specific (Follow Site) and made it primary (blue):

screen shot 2015-12-17 at 4 45 47 pm

We have quite a bit of room though...

We have room on desktop (though, I don't think that in itself is a good reason to add more stuff), but on mobile we're pretty close to being "full":

screen shot 2015-12-17 at 4 49 09 pm

@bluefuton
Copy link
Contributor

I made the add button a little more specific (Follow Site) and made it primary (blue)

👍 Looks great @shaunandrews.

I think I prefer to 'Add Site' to 'Follow Site' as a call to action, but both work.

@rickybanister
Copy link

I'm with @bluefuton, but it looks good Primary.

@shaunandrews
Copy link
Contributor Author

The thinking behind "Follow Site" over "Add Site" was to hopefully quell any confusion between creating a new site and adding a site to your followed list. When viewing a site or post in Reader (or the front end) the button is "Follow" not "Add" — so I was thinking the consistency would help.

@folletto
Copy link
Contributor

👍

@shaunandrews shaunandrews added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 18, 2015
bluefuton added a commit that referenced this pull request Dec 18, 2015
…header

Reader: Use SectionHeading on Manage Followed Sites
@bluefuton bluefuton merged commit bd5162f into master Dec 18, 2015
@bluefuton bluefuton deleted the update/reader-follow-manage-header branch December 18, 2015 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants