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

Added 'privacy_policy_reading_level_url' to Product model #2004

Merged
merged 6 commits into from Oct 23, 2018

Conversation

mmmavis
Copy link
Collaborator

@mmmavis mmmavis commented Oct 22, 2018

Related to #1892

  • P1: make the Grade text linkable (most products will link to a unique external url)

@cadecairos cadecairos temporarily deployed to foundation-mofostaging-pr-2004 October 22, 2018 22:00 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-2004 October 22, 2018 22:00 Inactive
Pomax
Pomax previously requested changes Oct 22, 2018
network-api/networkapi/buyersguide/models.py Show resolved Hide resolved
@@ -20,6 +20,8 @@ export default class Criterion extends React.Component {
let meta = this.props.meta;
let fullClass = `criterion criterion-${meta.class} criterion-${meta.id}`;

console.log(meta);
Copy link
Contributor

Choose a reason for hiding this comment

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

rogue console log~~

@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-2004 October 22, 2018 22:10 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-2004 October 22, 2018 22:24 Inactive
@mmmavis mmmavis requested a review from Pomax October 22, 2018 22:25
@mmmavis mmmavis temporarily deployed to foundation-mofostaging-pr-2004 October 22, 2018 22:26 Inactive
@@ -191,6 +193,12 @@ class Product(models.Model):
max_length=2,
)

privacy_policy_reading_level_url = models.URLField(
max_length=2048,
help_text='Link to this privacy policy reading level',
Copy link
Collaborator Author

@mmmavis mmmavis Oct 22, 2018

Choose a reason for hiding this comment

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

@kristinashu let me know if help text for this the "reading level url" field makes sense... I don't know how to better describe it

Pomax
Pomax previously requested changes Oct 22, 2018
Copy link
Contributor

@Pomax Pomax left a comment

Choose a reason for hiding this comment

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

It looks like there's a migration still missing (the max_length/help_text one. You can probably just delete 0010+ and then rerun make migrations). Also, can you update factory.py so that the Product faker knows to come up with fake URLs for the new fields?

@mmmavis
Copy link
Collaborator Author

mmmavis commented Oct 23, 2018

kk I wasn't sure if I should update factory.py since privacy_policy_reading_level_url is an optional field. I'll update PR.

@@ -29,7 +29,7 @@ export default class Criterion extends React.Component {
<button onClick={() => this.toggle()} className={this.state.helptextVisible ? `open` : `closed`}></button>
}
</p>
<p className="rating">{ meta.answer } <span className="emoji"></span></p>
<p className="rating"><span dangerouslySetInnerHTML={{__html: meta.answer}}></span> <span className="emoji"></span></p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Filed #2006 to look at this later.

@Pomax Pomax merged commit c5f8099 into master Oct 23, 2018
@Pomax Pomax deleted the issue-1892-cms-field-changes-product branch October 23, 2018 01:30
@kristinashu
Copy link

Yes! Just checked it out on staging. This is perfect!

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