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

SpecialAnnouncement to promote teacher applications #19922

Merged
merged 10 commits into from Jan 13, 2018

Conversation

Erin007
Copy link
Contributor

@Erin007 Erin007 commented Jan 10, 2018

This PR adds a large Special Announcement banner to /home for teachers, the teacher view of /courses, and /yourschool to promote CSD and CSP professional learning applications. This special announcement is only shown when the user is viewing /courses or /home in English as it is primarily applicable to US teachers.

desktop:
screen shot 2018-01-12 at 3 56 33 pm

mobile:
teacher apps banner mobile

Note, this PR also removes the smaller announcement (Notification component) from the teacher homepage.

@Erin007 Erin007 changed the title [WIP] SpecialAnnouncement for teacher applications on teacher /home and /courses [WIP] SpecialAnnouncement to promote teacher applications Jan 11, 2018
fontSize: 24,
lineHeight: '26px',
fontFamily: 'Gotham 3r',
color: color.charcoal
},
textItem: {
backgroundColor: color.teal,
padding: 30,
paddingLeft: 30,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

padding adjustments could change depending on copy length

image: {
width: 485,
height: 260
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this seem redundant, but was necessary to constrain the image size on /yourschool because pegasus serves the image differently than dashboard

return (
<div style={styles.fullWidthNonResponsive}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This styling was the only thing really differentiating SpecialAnnouncementActionBlock from TwoColumnActionBlock and we want the special announcement to be responsive so I removed it. Then, I customized SpecialAnnouncementActionBlock in the pattern of the other variations.

@Erin007 Erin007 requested a review from breville January 11, 2018 00:58
@Erin007
Copy link
Contributor Author

Erin007 commented Jan 11, 2018

A note about responsivity: pegasus handles it differently than dashboard and since the page widths are controlled by redux, they don't update on the fly on /yourschool. This means if you view /yourschool special announcement on mobile it looks fine, but if you resize from desktop it doesn't look great. Given we're not expecting that page to be re-sized nor does it get much traffic, I'm considering this non-blocking for now. Seem fair?

@@ -881,8 +881,8 @@
"signinOrAge": "Sign in or provide your age to continue",
"skipPuzzle": "Skip puzzle",
"some": "Some",
"specialAnnouncementHeading": "The Hour of Code is coming",
"specialAnnouncementDescription": "Try our brand new Minecraft activity with your class for the Hour of Code (Dec 4-10)! This year, we’ve upgraded our servers so your students can play it signed in. They can save their progress and keep their final projects. Sign up your class today!",
"specialAnnouncementHeading": "Apply for TeacherCon 2018",
Copy link
Member

Choose a reason for hiding this comment

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

I think we should probably use different key names for different special announcements. One reason is that, in case we start using them for non-en, we don't have old translations showing for new announcements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documenting our offline conversation - we learned that when we change a string it will default back to English until it is translated rather than stay as the translated old string. Also, we don't need to store old announcement text, so we can just change the strings and keep the keeps.

showInitialTips={showInitialTips}
userId={userId}
/>
<span>
Copy link
Member

Choose a reason for hiding this comment

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

Why span? div seems more typical.. I think spans are just for inline elements.

@@ -81,7 +82,7 @@ class UnconnectedTwoColumnActionBlock extends Component {
<div style={styles.container}>
{responsiveSize === 'lg' &&
<div style={{float, width}}>
<img src={imageUrl}/>
<img src={imageUrl} style={styles.image}/>
Copy link
Member

Choose a reason for hiding this comment

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

nit: Do we wrap when there's more than one parameter?

@@ -140,21 +133,8 @@ export default class TeacherHomepage extends Component {
<ProtectedStatefulDiv
ref="termsReminder"
/>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to do a follow up PR that cleans up our announcement system on this page (takes out DCDO census and hoc_launch conditionals and sets up a clean way to show the small announcement or the big announcement). To keep this change un-blocked I'm just completely removing the small Notification for now.

@Erin007 Erin007 changed the title [WIP] SpecialAnnouncement to promote teacher applications SpecialAnnouncement to promote teacher applications Jan 13, 2018
const { ncesSchoolId, censusQuestion, schoolYear } = this.props;
const { teacherId, teacherName, teacherEmail } = this.props;
const { canViewAdvancedTools } = this.props;
const { canViewAdvancedTools, isEnglish, queryStringOpen } = this.props;
Copy link
Member

Choose a reason for hiding this comment

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

Out of scope for this change, but just noticed queryStringOpen and can't tell what it does from its name :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's related to managing sections: b1111ed

@Erin007 Erin007 merged commit 0a6b7c9 into staging Jan 13, 2018
@Erin007 Erin007 deleted the teacher-announcements-facilitator-apps branch January 13, 2018 02:08
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

2 participants