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

Me: My Profile: Update Profile Links to use SectionHeader #808

Merged
merged 10 commits into from
Dec 3, 2015

Conversation

alternatekev
Copy link
Contributor

In the process of changing the /me sections to use the SectionHeader pattern, I made the following changes to Profile Links:

It used to look like this:
screen shot 2015-11-18 at 4 35 11 pm

Now it looks like this:
screen shot 2015-11-18 at 4 33 00 pm

Clicking "Add WordPress Site" gives you this:
screen shot 2015-11-18 at 4 33 18 pm

with this rounding things out at the bottom of the page:
screen shot 2015-11-18 at 4 33 36 pm

Clicking "Add URL" gives you this:
screen shot 2015-11-18 at 4 33 49 pm

And because I know @rickybanister is going to suggest it: this is essentially an interstitial step because the control buttons shouldn't be at the bottom of the form, they should be in the SectionHeader a la the actual second part of the SectionHeader AddButton pattern. We'll get there in the next PR, along with the Application Password section of Security.

@alternatekev alternatekev added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR [Feature] User & Account Settings (/me) Settings and tools for managing your WordPress.com user account. Components labels Nov 25, 2015
@alternatekev
Copy link
Contributor Author

Pinging @ebinnion

@@ -10,7 +10,8 @@ var FormFieldset = require( 'components/forms/form-fieldset' ),
FormTextInput = require( 'components/forms/form-text-input' ),
FormButton = require( 'components/forms/form-button' ),
eventRecorder = require( 'me/event-recorder' ),
SimpleNotice = require( 'notices/simple-notice' );
SimpleNotice = require( 'notices/simple-notice' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

@mtias is working on refactoring notices in #888. I believe part of that was removing the SimpleNotice component. It may be worth checking in on that PR.

Copy link
Member

Choose a reason for hiding this comment

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

That's merged now!

@ebinnion
Copy link
Contributor

Functionally, this works well. I left a note about refactoring notices and a couple of style notes.

I'll plan on taking a look at this early next week. That should give us some more time to see how the notices PR shapes up.

render: function() {
return(
<div>
<SectionHeader label={ this.translate( 'Profile Links' ) }>
Copy link
Member

Choose a reason for hiding this comment

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

I had to do this for settings as well, and it made me think that it'd make more sense semantically for SectionHeading to be within the Card instead of having to add an extra div wrapper. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mtias I've definitely run into areas where having the SectionHeader inside the Card would have helped pass things around without an extra div. I'm all for that update.

Copy link
Member

Choose a reason for hiding this comment

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

👍 I'll see if we can revisit this before more sections start using it this way.

@mtias
Copy link
Member

mtias commented Nov 28, 2015

Nice improvement!

<Button
compact
primary
className="add-buttons__add-wp-site"
Copy link
Member

Choose a reason for hiding this comment

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

The class here should be something like profile-links__add-wp-site or profile-links__add-buttons-wp.

@folletto
Copy link
Contributor

folletto commented Dec 1, 2015

Uhm that "Add WordPress" interaction is really odd. I was about to comment about the card-in-card solution, but the issue is even bigger imho: the button "Add a WordPress Site" should open a modal or a different page, not being in-line like it's currently done live. It's an entirely different form, structure and context, and it can get very long. Same oddness for "Add Other Site".

A different page would probably be slightly better for me than a modal since that could be linked directly too. Useful for flows and support. :)

So I'd say that for the purpose of this PR this is ok, but we should look into refactoring that bit in a different interaction flow in a follow-up, doing a single button "Add" and then there a new page/modal with the two options.

@rickybanister
Copy link

@folletto would you mind opening a new issue outlining your concerns? I think @alternatekev's main focus here was to reuse existing components to bring an old section more inline with our current patterns. When we have more time to do another iteration of /me we can certainly improve things like that. It's definitely important to both track those improvements we'd like to make, but also let this interim improvement get merged.

@folletto
Copy link
Contributor

folletto commented Dec 1, 2015

Yup I can do. I want to see if there was some consensus first. 👍

</FormButton>
</FormFieldset>
</form>
<Card>
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about the Card within a Card look we generate with this. Do we have examples of that elsewhere?

Copy link
Member

Choose a reason for hiding this comment

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

If we want to add a division between the two we can drop an hr or add a top/bottom border.

Choose a reason for hiding this comment

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

I tend to agree with @mtias here, I didn't realize the card-within-card was a new addition. I think we could just get away with a bottom border or something on the form.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rickybanister @mtias I've removed the extra internal Cards here. @ebinnion: Would you be able to take care of making this work inline with how you did the BackupCodes, where the list of items isn't shown while you're adding one, and dims the buttons in the SectionHeader?

@ebinnion ebinnion force-pushed the update/profile-links-section-header branch from d6fbe0f to 695e850 Compare December 3, 2015 02:11
@ebinnion
Copy link
Contributor

ebinnion commented Dec 3, 2015

Would you be able to take care of making this work inline with how you did the BackupCodes, where the list of items isn't shown while you're adding one, and dims the buttons in the SectionHeader?

@alternatekev - I made the changes as requested. I also went ahead and rebased against master to fix some merge conflicts as well as refactored to simplify some of the markup.

screen shot

screen shot 2

screen shot 3

@mtias
Copy link
Member

mtias commented Dec 3, 2015

Nice, this is looking good. @ebinnion mind squashing a few of the commits here?

@ebinnion ebinnion force-pushed the update/profile-links-section-header branch from a5894e3 to 32ebb2b Compare December 3, 2015 15:01
@ebinnion
Copy link
Contributor

ebinnion commented Dec 3, 2015

I got rid of 10 commits by squashing @alternatekev's initial 8 commits and my initial 4 commits. If you're fine with my changes @alternatekev, let's :shipit:

@alternatekev alternatekev added [Status] Ready to Merge and removed [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 3, 2015
ebinnion added a commit that referenced this pull request Dec 3, 2015
…header

Me: My Profile: Update Profile Links to use SectionHeader
@ebinnion ebinnion merged commit 63bc4ad into master Dec 3, 2015
@ebinnion ebinnion deleted the update/profile-links-section-header branch December 3, 2015 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Components [Feature] User & Account Settings (/me) Settings and tools for managing your WordPress.com user account.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants