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

Add facilitator application 2018-19 form #18461

Merged
merged 4 commits into from
Oct 18, 2017
Merged

Conversation

aoby
Copy link
Contributor

@aoby aoby commented Oct 18, 2017

Task

A few selected screenshots

image

image

image

image

image

/**
* Override in derived classes
* @type {Object} - map of control name to label
*/

Choose a reason for hiding this comment

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

Since this is commented out, is it just a reminder for people creating derived classes? or should there be a default implementation in here?

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 don't follow. What's commented out? It is initialized to an empty object here in the base class (see line 14). This jsdoc block is describing the static labels, which yes should be overridden in derived classes (and is in the Section#... pages) .

Choose a reason for hiding this comment

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

Oh, I understand. Thanks!

state: 'WA',
zipCode: '98101',
genderIdentity: 'Male',
race: ['White'],

Choose a reason for hiding this comment

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

I think this would technically be OTHER (half-giant)... :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Will update :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that would actually be species, which we do not ask currently.

Choose a reason for hiding this comment

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

Since humans and giants can interbreed, they are the same species.

city: "City",
state: "State",
zipCode: "Zip Code",
genderIdentity: "Gender Identity",
Copy link
Contributor

Choose a reason for hiding this comment

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

Gender Identity vs Gender?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tanyaparker preference here?

genderIdentity: "Gender Identity",
race: "Race",
institutionType: "What type of institution do you work for?",
currentEmployer: "Current employer?",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest removing the question mark

};
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this override necessary? Aren't we just returning the superclass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I was following the pattern of existing forms, but you're right this doesn't appear to be necessary. Will remove.

import Facilitator1819FormComponent from "./Facilitator1819FormComponent";
import {pageLabels} from './Facilitator1819Labels';

const YES = "Yes";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an NPM library you can import with this definition? /s

<h4>If selected for the program, you will be required to attend TeacherCon and a Facilitator-in-Training Weekend in the summer of 2018.</h4>

{this.checkBoxesWithAdditionalTextFieldsFor("csdCspTeacherconAvailability", {
"I'm not available for either TeacherCon. (please explain)" : "unavailableReason"
Copy link
Contributor

Choose a reason for hiding this comment

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

(Please Explain)

@@ -133,6 +135,7 @@ def initialize(user)
can :manage, RegionalPartner
can :report_csv, :peer_review_submissions
can :manage, Pd::RegionalPartnerMapping
can :manage, Pd::Application::FacilitatorApplication1819
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably a future change but regional partners should be able to view this applications, right?

Copy link
Contributor Author

@aoby aoby Oct 18, 2017

Choose a reason for hiding this comment

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

Yeah I figure we should add that permission when we create the API that requires it.

NO = 'No'.freeze
NONE = 'None'.freeze

PROGRAMS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

A lot of these seem like constants that we'll be reusing in other forms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True. I could make a common application constants file...

= stylesheet_link_tag 'css/pd', media: 'all'
%script{src: minifiable_asset_path('js/pd/application/facilitator_application/new.js'), data: @script_data}

%h1
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this is not part of the react element? Is it just because it's completely static?

I feel like for some components we've put everything in the react element. If we have a standard / preferred way of doing this, lets follow it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, it's static and also rendered across all pages in the form. The React Form renders its own pages and doesn't have space for a header so I'd have to create a wrapper component with this header. It just seems like unnecessary overhead for some static content.

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 don't think we have a standard. Anything with client-side logic should be in React, but otherwise we tend to leverage rails & haml for surrounding static content so I think this is consistent.

@aoby
Copy link
Contributor Author

aoby commented Oct 18, 2017

@aoby
Copy link
Contributor Author

aoby commented Oct 18, 2017

Rename Pd::Application classes for better consistency
@aoby aoby merged commit cc19907 into staging Oct 18, 2017
@aoby aoby deleted the pd-facilitator-application branch October 18, 2017 22:51
@tanyaparker
Copy link
Contributor

tanyaparker commented Oct 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants