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

Look away #314

Merged
merged 79 commits into from
Oct 4, 2016
Merged

Look away #314

merged 79 commits into from
Oct 4, 2016

Conversation

mattkrick
Copy link
Member

HOLY COW APHRODITE IS SO FAST

This has the latest from the me-dash-dos branch
it also fixes the welcome wizard lag. and a lot more.
I also refactored the SSR, cuz it was ugly.

The main thing it does is switch from react-look to aphrodite.
I created a withStyles HOC that takes in the styles & spits out the component.
That way we can have user-specific themes in the future (see ThemeProvider)
It also means we can still use props to determine our styles (see Button).
It still only calls aphrodite once per component instantiation, which is something that https://github.com/airbnb/react-with-styles/tree/master/src doesn't do. I wish I could have used it. Airbnb usually puts out pretty good stuff. But their version complicates the heck outta things, introduces new singletons, & is much less performant. Their API was nice though, so I used that.

I did have to write a package for aphrodite to handle globals, but hopefully they see how simple it is & accept my PR, too.

I'm gonna wake up late tomorrow.

ackernaut and others added 30 commits September 26, 2016 17:35
# Conflicts:
#	src/universal/modules/userDashboard/components/UserActionList/UserActionList.js
#	src/universal/modules/userDashboard/components/UserActionList/UserActionListItem.js
@mattkrick
Copy link
Member Author

mattkrick commented Oct 3, 2016

Fix list (to be added when merging!)
fix #313
fix #307
fix #305
fix #302
fix #295
fix #290
fix #282
fix #276
fix #252
fix #227
fix #221
fix #190
fix #124

Copy link
Contributor

@jordanh jordanh left a comment

Choose a reason for hiding this comment

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

My god, this was such an awesome amount of work. Bravo!!

Please see the one change I'm requesting...

@@ -16,7 +16,8 @@
"scripts": {
"start": "NODE_ENV=production node ./src/server/server.babel.js",
"dev": "NODE_ENV=development node ./src/server/server.babel.js",
"build": "rimraf build && concurrently \"npm run build:client\" \"npm run build:server\"",
"build:themes": "babel-node ./webpack/utils/buildThemeJSON.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you prefer building the theme here over using WebpackShellPlugin? I'm cool with this of course, just curious as to why...

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh that was a fun one!
I'm not sure I completely understand it, but here goes...
I was getting an error in the json loader where it was getting an empty string, which is what happens if you read an empty file. Maybe 20% of the time, only when the build folder existed.
I think that's because the server and client builds were both building that file. What I think was happening is that one would try to read the file before the other one built it, thanks to concurrently.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, that is why I changed this build to be serial (not concurrent) at one point. I like your solution better.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ackernaut what do you think here?

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 I follow 100% on how the theme is building. Wasn’t it a matter of calculating the values on the fly in dev and building an object in production? Or am I totally lost?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, wrong comment box! Heh got too many.

name="ellipsis-v"
style={menuHintStyle}
/>
}
</div>
</div>
<div className={styles.buttonBlock}>
<div className={css(styles.buttonBlock)}>
<button className={buttonStyles} onClick={handleStatusClick}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Left a similar comment on the last PR: when this footer renders on the /me dashboard, a click on this should raise a menu to change the project's team, not the project's owner. I think we've got just a little bit more to go here...

Copy link
Member Author

Choose a reason for hiding this comment

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

You want projects to be able to change teams?? Doing so is not trivial...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes; I think that's the design intent (but we can talk about it). Right now, it's strange to click on a team and have it pop user avatars. Perhaps for now we just disable the click handler on the project on the /me? Good enough for alpha? What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, we had that, but seeing your face 50 times was kinda weird, so me n Terry figured we'd show the team, but let them change the team member. Since team ID is built into the immutable primary key, wed essentially delete and recreate. Changing teams also means that we can't easily see the change history of a project due to permissions. I'm cool with whatever

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant to put this here. @ackernaut what are your thoughts here?

Copy link
Member

Choose a reason for hiding this comment

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

I do have a thought here! :) So the latest card design has a hover state (vertical ellipsis) for the avatar:name block indicating you can click on it. The other components have those subtle hints, too. For user dash, let’s just make it a static label with the team name and give no indication of interact-ability. It will be like the action list items, in a sense. Yay, nay?

@ackernaut
Copy link
Member

I’m getting an issue when trying to archive a project card:

Uncaught TypeError: Cannot read property 'startsWith' of undefined ProjectCardContainer.js:51

@mattkrick
Copy link
Member Author

@ackernaut I noticed that once, but couldn't reproduce it. Do you have some reliable steps to reproduce it?

Copy link
Member

@ackernaut ackernaut left a comment

Choose a reason for hiding this comment

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

Oh my! Such a good PR! Super-human.

I left a few notes. I think I may have answered a few questions after reviewing further.

I think there is some newer work that didn’t make it over from the summary branch I was working on. I can try merging that in, too (and updating to Aphrodite). Do you mind if I push in any small changes?

dotStyles3 = combineStyles(s.dotAnimated, s.dot3);
}

// TODO only use 1 style?
Copy link
Member

Choose a reason for hiding this comment

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

@mattkrick we need to figure out a way to alternate the timing of each dot or change the design of the animation. As written all three dots pulse as the same time.

Copy link
Member Author

Choose a reason for hiding this comment

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

whoops. fixed in the next commit

</button>
);
};

styles = StyleSheet.create({
IconButton.propTypes = {
Copy link
Member

Choose a reason for hiding this comment

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

Combine this with the propTypes object toward the end of the document?

Copy link
Member Author

Choose a reason for hiding this comment

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

fantastic eye for detail. fixed!

@@ -96,6 +69,7 @@ IconLink.propTypes = {
'small',
'large'
]),
styles: PropTypes.object,
theme: PropTypes.oneOf([
Copy link
Member

Choose a reason for hiding this comment

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

Does this prop name need to change to colorPalette ?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

hasErrorText,
hasHelpText,
helpText,
input,
isWider,
theme,
theme: inputTheme,
Copy link
Member

Choose a reason for hiding this comment

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

Should it just be a defaultProp?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, I'll change this to colorPalette.
defaultProps are ok in this case, but they aren't passed to the withStyles HOC, which means if our stylesThunk depends on the colorPalette, it'll be undefined. For that reason, I try to avoid defaultProps & explicitly pass that in, but I don't see a single case where anything using InputField passes in that value.

styles,
} = props;

const styleTheme = inputTheme || 'cool';
Copy link
Member

Choose a reason for hiding this comment

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

Should it just be a defaultProp?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, let's do that for now

padding: '2rem'
}
});
// import React, { Component, PropTypes } from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

Not currently being used, but was originally intended for examples in the patterns view.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah! i wasn't sure, so i just commented out a bunch of things that weren't in the app. what should i do here?

Copy link
Member

Choose a reason for hiding this comment

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

I don’t mind yanking the components in patterns. I do think the shortcuts menu is still something we want to work out, perhaps move that to /meeting module instead of /team module (does that module even get used?)

});

export default look(ShortcutsMenu);
// import React, {PropTypes} from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

Don’t want to lose the shortcuts menu, but it hasn’t been implemented yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

revived!

@ackernaut
Copy link
Member

I’m noticing some differences in how the type is rendering. I wonder if that is simply because of the change in format (to woff) or something else is also going on. Looking into it.

@mattkrick
Copy link
Member Author

@ackernaut oh that's interesting! i'll commit the ttf versions and we can play with it.

@ackernaut
Copy link
Member

@mattkrick I wonder if my console error is because I am seeded inactive on the Engineering team?

@ackernaut
Copy link
Member

@mattkrick I have some style updates that I can merge here (my latest summary work). Whatcha think?

@mattkrick
Copy link
Member Author

@ackernaut yeah, we can add em here or we can merge the summary branch onto this one, whichever you think is least painful

@ackernaut
Copy link
Member

@mattkrick I basically did that, I branched from here, merged in summary, fixed conflicts, and pushed as look-away-summary which should fit nicely here.

@mattkrick
Copy link
Member Author

super! anything else I need to do before we merge this sucker?

@ackernaut
Copy link
Member

Let me merge my branch real quick...

@jordanh jordanh merged commit 681a5dd into master Oct 4, 2016
@jordanh jordanh removed the pr review label Oct 4, 2016
@jordanh jordanh deleted the look-away branch October 4, 2016 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants