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

Fellowship type pages #994

Merged
merged 9 commits into from
Jan 30, 2018
Merged

Fellowship type pages #994

merged 9 commits into from
Jan 30, 2018

Conversation

mmmavis
Copy link
Collaborator

@mmmavis mmmavis commented Jan 24, 2018

@mmmavis mmmavis changed the base branch from master to fellowships January 24, 2018 17:30
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 17:30 Inactive
@mmmavis mmmavis force-pushed the issue-951-fellowship-type-page branch from a45fcd1 to 2bc979a Compare January 24, 2018 17:34
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 17:34 Inactive
@mmmavis mmmavis force-pushed the issue-951-fellowship-type-page branch from 2bc979a to 389c3a0 Compare January 24, 2018 17:36
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 17:36 Inactive
@mmmavis mmmavis force-pushed the issue-951-fellowship-type-page branch from 389c3a0 to def5811 Compare January 24, 2018 17:39
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 17:39 Inactive
@mmmavis mmmavis force-pushed the issue-951-fellowship-type-page branch from def5811 to 1b1dd55 Compare January 24, 2018 17:40
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 17:40 Inactive
@mmmavis mmmavis changed the title Fellowship type page + Science fellowship page (WIP) Fellowship type page + Science fellowship page Jan 24, 2018
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 22:47 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 23:03 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 23:05 Inactive
@mmmavis mmmavis changed the title (WIP) Fellowship type page + Science fellowship page Fellowship type page + Science fellowship page Jan 24, 2018
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 24, 2018 23:10 Inactive
@mmmavis mmmavis changed the title Fellowship type page + Science fellowship page Fellowship type pages Jan 24, 2018
@mmmavis mmmavis requested a review from alanmoo January 24, 2018 23:24
@mmmavis
Copy link
Collaborator Author

mmmavis commented Jan 24, 2018

@alanmoo this is ready for review!

@@ -31,3 +31,29 @@
background-repeat: no-repeat;
background-size: contain;
}

.breadcrumb {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

overriding some bootstrap's rules...

@mmmavis mmmavis force-pushed the issue-951-fellowship-type-page branch from be06cb3 to f55b029 Compare January 26, 2018 19:44
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 26, 2018 19:44 Inactive
Copy link
Contributor

@alanmoo alanmoo left a comment

Choose a reason for hiding this comment

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

Some changes for the markup, though I'd like @gvn to take a look at the CSS

{% endblock %}

{% block fellowship_description %}
{% lorem 2 p %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat

name: `Firstname Surname`,
role: `[Area Fellowship] Fellow, [Year]`,
location: `City, Country`,
image: `https://images.pexels.com/photos/264206/pexels-photo-264206.jpeg?w=500`,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the secret gem of this PR

};

ReactDOM.render(<Person metadata={metadata} />, document.getElementById(`featured-open-web-fellow`));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels WETter than necessary...could the metadata be passed in as props on the target div (in the markup), and then render run on a generic class?

@@ -1,6 +1,6 @@
<!-- This is a copy/paste of landing-page.html, modified to be useful for fellowships to start. Ideally the entire site will extend this template eventually -->
<!DOCTYPE html>
<html>{% load settings_value %}{% load active_nav %}
<html>{% load settings_value %}{% load fellowship_active_nav %}
Copy link
Contributor

Choose a reason for hiding this comment

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

I realize I'm a bit concerned with editing of this file too much to be specific to fellows (and still calling it foundation-base). Perhaps we should abstract out a level so we can rely on a true "foundation base" generated from the original pug file? I'd say for this PR, let's start with renaming this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

k i'll rename it to fellowships_base.html as the first step

@alanmoo alanmoo requested a review from gvn January 26, 2018 20:21
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 26, 2018 21:03 Inactive
@@ -231,6 +232,42 @@ let main = {
if (document.querySelector(`#news`)) {
ReactDOM.render(<News env={env}/>, document.querySelector(`#news`));
}

// Science Fellowship
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we put this into a new file? main.js is getting pretty large and this is fairly specific to just one section.

text-decoration: none;
border-bottom: 5px solid #ffed00;
position: relative;
top: 2.5px;
Copy link
Contributor

Choose a reason for hiding this comment

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

All browsers round subpixels differently, so its better to just use integer values with pixel units IMO.

@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 26, 2018 22:38 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 26, 2018 22:39 Inactive
@mmmavis
Copy link
Collaborator Author

mmmavis commented Jan 26, 2018

There are some CSS tweaks I need to apply. Will flag someone to review after I'm done.

@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-994 January 26, 2018 23:54 Inactive
function injectReactComponents() {
// Science Fellowship
if (document.getElementById(`featured-science-fellow`)) {
let metadata = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alanmoo

We could feed these hardcoded metadata via HTML data-* attributes... but some of them aren't string. It's more troublesome to hardcode array and object as data-* values... and it'll make the HTML code less readable. I can't find a DRYer way to do this... at least not now as these values are hardcoded.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that this is in a separate file it makes a lot more sense.

@mmmavis mmmavis requested a review from alanmoo January 27, 2018 00:00
@mmmavis
Copy link
Collaborator Author

mmmavis commented Jan 27, 2018

@alanmoo this is ready for review again!

}
}

export default { injectReactComponents };
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exporting a named function here. I think we'll end up having more functions in this module in the future.

Copy link
Contributor

@alanmoo alanmoo left a comment

Choose a reason for hiding this comment

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

This looks good in terms of code and a solid pass at populating the structure. Beyond content, the only glaring issue is the fellowships nav isn't responsive. Should we file that as another ticket @mmmavis?

function injectReactComponents() {
// Science Fellowship
if (document.getElementById(`featured-science-fellow`)) {
let metadata = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that this is in a separate file it makes a lot more sense.

@mmmavis
Copy link
Collaborator Author

mmmavis commented Jan 30, 2018

@alanmoo re: nav

I haven't really worked on styling yet since mockups aren't finalized yet. But yea I can file a ticket to make sure we don't forget to make the nav responsive.

@mmmavis mmmavis merged commit 7c668bf into fellowships Jan 30, 2018
@mmmavis mmmavis deleted the issue-951-fellowship-type-page branch February 9, 2018 19:25
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.

None yet

4 participants